Bug 2222280

Summary: efikeygen instuctions in section 3.6 in the "Managing, monitoring, and updating the kernel" documentation do not work for FIPS-enabled systems
Product: Red Hat Enterprise Linux 8 Reporter: Lark Gordon <lagordon>
Component: DocumentationAssignee: Jana Heves <jsvarova>
Documentation sub component: default QA Contact: RHEL DPM <rhel-docs>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: low    
Priority: high CC: rhel-docs
Version: 8.7Keywords: Documentation
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-21 10:16:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lark Gordon 2023-07-12 14:08:53 UTC
Document URL: 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/signing-a-kernel-and-modules-for-secure-boot_managing-monitoring-and-updating-the-kernel?fireglass_rsn=true#generating-a-public-and-private-key-pair_signing-a-kernel-and-modules-for-secure-boot

Section Number and Name: 
3.6. Generating a public and private key pair

Describe the issue: 
On a system which has FIPS enabled, running the command given results in the below error: 

# efikeygen --dbdir /etc/pki/pesign \
            --self-sign \
            --module \
            --common-name 'CN=Organization signing key' \
            --nickname 'Custom Secure Boot key'

efikeygen: efikeygen.c:main:XXX: could not find NSS slot for token "NSS Certificate DB": Unrecognized Object Identifier.

Suggestions for improvement: 
On FIPS systems, an additional option ' --token "NSS FIPS 140-2 Certificate DB"' is required: 

# efikeygen --dbdir /etc/pki/pesign \
            --self-sign \
            --module \
            --common-name 'CN=Organization signing key' \
            --nickname 'Custom Secure Boot key'
            --token "NSS FIPS 140-2 Certificate DB"

Additional information: 
Without this option,  efikeygen fails to find the default token "NSS Certificate DB" in the PKI database. And this is expected, because in FIPS mode, the token has to be "NSS FIPS 140-2 Certificate DB".