Bug 1276599 - Basic Auth does not work with passwords that contain a colon (:)
Basic Auth does not work with passwords that contain a colon (:)
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jordan Liggitt
weiwei jiang
: NeedsTestCase
Depends On:
Blocks: 1267746
  Show dependency treegraph
Reported: 2015-10-30 05:21 EDT by Josep 'Pep' Turro Mauri
Modified: 2016-10-30 18:54 EDT (History)
5 users (show)

See Also:
Fixed In Version: atomic-openshift-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-23 09:43:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Josep 'Pep' Turro Mauri 2015-10-30 05:21:08 EDT
Description of problem:

"oc login" fails if the user's password contains a colon (":")

Version-Release number of selected component (if applicable):
openshift v3.0.2.0-20-g656dc3e

How reproducible:

Steps to Reproduce:
$ oc login
Authentication required for https://ose-master-63bf3.example.com:8443 (openshift)
Username: joe

type a password that contains a colon, e.g.:  a:b

Actual results:
Error from server: Internal error occurred: unexpected response: 500

In the master logs:
oct 30 04:26:28 ose-master-63bf3.example.com openshift-master[2414]: E1030 04:26:28.871321    2414 empties.go:28] AuthenticationError: Invalid Authorization header

Expected results:
Login successful.

Additional info:
usernames are not allowed to contain a colon, but passwords can:

Comment 1 Josep 'Pep' Turro Mauri 2015-10-30 05:38:16 EDT
Comment 2 Jordan Liggitt 2015-10-30 23:16:24 EDT
https://github.com/openshift/origin/pull/5518 in the merge queue
Comment 3 openshift-github-bot 2015-10-31 12:23:49 EDT
Commit pushed to master at https://github.com/openshift/origin

Handle passwords with colon in basic auth

Split the Basic auth header in only two parts.

Fixes bug 1276599
Comment 5 weiwei jiang 2015-11-09 05:35:13 EST
Checked by devenv_rhel7_2658, and this issue has been fixed, so verify this.

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