juju add-credential does not validate credentials, but bootstrap does
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
How to reproduce:
$ juju version
2.3-beta3-
$ juju add-cloud
Cloud Types
maas
manual
openstack
oracle
vsphere
Select cloud type: maas
Enter a name for your maas cloud: my-maas
Enter the API endpoint url: http://
Cloud "my-maas" successfully added
You may bootstrap with 'juju bootstrap my-maas'
$ juju add-credential my-maas
Enter credential name: my-maas-credential
Using auth-type "oauth1".
Enter maas-oauth: <<<- enter invalid credential
Credentials added for cloud my-maas.
$ juju bootstrap my-maas
ERROR Authorization Error: Invalid API key.
So, it would be nice if Juju verified the credential at the end of `juju add-credential` similar with verifying endpoints at the end of `juju add-cloud`.
tags: | added: cpe-onsite |
Changed in juju: | |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | added: credentials |
Changed in juju: | |
assignee: | nobody → Anastasia (anastasia-macmood) |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | none → 2.8.1 |
Changed in juju: | |
milestone: | 2.8.1 → 2.8-next |
'juju add-credential' operates on local cache only. It does not really matter to Juju if it is valid, besides there is no guarantee that Juju has access to the cloud to verify the credential before we have a bootstrapped system. There is no strict limitations on user - credential can be added locally before a cloud is, for example.
However, the validation will definitely take place when a credential will be in used. For ***local*** (client side) credentials, this will take place when a user either bootstraps or adds a new model with that credential. For ***remote** (server side) credential that will happen during the upload.