Bug 1276599 - Basic Auth does not work with passwords that contain a colon (:)
Summary: Basic Auth does not work with passwords that contain a colon (:)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jordan Liggitt
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks: 1267746
TreeView+ depends on / blocked
 
Reported: 2015-10-30 09:21 UTC by Josep 'Pep' Turro Mauri
Modified: 2020-04-24 12:22 UTC (History)
6 users (show)

Fixed In Version: atomic-openshift-3.0.2.905-0.git.0.85d6f88.el7aos
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 14:43:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Josep 'Pep' Turro Mauri 2015-10-30 09:21:08 UTC
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 09:38:16 UTC
https://github.com/openshift/origin/pull/5518

Comment 2 Jordan Liggitt 2015-10-31 03:16:24 UTC
https://github.com/openshift/origin/pull/5518 in the merge queue

Comment 3 openshift-github-bot 2015-10-31 16:23:49 UTC
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 10:35:13 UTC
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.