macaroon auth can fail to set username properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
Juju supports 3 ways of logging in:
- username / password
- username / macaroon
- interactive macaroon
In the first 2 cases, the user name is recorded locally in the accounts.yaml file and passed to the Login() request.
In the latter case, used for JAAS controllers with SSO, no username is needed up front - the macaroon obtained from SSO contains the necessary first party caveat. But Juju is not then passing this username to the final Login() request, so Juju interprets it as an anonymous login and access to models etc is restricted.
To reproduce, logout of all controllers and then:
juju status -m canonical-
where <model> is a model you have access to.
The work around for now is to log in first:
juju login canonical-
summary: |
- acaroon auth can fail to set username properly + macaroon auth can fail to set username properly |
Changed in juju: | |
milestone: | 2.8.2 → 2.8.3 |
Changed in juju: | |
milestone: | 2.8.4 → 2.9-beta1 |
Changed in juju: | |
milestone: | 2.9-beta1 → 2.9-rc1 |
Changed in juju: | |
importance: | High → Medium |
milestone: | 2.9-rc1 → none |
importance: | Medium → Low |
Looking into this further, I am not yet sure if there's a bug or not.
If the login macaroon has the username as a first party caveat, which it will do after SSO, then the Juju controller seems to extract the user name from there, rather than an explicit login arg.
I can't test fully against canonical- jimm.jujucharms .com until the jimm-admin utility is fixed to allow my user to be grant read access to a model. Testing without access to a model seems to result in a "no models for you" error which is expected.