RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1656786 - FIPS message is displayed while setting up subsystem when actually system is not FIPS enabled.
Summary: FIPS message is displayed while setting up subsystem when actually system is ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pki-core
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Alex Scheel
QA Contact: Asha Akkiangady
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-06 10:14 UTC by Sudhir Menon
Modified: 2023-05-17 11:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:45:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-36597 0 None None None 2023-05-17 11:36:12 UTC
Red Hat Product Errata RHSA-2020:1644 0 None None None 2020-04-28 15:46:03 UTC

Description Sudhir Menon 2018-12-06 10:14:33 UTC
Description of problem: FIPS warning message is displayed on the console while setting up CA subsystem using pkispawn when the system is not FIPS enabled.

Version-Release number of selected component (if applicable):
[root@master conf]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.0 Beta (Ootpa)

pki-ca-10.6.8-1.module+el8+2277+f150bc67.noarch

How reproducible: Always

Steps to Reproduce:
1. Run interactive pkispwan and setup CA.
2. Check the installation summary and also console logs.

Actual results: 

[root@master conf]# cat /proc/sys/crypto/fips_enabled 
0

1. Check the REMINDER in the installation summary

==========================================================================
                                INSTALLATION SUMMARY
==========================================================================
      Administrator's username:             caadmin
      Administrator's PKCS #12 file:
            /root/.dogtag/pki-tomcat/ca_admin_cert.p12
      This CA subsystem of the 'pki-tomcat' instance
      has FIPS mode enabled on this operating system.
      REMINDER:  Don't forget to update the appropriate FIPS
                 algorithms in server.xml in the 'pki-tomcat' instance.

      To check the status of the subsystem:
            systemctl status pki-tomcatd
      To restart the subsystem:
            systemctl restart pki-tomcatd
      The URL for the subsystem is:
            https://master.pkirhel8.test:8443/ca

2. Also check the console logs

pkispawn      : INFO     Starting pki-tomcat instance
pkispawn      : DEBUG    Command: systemctl daemon-reload
pkispawn      : DEBUG    Command: systemctl start pki-tomcatd
pkispawn      : INFO     ........... FIPS mode is enabled on this operating system.

Expected results:
Fix the incorrect message related to FIPS mode.

Additional info:

Comment 1 Alex Scheel 2020-02-07 16:13:42 UTC
Checked in upstream:

commit fe5fb947c91f27f240a2a5ea50be5e6da40f8294
Author: Alexander Scheel <ascheel>
Date:   Thu Jan 30 09:52:58 2020 -0600

    Fix FIPS detection
    
    The original FIPS detection code fails on python3:
    
        $ python3
        Python 3.7.6 (default, Dec 19 2019, 22:52:49)
        >>> '0' == b'0'
        False
    
    This is because bytes and strings are not directly comparable in all
    scenarios, so the comparison now returns false. Python3's subprocess
    also returns bytes in most scenarios:
    
    > By default, this function will return the data as encoded bytes. The
    > actual encoding of the output data may depend on the command being
    > invoked, so the decoding to text will often need to be handled at the
    > application level.
    
    This results in PKI incorrectly believing that it is in FIPS mode,
    when it really isn't.
    
    Signed-off-by: Alexander Scheel <ascheel>

Comment 3 Pritam Singh 2020-02-14 15:33:51 UTC
Tested on:
[root@pki1 test_dir]# rpm -qi pki-ca
Name        : pki-ca
Version     : 10.8.1
Release     : 1.module+el8.2.0+5696+9d4c4fa5
Architecture: noarch
Install Date: Wed 12 Feb 2020 02:38:35 AM EST
Group       : Unspecified
Size        : 2640622
License     : GPLv2 and LGPLv2
Signature   : RSA/SHA256, Tue 11 Feb 2020 05:07:44 AM EST, Key ID 199e2f91fd431d51
Source RPM  : pki-core-10.8.1-1.module+el8.2.0+5696+9d4c4fa5.src.rpm
Build Date  : Mon 10 Feb 2020 02:54:46 PM EST
Build Host  : arm64-025.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://www.dogtagpki.org/
Summary     : PKI CA Package

Test Procedure:
https://bugzilla.redhat.com/show_bug.cgi?id=1656786#c0

Proof of concept:

# Validated on fips enabled machine:

1. Check fips:
[root@pki1 test_dir]# cat /proc/sys/crypto/fips_enabled 
1

2. Check pkispawn log:

    ==========================================================================
                                INSTALLATION SUMMARY
    ==========================================================================

      Administrator's username:             kraadmin
      Administrator's PKCS #12 file:
            /opt/topology-01-KRA/kra_admin_cert.p12
INFO: FIPS mode is enabled

      This KRA subsystem of the 'pki-tomcat' instance
      has FIPS mode enabled on this operating system.

      REMINDER:  Don't forget to update the appropriate FIPS
                 algorithms in server.xml in the 'pki-tomcat' instance.

      To check the status of the subsystem:
            systemctl status pki-tomcatd

      To restart the subsystem:
            systemctl restart pki-tomcatd

      The URL for the subsystem is:
            https://pki1.example.com:8443/kra

      PKI instances will be enabled upon system boot


# Validated on fips disabled machine:

1. Check fips:
[root@pki1 ~]# cat /proc/sys/crypto/fips_enabled
0

2. Check pkispawn:

    ==========================================================================
                                INSTALLATION SUMMARY
    ==========================================================================

      Administrator's username:             caadmin
      Administrator's PKCS #12 file:
            /opt/topology-01-CA/ca_admin_cert.p12
INFO: FIPS mode is not enabled

      To check the status of the subsystem:
            systemctl status pki-tomcatd

      To restart the subsystem:
            systemctl restart pki-tomcatd

      The URL for the subsystem is:
            https://pki1.example.com:8443/ca

      PKI instances will be enabled upon system boot

    ==========================================================================

As per the POC, it can be seen that the check is now working as expected.
Hence, Marking this Bugzilla verified.

Comment 5 errata-xmlrpc 2020-04-28 15:45:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1644


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