Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 596 Bytes

File metadata and controls

37 lines (29 loc) · 596 Bytes
Configure authentication with htpasswd
htpasswd -c -B -b users.htpasswd marc '<password>'
oc create secret generic htpass-secret --from-file=htpasswd=users.htpasswd -n openshift-config
cat <<EOF > htpasswd-conf.yml
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
  - name: quicklab_htpasswd
    mappingMethod: claim
    type: HTPasswd
    htpasswd:
      fileData:
        name: htpass-secret
EOF
oc apply -f htpasswd-conf.yml
oc adm policy add-cluster-role-to-user cluster-admin marc