Skip to content

enj/cluster-authentication-operator

 
 

Repository files navigation

cluster-authentication-operator

This is where the amazing cluster-authentication-operator lives.

Add a basic IdP to test your stuff

The most common identity provider for demoing and testing is the HTPasswd IdP.

To set it up, take the following steps:

  1. Create a new htpasswd file
$ htpasswd -bBc /tmp/htpasswd testuser testpasswd
  1. (optional) Add more users
$ htpasswd -bB /tmp/htpasswd testuser2 differentpassword
  1. Create a secret from that htpasswd in the openshift-config namespace
oc create secret generic myhtpasswdidp-secret -n openshift-config --from-file=/tmp/htpasswd
  1. Configure the OAuth server to use the HTPasswd IdP from the secret by editing the spec of the cluster-wide OAuth/cluster object so that it looks like the one in this example:
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
  - name: htpassidp
    type: HTPasswd
    htpasswd:
      fileData:
        name: myhtpasswdidp-secret
  1. The operator will now restart the OAuth server deployment and mount the new config
  2. When the operator is available again (oc get clusteroperator authentication), you should be able to log in:
oc login -u testuser -p testpasswd

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.5%
  • Makefile 1.1%
  • Dockerfile 0.4%