Lab 5.4 - Delete User from the Secret

1. Login to the cluster

oc login -u admin -p rahasia https://api.openshift.podX.io:6443

2. Delete the manager user from the temp file

cat /root/temp
htpasswd -D /root/temp manager
cat /root/temp

3. Update the secret

oc create secret generic htp-secret \
  --from-file htpasswd=/root/temp --dry-run=client -o yaml \
  | oc replace -n openshift-config -f -

4. Delete the identity resource for the manager user

oc delete identity "my_htpasswd_provider:manager"

5. Delete the user resource for the manager user

oc delete user manager

6. Try to log in. It would fail.

oc login -u manager -p rahasia https://api.openshift.podX.io:6443

7. Verify the users and identity

oc get users
oc get identity
oc extract secret/htp-secret -n openshift-config --to -

Daftar Materi