Bug #36760 » 0001-Refs-36760-Reset-candlepin-key-and-truststore.patch
config/katello.migrations/231003142402-reset-store-credentials.rb | ||
---|---|---|
# The server.xml file contained the passwords world readable
|
||
# Purging them will regenerate them
|
||
FileUtils.rm_f('/opt/puppetlabs/puppet/cache/foreman_cache_data/keystore_password-file')
|
||
FileUtils.rm_f('/opt/puppetlabs/puppet/cache/foreman_cache_data/truststore_password-file')
|
hooks/pre/40-katello_reset_candlepin_stores.rb | ||
---|---|---|
# theforeman/certs can't deal with password changes
|
||
# This partially works around it by introducing a worflow where the cache file
|
||
# is removed, but the store exists it removes the store
|
||
if !app_value(:noop) && module_enabled?('katello')
|
||
cache_dir = '/opt/puppetlabs/puppet/cache/foreman_cache_data'
|
||
certs_dir = '/etc/candlepin/certs'
|
||
['keystore', 'truststore'].each do |store|
|
||
unless File.exist?(File.join(cache_dir, "#{store}_password-file"))
|
||
FileUtils.rm_f(File.join(certs_dir, store))
|
||
end
|
||
end
|
||
end
|
- « Previous
- 1
- 2
- Next »