Skip to content

CNF-21212: RAN Hardening (5.0) - PAM Empty Passwords (H2)#736

Open
sebrandon1 wants to merge 1 commit into
openshift-kni:mainfrom
sebrandon1:compliance/4.22/h2-pam-nullok
Open

CNF-21212: RAN Hardening (5.0) - PAM Empty Passwords (H2)#736
sebrandon1 wants to merge 1 commit into
openshift-kni:mainfrom
sebrandon1:compliance/4.22/h2-pam-nullok

Conversation

@sebrandon1

@sebrandon1 sebrandon1 commented May 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds MachineConfig to remove the nullok option from PAM authentication on both master and worker nodes.

This addresses HIGH severity E8 compliance check rhcos4-e8-no-empty-passwords which requires preventing authentication with empty passwords.

  • Deploys the correct RHCOS 9 /etc/pam.d/system-auth with nullok removed
  • Uses the actual RHCOS 9 PAM stack (not the broken operator-generated RHEL 8 template)
  • Separate master and worker MachineConfig files

Upstream

We have an open PR to fix this in the RHCOS base image so this MachineConfig remediation would no longer be needed:

We also have an upstream fix for the broken compliance-operator remediation:

Files

  • 75-pam-auth-high-master.yaml
  • 75-pam-auth-high-worker.yaml

Verification

After applying to a cluster, verify with:

oc debug node/ -- chroot /host grep nullok /etc/pam.d/system-auth
# Expected: no output (nullok removed)

Compliance scan verification:

oc get compliancecheckresult -n openshift-compliance | grep no-empty-passwords
# Expected: PASS

Jira

References

@openshift-ci-robot

openshift-ci-robot commented May 1, 2026

Copy link
Copy Markdown
Collaborator

@sebrandon1: This pull request references CNF-21212 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Adds MachineConfig to remove the nullok option from PAM authentication on both master and worker nodes.

This addresses HIGH severity E8 compliance check rhcos4-e8-no-empty-passwords which requires preventing authentication with empty passwords.

  • Deploys the correct RHCOS 9 /etc/pam.d/system-auth with nullok removed
  • Uses the actual RHCOS 9 PAM stack (not the broken operator-generated RHEL 8 template)
  • Separate master and worker MachineConfig files

Files

  • 75-pam-auth-high-master.yaml
  • 75-pam-auth-high-worker.yaml

Verification

After applying to a cluster, verify with:

oc debug node/<node> -- chroot /host grep nullok /etc/pam.d/system-auth
# Expected: no output (nullok removed)

Compliance scan verification:

oc get compliancecheckresult -n openshift-compliance | grep no-empty-passwords
# Expected: PASS

Jira

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented May 1, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sebrandon1
Once this PR has been reviewed and has the lgtm label, please assign irinamihai for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot requested review from fedepaol and yuvalk May 1, 2026 22:59
@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sebrandon1, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 59 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 42402dd6-0de9-4f39-9dd3-2525bda20619

📥 Commits

Reviewing files that changed from the base of the PR and between e408b98 and 881c68d.

📒 Files selected for processing (2)
  • telco-ran/configuration/kube-compare-reference/informational/hardening/75-pam-auth-high-master.yaml
  • telco-ran/configuration/kube-compare-reference/informational/hardening/75-pam-auth-high-worker.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sebrandon1

Copy link
Copy Markdown
Contributor Author

Verification Test Results

Tested on cnfdt16 (OCP 4.22, RHCOS 9.8.20260403-0, 3 masters + 2 workers).

Apply: Applied 75-pam-auth-high-{master,worker}.yaml via oc apply.
Wait: MCP rolling update completed on all 5 nodes.
Verify:

$ oc debug node/cnfdt16-master-0 -- chroot /host grep -c nullok /etc/pam.d/system-auth /etc/pam.d/password-auth
/etc/pam.d/system-auth:0
/etc/pam.d/password-auth:0

$ oc debug node/cnfdt16-worker-0 -- chroot /host grep -c nullok /etc/pam.d/system-auth /etc/pam.d/password-auth
/etc/pam.d/system-auth:0
/etc/pam.d/password-auth:0

Result: PASS — nullok removed from both system-auth and password-auth PAM configs on all master and worker nodes.

@sebrandon1 sebrandon1 force-pushed the compliance/4.22/h2-pam-nullok branch from 88ead65 to eb1ef29 Compare May 4, 2026 20:34
@sebrandon1

Copy link
Copy Markdown
Contributor Author

I'm considering a potential upstream of this PAM Empty Passwords change.

authselect/authselect#94

The upstream authselect allows for the ability to disable empty passwords. I'm discussing what it would mean to disable empty passwords for RHCOS in Slack: https://redhat-internal.slack.com/archives/C08RWRUQ18T/p1778008748582319

@sebrandon1 sebrandon1 force-pushed the compliance/4.22/h2-pam-nullok branch from eb1ef29 to 9b9a40e Compare May 8, 2026 15:48
@sebrandon1 sebrandon1 force-pushed the compliance/4.22/h2-pam-nullok branch from 9b9a40e to bb14e37 Compare May 29, 2026 16:36
Remove nullok from PAM system-auth and password-auth on both
master and worker nodes.
@sebrandon1 sebrandon1 force-pushed the compliance/4.22/h2-pam-nullok branch from bb14e37 to 881c68d Compare June 5, 2026 16:19
@sebrandon1

Copy link
Copy Markdown
Contributor Author

Note: we have an upstream PR open to remove nullok from the RHCOS base image directly — coreos/rhel-coreos-config#255. If that lands, this MachineConfig remediation would no longer be needed for new RHCOS builds.

@openshift-ci-robot

openshift-ci-robot commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

@sebrandon1: This pull request references CNF-21212 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Adds MachineConfig to remove the nullok option from PAM authentication on both master and worker nodes.

This addresses HIGH severity E8 compliance check rhcos4-e8-no-empty-passwords which requires preventing authentication with empty passwords.

  • Deploys the correct RHCOS 9 /etc/pam.d/system-auth with nullok removed
  • Uses the actual RHCOS 9 PAM stack (not the broken operator-generated RHEL 8 template)
  • Separate master and worker MachineConfig files

Upstream

We have an open PR to fix this in the RHCOS base image so this MachineConfig remediation would no longer be needed:

We also have an upstream fix for the broken compliance-operator remediation:

Files

  • 75-pam-auth-high-master.yaml
  • 75-pam-auth-high-worker.yaml

Verification

After applying to a cluster, verify with:

oc debug node/ -- chroot /host grep nullok /etc/pam.d/system-auth
# Expected: no output (nullok removed)

Compliance scan verification:

oc get compliancecheckresult -n openshift-compliance | grep no-empty-passwords
# Expected: PASS

Jira

References

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants