-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No controller model access needed for connection with a non-admin user #1003
No controller model access needed for connection with a non-admin user #1003
Conversation
For both model and controller connections, accounts.yaml is required to have both username and password for connection to be established. This is not always true, for example, juju change-user-password actually removes the password from the accounts.yaml file.
Fixes juju#998 ControllerAPIInfoForModels call requires the uuid of the controller model, and if the user doesn't have at least read access, they won't be able to have that, and the update_endpoint call at the end of a regular connection fails.
Thx, @cderici I have the following problem on the last QA step:
PS: question - why do we need the |
updated comment |
I have no idea how that attribute is lost in between my branches, thanks for actually running it so it's caught. Updating now 👍
Yeah we don't need it, I tried a bunch of different things in my local and copy/pasted these steps into the QA from my terminal, so that must've lingered in there by mistake. |
Still have the problems on the last QA step:
|
ups, I forgot to checkout... Looks like everything now works fine:
|
/merge |
#1022 #### Description This brings onto the 3.x track some of the latest fixes from to the 2.9 track. Here're the details: * Fix for #989 from #990 * Fix for #1001 from #1002 * Fix for #998 from #1003 #### QA Steps No QA needed for #990. For 1002 and 1003 please refer to their QA steps. Though they are very related so I'd expect the QA for both of them can be done in one fell swoop. * #1002 * #1003 All CI tests need to pass (there's still some known intermittent ones in there).
#1023 ## What's Changed * Drop use of walrus operator by @freyes in #993 * No controller model access needed for connection with a non-admin user by @cderici in #1003 * Password resolution in connector by @cderici in #1002 * Remove dependency to juju-cli for controller_name by @cderici in #1009 #### Notes & Discussion JUJU-5413
Description
This is a follow up PR, includes changes from #1002. If you're reviewing this and #1002 hasn't landed yet, you might see some additional changes that'll land with #1002. We need those changes to be able to test this change.
ControllerAPIInfoForModels
call inupdate_endpoints
after a controller connection requires theuuid
of the controller model, and if the user doesn't have at least read access, they won't be able to have that, so theupdate_endpoint
call at the end of aregular connection fails.
Fixes #998
QA Steps
We'll need a 2.9 controller, so:
Now we have the admin user on this by default, but we don't wanna use that. Let's create a new user (that doesn't have superuser so it can't read the controller model):
Now let's make a password for this user.
Now let's spawn a pylibjuju repl to test this change with this user (that can't access the
controller
model):Wihtout this change, you'd see the error in #998. With this change the connection should work just fine:
Notes & Discussion
JUJU-5268