The following are the steps to delete the user:

  1. Extract the secret data and redirect to a file

    $ oc get secret -n openshift-config
    $ oc extract secret/htpass-secret --to - -n openshift-config > htpasswd.delete
    
    
    OpenShift Delete User
  2. Edit the file and remove the line of the user to be revoked.

    Ansible Installation
  3. Update the secret to remove the user

    $ oc create secret generic htpass-secret --from-file=htpasswd=htpasswd.delete --dry-run -o yaml -n openshift-config | oc replace -f -
    
    Ansible Installation
  4. Remove identity

    $ oc get identity
    $ oc delete identity/my_htpasswd_provider:lsbercasio
    
    Ansible Installation
  5. Remove user

    $ oc get users
    $ oc delete user/username
    
    Ansible Installation