superuser does not have admin over models it created but does not own

Bug #1643076 reported by Marco Ceppi
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Horacio Durán

Bug Description

From IRC:

<justicefries> so if you do:
<justicefries> `juju add-model foo-bar --credential bam --owner admin` while logged in as justicefries
<justicefries> where justicefries is a superuser
<justicefries> doing a `juju grant justicefries admin admin/foo-bar` fails, you have to log in as the model owner.
<justicefries> i think the weird thing is I can create a model for someone else, but then not get access to it.
<marcoceppi> interesting, I'll file a bug see what shakes out from it
<marcoceppi> yeah, superuser seems to not inherit admin of models it controls
<justicefries> should be consistent between the two either way
<justicefries> if its intended, I'd expect add-model --owner shouldn't work for someone else
<marcoceppi> well, if that user does not have "addmodel" or "superuser" it wont
<justicefries> right
<justicefries> 2.0.2
<marcoceppi> yeah, I wonder if this is just an omission of the permission level of superuser
<marcoceppi> where if it doesn't own a model, it really can't see it, despite being the creator (and superuser)

Is this intended by design? If so is there a possibility to allow assignment of grants during add model:

`juju add-model <model> --owner 'someone-else' --admin 'me' --admin 'jon' --read 'foobar'`

Tags: cwr-ci matrix
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.1-beta2
importance: Undecided → High
status: New → Triaged
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.1-beta2 → none
Curtis Hovey (sinzui)
Changed in juju:
milestone: none → 2.1-rc1
Changed in juju:
milestone: 2.1-beta4 → 2.2.0
Cory Johns (johnsca)
tags: added: matrix
tags: added: cwr-ci
Cory Johns (johnsca)
tags: removed: cwr-ci matrix
Revision history for this message
Cory Johns (johnsca) wrote :

The documentation says that "superuser grants a user the same permissions as an administrator and complete control over the deployed environment," and "an administrator can use the grant command to grant a user either read or write access to any model."

This doesn't appear to be true at all. Rather, the superuser is dependent on the model owner to explicitly grant them access. This is also an issue if a user with add-model permission creates a model; the controller superuser cannot even view, much less manage, that model. The model can even become orphaned if the model owner is removed. This also breaks `juju models --all` with the error:

ERROR "" is not a valid tag

tags: added: cwr-ci matrix
Revision history for this message
Anastasia (anastasia-macmood) wrote :

 - ERROR "" is not a valid tag
Is a known issue and is currently being addressed in 2.1 by PR https://github.com/juju/juju/pull/7011

Note that the actual issue described in this report still needs to be addressed.

Revision history for this message
Merlijn Sebrechts (merlijn-sebrechts) wrote :

Bump

We're currently blocked by this issue. Our workaround is to have the superuser own all models, but we would like to change this since it has a bunch of concerns such as security and namespacing.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

I believe granting of the model access to superuser has been fixed in 2.1-rc as part of PR: https://github.com/juju/juju/pull/6967

I confirmed with 2.1.0, I have:
1. bootstrapped;
2. added credential 'bam';
3. added model with owner 'bam';
4. was switched to newly created model as a result of 3;
5. I can list all models:

$ juju models
Controller: mycontroller

Model Cloud/Region Status Machines Cores Access Last connection
controller aws/us-east-1 available 1 1 admin just now
default aws/us-east-1 available 0 - admin 11 minutes ago
foo-bar* aws/us-east-1 available 0 - admin never connected

I am marking this bug as 'Fix Released' in 2.1-rc2.

@Marco Ceppi,
Creating permissions while adding a model is not currently in scope. If you feel strongly about it, I am happy to file a separate bug as Feature Request. It will be put on our Wish list for now.

Changed in juju:
status: Triaged → Fix Released
assignee: nobody → Horacio Durán (hduran-8)
milestone: 2.2.0 → 2.1-rc2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.