Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2277005 - Upgrading a FIPS enabled Red Hat Satellite 6.14 to 6.15 face issues with Candlepin keystore
Summary: Upgrading a FIPS enabled Red Hat Satellite 6.14 to 6.15 face issues with Cand...
Keywords:
Status: ON_DEV
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.15.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: stream
Assignee: Evgeni Golov
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-24 21:24 UTC by Paul Dudley
Modified: 2024-05-15 17:36 UTC (History)
13 users (show)

Fixed In Version: foreman-installer-3.11.0-0.1.develop.20240429031107gitd83807b
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2279323 (view as bug list)
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 37384 0 High New During upgrade to Katello 4.11 issues are seen with Candlepin keystore 2024-04-25 08:00:35 UTC
Red Hat Issue Tracker SAT-24779 0 None None None 2024-04-24 21:25:16 UTC
Red Hat Knowledge Base (Solution) 7067183 0 None None None 2024-04-25 10:20:17 UTC

Description Paul Dudley 2024-04-24 21:24:11 UTC
Description

When upgrading to Satellite 6.15 we are seeing issues related to regenerating and reimporting the candlepin-ca; 
~~~
2024-04-24 11:22:55 [ERROR ] [configure] /Stage[main]/Certs::Candlepin/Truststore_certificate[/etc/candlepin/certs/truststore:candlepin-ca]/ensure: change from 'absent' to 'present' failed: Execution of '/bin/keytool -import -v -noprompt -storetype pkcs12 -keystore /etc/candlepin/certs/truststore -alias candlepin-ca -file /etc/candlepin/certs/candlepin-ca.crt -storepass:file /etc/pki/katello/truststore_password-file -J-Dcom.redhat.fips=false' returned 1: keytool error: java.io.IOException: keystore password was incorrect
2024-04-24 11:22:55 [ERROR ] [configure] java.io.IOException: keystore password was incorrect
2024-04-24 11:22:55 [ERROR ] [configure] at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2089)
2024-04-24 11:22:55 [ERROR ] [configure] at java.security.KeyStore.load(KeyStore.java:1445)
2024-04-24 11:22:55 [ERROR ] [configure] at sun.security.tools.keytool.Main.doCommands(Main.java:839)
2024-04-24 11:22:55 [ERROR ] [configure] at sun.security.tools.keytool.Main.run(Main.java:380)
2024-04-24 11:22:55 [ERROR ] [configure] at sun.security.tools.keytool.Main.main(Main.java:373)
2024-04-24 11:22:55 [ERROR ] [configure] Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
~~~

Steps to reproduce:

* Install RHEL 8.9 and enable FIPS
* Install a Satellite 6.14 on top of it.
* Try to upgrade the instance to Satellite 6.15.0

Actual Results:

Errors with candlepin keystore password as mentioned above

Expected Results:

No such errors and the upgrade should happen without any such issues.

Comment 4 Evgeni Golov 2024-04-25 08:00:33 UTC
Created redmine issue https://projects.theforeman.org/issues/37384 from this bug

Comment 5 Evgeni Golov 2024-04-25 08:36:38 UTC
Workaround: rm /etc/candlepin/certs/truststore /etc/candlepin/certs/keystore
These files will be regenerated by the installer.

Patch in the works: https://github.com/theforeman/puppet-certs/pull/444


Note You need to log in before you can comment on or make changes to this bug.