SV-257542r960993_rule
V-257542
SRG-APP-000156-CTR-000380
CNTR-OS-000440
CAT II
10
Configure OpenShift to use an OpenIDConnect Identity Provider. Note: This STIG was written for OIC; do not use HTPasswd. Only use an approved identity provider.
Steps to configure OpenID provider:
1. Create Secret for Client Secret by executing the following:
oc create secret generic idp-secret --from-literal=clientSecret=<secret> -n openshift-config
2. Create config map for OpenID Trust CA by executing the following:
oc create configmap ca-config-map --from-file=ca.crt=/path/to/ca -n openshift-config
3. Create OpenID Auth Config Resource YAML.
Using the preferred text editor, create a file named oidcidp.yaml using the example content (replacing config values as appropriate).
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
name: cluster
spec:
identityProviders:
- name: oidcidp
mappingMethod: claim
type: OpenID
openID:
clientID: ...
clientSecret:
name: idp-secret
claims:
preferredUsername:
- preferred_username
name:
- name
email:
- email
issuer: https://www.idp-issuer.com
4. Apply OpenID config to cluster by executing the following:
oc apply -f ldapidp.yaml
Note: For more information on configuring an OpenID provider, refer to https://docs.openshift.com/container-platform/4.8/authentication/identity_providers/configuring-oidc-identity-provider.html.
Verify the authentication operator is configured to use a secure transport to an OpenIDConnect provider:
oc get oauth cluster -o jsonpath="{.spec.identityProviders[*]}{'\n'}"
If the transport is not secure (ex. HTTPS), this is a finding.
V-257542
False
CNTR-OS-000440
Verify the authentication operator is configured to use a secure transport to an OpenIDConnect provider:
oc get oauth cluster -o jsonpath="{.spec.identityProviders[*]}{'\n'}"
If the transport is not secure (ex. HTTPS), this is a finding.
M
5547