Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions config/initializers/app_artifacts.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
require 'app_artifacts'

AppArtifacts.setup do |store|
# When adding or removing certs, make sure to update the 'saml_endpoint_configs' config
store.add_artifact(:saml_2021_cert, '/%<env>s/saml2021.crt')
store.add_artifact(:saml_2021_key, '/%<env>s/saml2021.key.enc')
store.add_artifact(:saml_2022_cert, '/%<env>s/saml2022.crt')
store.add_artifact(:saml_2022_key, '/%<env>s/saml2022.key.enc')
years = IdentityConfig.store.saml_endpoint_configs.pluck(:suffix)

years.each do |year|
store.add_artifact(:"saml_{year}_cert", "/%<env>s/saml#{year}.crt")
store.add_artifact(:"saml_{year}_key", '/%<env>s/saml{year}.key.enc')
end

store.add_artifact(:oidc_private_key, '/%<env>s/oidc.key') { |k| OpenSSL::PKey::RSA.new(k) }
store.add_artifact(:oidc_public_key, '/%<env>s/oidc.pub') { |k| OpenSSL::PKey::RSA.new(k) }
Expand Down