Bug 1778362 - delete users from htpasswd identity provider
Summary: delete users from htpasswd identity provider
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.2.z
Assignee: Andrea Hoffer
QA Contact: pmali
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-30 09:38 UTC by mmariyan
Modified: 2023-03-24 16:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-20 16:39:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description mmariyan 2019-11-30 09:38:39 UTC
Document URL: 

https://docs.openshift.com/container-platform/4.2/authentication/identity_providers/configuring-htpasswd-identity-provider.html

Need to add user delete procedure in the htpasswd identity provider section.


Describe the issue: 

There is no explanation available to delete users in the htpasswd identity provider section.

Suggestions for improvement: 

should add a section for deleting a user.

the worked solution for me below:

Steps to delete user from htpaaswd

#oc get secret htpasswd-6qh84 -ojsonpath={.data.htpasswd} -n openshift-config | base64 -d | tee htpasswd

Remove the entires from the htpasswd file.
$ cat htpasswd
labuser:$xxxxxxxxxxxxxx
mani:$apxxxxxxxx@ <==== remove the user entry

#oc delete user/mani

#oc delete identity/quicklab_htpasswd:mani

#oc create secret generic htpass-secret --from-file=htpasswd --dry-run -o yaml -n openshift-config | oc replace -f -

wait for the oauth pod get restarts then verify.


Additional information:

Comment 1 Andrea Hoffer 2020-03-17 01:27:36 UTC
PR to add/delete users from an HTPasswd IDP: https://github.com/openshift/openshift-docs/pull/20508

Comment 2 Andrea Hoffer 2020-03-31 23:46:48 UTC
Hi @Standa, can you review my PR to see whether this approach to updating users is okay and accurate? I have some TODO's in the source for two questions I had, if you can provide any information there. Thanks!

PR: https://github.com/openshift/openshift-docs/pull/20508
Preview: https://bz-1778362--ocpdocs.netlify.com/openshift-enterprise/latest/authentication/identity_providers/configuring-htpasswd-identity-provider.html#identity-provider-htpasswd-update-users_configuring-htpasswd-identity-provider

Comment 4 Andrea Hoffer 2020-04-13 00:31:01 UTC
PR verified and merged.


Note You need to log in before you can comment on or make changes to this bug.