-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#6941 from axw/lp1662587-lxd-add-credential-in…
…teractive provider/lxd: add interactive auth-type ## Description of change Add the "interactive" auth-type for LXD, which is used in add-credential for interactively adding a credential for a LXD cloud. Currently we only support generating credentials for local LXD; later we will extend this to support generating credentials for remote, untrusted LXD by prompting the user to verify the certificate fingerprint and enter a trust password. ## QA steps 1. juju add-credential localhost ``` Enter credential name: foo Auth Types interactive* certificate Select auth-type: Loaded client cert/key from "/home/andrew/.config/lxc" Credentials added for cloud localhost. ``` 2. juju bootstrap localhost 3. juju add-user bob 4. juju grant bob add-model 5. lxc launch ubuntu-xenial x 6. lxc file push \`which juju\` x/tmp/juju 7. lxc exec x /tmp/juju register ... 8. lxc exec x /tmp/juju add-model foo ``` ERROR cannot auto-generate credential for remote LXD Until support is added for verifying and authenticating to remote LXD hosts, you must generate the credential by hand, adding the certificate to LXD using the "lxc config trust" command. ``` 9. juju credentials --format=yaml localhost > /tmp/localhost-credentials.yaml 10. lxc file push /tmp/localhost-credentials.yaml x/root/.local/share/juju/credentials.yaml 11. lxc exec x /tmp/juju add-model foo ``` Uploading credential 'localhost/bob/foo' to controller Added 'foo' model on localhost/localhost with credential 'foo' for user 'bob' ``` ## Documentation changes There is a change in workflow, but probably unusual enough that it doesn't need documenting? ## Bug reference Does not fix any bugs, but hopefully alleviates some of the pain caused by https://bugs.launchpad.net/juju/+bug/1662587.
- Loading branch information
Showing
6 changed files
with
219 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.