Skip to content
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

[JUJU-1481] Check superuser for ssh access. #14351

Merged

Conversation

juanmanuel-tirado
Copy link
Contributor

Be sure superusers can access all the models inside a controller.

Checklist

NA

QA steps

juju bootstrap lxd test --verbose
juju add-model modela
juju add-machine
juju ssh 0

Now you're into the machine 0. Exit, create a new user, logout, register the user bob, login using bob, and try to ssh again.

juju add-user bob --controller test
juju grant bob superuser --controller test
juju change-user-password admin
juju logout
juju register <put here the provided string>
juju login -u bob
juju ssh 0 

Documentation changes

NA

Bug reference

https://bugs.launchpad.net/juju/+bug/1982337

Copy link
Member

@wallyworld wallyworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but needs a test as well

apiserver/facades/client/sshclient/facade.go Outdated Show resolved Hide resolved
@juanmanuel-tirado juanmanuel-tirado changed the title Check superuser for ssh access. [JUJU-1481] Check superuser for ssh access. Jul 21, 2022
Copy link
Member

@wallyworld wallyworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing a unit test

apiserver/facades/client/sshclient/register.go Outdated Show resolved Hide resolved
apiserver/facades/client/sshclient/facade_test.go Outdated Show resolved Hide resolved
@juanmanuel-tirado
Copy link
Contributor Author

/build

Copy link
Member

@wallyworld wallyworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice to see this fixed

apiserver/facades/client/sshclient/facade_test.go Outdated Show resolved Hide resolved
@juanmanuel-tirado
Copy link
Contributor Author

/merge

@jujubot jujubot merged commit 2f01bfb into juju:2.9 Jul 22, 2022
@juanmanuel-tirado juanmanuel-tirado deleted the JUJU-1481_allow_superusers_access_models branch July 22, 2022 18:53
@ycliuhw ycliuhw mentioned this pull request Jul 28, 2022
jujubot added a commit that referenced this pull request Jul 28, 2022
#14387

```
Conflicts:
 cmd/juju/waitfor/api/doc.go
 provider/rackspace/environ_test.go
 service/snap/snap.go
 tests/suites/deploy/deploy_charms.sh
```

- #14309
- #14323
- #14357
- #14351
- #14367
- #14317
- #14366
- #14373
- #14361
- #14376
- #14380
- #14378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants