Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMP-2460: PCI-DSS 4 requirement 8 #12148

Merged
merged 8 commits into from
Jul 19, 2024

Conversation

yuumasato
Copy link
Member

Description:

  • 8.1 is not applicable
    Managing users identification and the its processes is responsibility of the payment entity.
  • 8.2 is automated
    Identification in OpenShift is handled by an identity provider, and most requirements are not applicable. However, Openshift can prevent login from shared generic users like root and kubeadmin.
  • 8.3, 8.4 and 8.5 are not applicable
    These requirements are to be implemented in the identity provider deployed by the payment entity.
  • 8.6 is supported
    To prevent hardcoding of secrets in scripts and applications, Openshift supports integration with third party secret vaults.

The applicable requirements can be automated on OpenShift.
However, the payment entity will still need to apply the same requirement
onto their payment application.
Among many requirements not applicable one is supported.
@yuumasato yuumasato added the OpenShift OpenShift product related. label Jul 11, 2024
@yuumasato yuumasato requested a review from rhmdnd July 11, 2024 12:42
@yuumasato yuumasato added this to the 0.1.74 milestone Jul 11, 2024
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

github-actions bot commented Jul 11, 2024

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:12148
This image was built from commit: c6eac49

Click here to see how to deploy it

If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:12148

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:12148 make deploy-local

Copy link
Collaborator

@rhmdnd rhmdnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments inline. Otherwise this looks great.

controls/pcidss_4_ocp4.yml Outdated Show resolved Hide resolved
controls/pcidss_4_ocp4.yml Outdated Show resolved Hide resolved
controls/pcidss_4_ocp4.yml Outdated Show resolved Hide resolved
controls/pcidss_4_ocp4.yml Show resolved Hide resolved
controls/pcidss_4_ocp4.yml Show resolved Hide resolved
Sections 8.2 and 8.3 are heavily dependant on the selected identity
provider and removal of kubeadmin user.
So rules for these tow aspects were added to the controls.
@yuumasato yuumasato requested a review from rhmdnd July 15, 2024 10:48
@rhmdnd rhmdnd added the pci-dss label Jul 16, 2024
@xiaojiey
Copy link
Collaborator

/hold for test

@openshift-ci openshift-ci bot added the do-not-merge/hold Used by openshift-ci-robot bot. label Jul 18, 2024
needs to be removed.
rules:
- idp_is_configured
- kubeadmin_removed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does rule ocp4-ocp-idp-no-htpasswd need to be added here as the tile said "Strong authentication for users and administrators is established and managed"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the rule "ocp_no_ldap_insecure"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
I think those two rules should be added here:

  • ocp_idp_no_htpasswd
  • ocp_no_ldap_insecure

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reviews.

I have added ocp_no_ldap_insecure under 8.3.2. the rule is about making sure LDAP doesn't transmit clear passwords.
And have added ocp_idp_no_htpasswd under 8.3.4, PCI-DSS is okay with using passwords as an authentication mechanism, and requirement 8.3.6 establishes strong parameters for this password. However, the htpaswd identity provider doesn't provide user lockout, which is required by 8.3.4.

time that a session can be active. However, the payment entity also needs to control the
user's and administrator's idle session timeouts on their payment applications as well.
rules:
- oauth_or_oauthclient_inactivity_timeout
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add oauth_or_oauthclient_token_maxage here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, the requirement is about login out the user or locking his session when inactive.
And the rule is about expiry of the OAuth token, which forces the user to re-authenticate after some time.
There is nothing regarding periodic re-authentication in the standard.

@@ -2144,10 +2199,11 @@ controls:
interception of communications or from stored data.
levels:
- base
status: pending
status: not applicable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering if ocp_no_ldap_insecure also applies to here, since it is related to transmission of password

The choice of which identity provider to use falls onto the payment
entity. But we already know that htpaswd cannot satisfy PCI-DSS's needs,
and LDAP provider needs to be restrained.

Restrict usage of htpasswd as the identity provider, it cannot provide
user lockout feature required by PCI-DSS.

Do not allow the LDAP provider to transmit clear text passwords.
Copy link
Collaborator

@rhmdnd rhmdnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

But I'll give @xiaojiey and @Vincent056 a chance to review the latest updates.

Copy link

codeclimate bot commented Jul 19, 2024

Code Climate has analyzed commit c6eac49 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 59.4% (0.0% change).

View more on Code Climate.

@xiaojiey
Copy link
Collaborator

/lgtm

Copy link
Collaborator

@rhmdnd rhmdnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@rhmdnd rhmdnd merged commit 1dc5faf into ComplianceAsCode:master Jul 19, 2024
93 of 94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Used by openshift-ci-robot bot. OpenShift OpenShift product related. pci-dss
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants