Bug 1276599 - Basic Auth does not work with passwords that contain a colon (:)
Basic Auth does not work with passwords that contain a colon (:)
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
3.0.0
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-3.0.2.905-0.git.0.85d6f88.el7aos
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 09:43:30 EST
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)

  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:
Always

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

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:

http://tools.ietf.org/html/rfc2617#section-2
Comment 1 Josep 'Pep' Turro Mauri 2015-10-30 05:38:16 EDT
https://github.com/openshift/origin/pull/5518
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

https://github.com/openshift/origin/commit/9505cfcd2f76fcf10c37ac10cafc613f2228549d
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.