Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1326319 - oc delete user makes user unable to log in again
oc delete user makes user unable to log in again
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Auth (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Jordan Liggitt
weiwei jiang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-12 08:08 EDT by Evgheni Dereveanchin
Modified: 2016-10-30 18:55 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 12:35:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1064 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 3.2 security, bug fix, and enhancement update 2016-05-12 16:19:17 EDT

  None (edit)
Description Evgheni Dereveanchin 2016-04-12 08:08:58 EDT
Description of problem:
issuing "oc delete user" causes the username to be invalid forever. When attempting to log in, an error pops up instead of creating a fresh user with no permissions

Version-Release number of selected component (if applicable):
3.1.1

How reproducible:
Always

Steps to Reproduce:
1. simple htpasswd setup (works with other auth providers as well)
2. create a user
htpasswd /etc/origin/openshift-htpasswd deleteme
3. log in as deleteme into the WebUI
4. log out
5. delete user
oc delete user deleteme
oc delete group deleteme
6. try to log into the WebUI again

Actual results:
An unknown error has occurred. Please try again.

Expected results:
User logs in and a fresh profile is assigned

Additional info:

error on Master:

Apr 12 14:00:42 master.demo.lan atomic-openshift-master[28137]: E0412 14:00:42.972098 28137 login.go:141] Unable to authenticate password: Error creating or updating mapping for: &api.DefaultUserIdentityInfo{ProviderName:"my_htpasswd_provider", ProviderUserName:"deleteme", Extra:map[string]string{}} due to users "deleteme" not found
Comment 1 Jordan Liggitt 2016-04-12 08:32:23 EDT
You need to remove the identity as well. Deleting just the user leaves the identity in place referencing a user that no longer exists.
Comment 3 Jordan Liggitt 2016-04-12 10:10:21 EDT
The name of the identity is a combination of the identity provider name (as configured in the master-config.yaml) and the provider user name.

In the example above, the identity name would be "my_htpasswd_provider:deleteme"
Comment 4 Evgheni Dereveanchin 2016-04-12 10:13:37 EDT
Thanks, that works. I think we need to document this properly to avoid confusion on what has to be removed and what "oc delete user" is actually good for if it does not remove the user completely.
Comment 5 weiwei jiang 2016-04-12 23:31:59 EDT
Since the failed login is by design, so verify this.
Comment 6 Evgheni Dereveanchin 2016-04-13 02:13:35 EDT
If this is by design - the "An unknown error has occurred. Please try again." message should not appear in the UI and E0412 should not appear in logs. This must all be handled properly.
Comment 7 Jordan Liggitt 2016-04-13 02:31:43 EDT
We intentionally do not provide details about internal user configuration to unauthenticated users. We can improve the server log message.
Comment 9 errata-xmlrpc 2016-05-12 12:35:55 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2016:1064

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