OpenShift Authentication & Authorization, htpasswd (OpenShift Administration Part-4) RedHat Ex280

Опубликовано: 11 Апрель 2026
на канале: Tech Tejendra
13,962
132

OpenShift Users and Groups
User
Service Account
Group
Role
OpenShift Identity Providers (OpenShift OAuth server)
HTPasswd
OpenStack Keystone
LDAP
GitHub or GitHub Enterprise
OpenID Connect
Lab: Create users 'admin' and 'developer' and assign role

** If new to Docker, Podman, Kubernetes and Openshift then first see --    • Docker, Podman, Containers, Kubernetes and...  

** For detail about OpenShift development --
   • OpenShift Tutorial  

commands--
htpasswd -c -B -b htpasswd-file admin redhat
htpasswd -b htpasswd-file developer developer

oc create secret generic localusers --from-file htpasswd=htpasswd-file -n openshift-config

oc adm policy add-cluster-role-to-user cluster-admin admin

oc get oauth cluster -o yaml gt oauth1.yaml
spec:
identityProviders:
htpasswd:
fileData:
name: localusers
mappingMethod: claim
name: myusers
type: HTPasswd

oc replace -f oauth.yaml
oc get pods -n openshift-authentication

oc login -u admin -p redhat
oc get nodes
oc get users
oc get identity

oc login -u developer -p developer
oc get nodes