juju 1.25.5: Juju Login with invalid user tag should return an error code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Won't Fix
|
Medium
|
Unassigned | ||
juju-core |
Won't Fix
|
Medium
|
Unassigned | ||
1.25 |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
When trying to login with an invalid AuthTag in a request. Juju 1.25.5 should return CodeUnauthorized error string. It returns the proper error code/message when password is invalid or when the authtag contains the prefix 'user-' . But, it doesn't send the proper error code when the authtag doesn't start with 'user-'.
Here's a copy of the requests and responses from landscape to the juju API
# Case 1: valid response on bogus Authtag with user- prefix
Landscape send payload {'Request': 'Login', 'Params': {'Password': u'95277d93d98d0
# Proper error response from juju
Landscape received payload {u'ErrorCode': u'unauthorized access', u'Response': {}, u'Error': u'invalid entity name or password'}
# Case 2: valid response on bogus password
Landscape send payload {'Request': 'Login', 'Params': {'Password': u'BOGUS', 'AuthTag': u'user-admin'}, 'Type': 'Admin', 'RequestId': 1}
Landscape received payload {u'ErrorCode': u'unauthorized access', u'Response': {}, u'Error': u'invalid entity name or password'}
# Case 3 invalid response on bogus Authtag withount 'user-' prefix
Landscape send payload {'Request': 'Login', 'Params': {'Password': u'95277d93d98d0
Landscape received payload {u'Response': {}, u'Error': u'"useradmin" is not a valid tag'}
Note no ErrorCode and non distinct error message given we are in the middle of a Login request.
affects: | juju-core → juju |
Changed in juju-core: | |
importance: | Undecided → Medium |
status: | New → Won't Fix |
If the auth tag doesn't contain the previx 'user-', it isn't a valid tag and the login request is malformed, so I'm not sure I agree that it should return 'invalid entity name or password'?
Others may have a different opinion, so I'll ask.