title: “Auth Provider”
date: 2020-10-20T19:13:53
slug: auth-provider
List htpasswd secret
oc get secret -n openshift-config
List htpasswd Secret
oc extract secret/htpasswd-nnis -n openshift-config --to -
Save htpasswd Secret to htpasswd
oc extract secret/htpasswd-nnis -n openshift-config --to . --confirm
Add a new User:
htpasswd -b -B htpasswd xforze PASSWORD
oc set data secret/htpasswd-nnis --from-file htpasswd=htpasswd -n openshift-config
Save actual auth provider yaml:
oc get oauth cluster -o yaml > /tmp/oauth.yaml
vi /tmp/oauth.yaml
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:...output omitted...
name: cluster...output omitted...
spec:
identityProviders:
- name: cluster-users
mappingMethod: claim
type: HTPasswd
htpasswd:
fileData:
name: htpasswd-nnis
