provider/azure: update auth-types #6249

Merged
merged 1 commit into from Sep 15, 2016

Conversation

Projects
None yet
3 participants
Member

axw commented Sep 15, 2016

We introduces two new auth-types, and deprecate
use of "userpass", for Azure. The userpass auth-type
is superseded by service-principal-secret, which is
identical except that it does not include the
tenant-id field. There is a new "interactive"
auth-type which is defined, but not yet supported.

If a user uses "userpass", they will receive a
warning explaining that it is deprecated, and what
they need to do to migrate. The credential will
continue to work, we'll just ignore the tenant-id.

Member

axw commented Sep 15, 2016

QA

  1. bootstrap azure with beta18
  2. destroy-controller with this branch
  3. add-credential, given choice of service-principal-secret and userpass; service-principal-secret is the default (for now)
  4. bootstrap azure with service-principal-secret auth-type credential

LGTM, with a couple small suggestions.

provider/azure/credentials.go
credAttrAppPassword = "application-password"
+
+ clientCredentialsAuthType cloud.AuthType = "service-principal-secret"
+ deviceCodeAuthType cloud.AuthType = "interactive"
@natefinch

natefinch Sep 15, 2016

Contributor

deviceCodeAuthType? I don't understand how that relates to interactive. Maybe a comment here would be appropriate.

@axw

axw Sep 15, 2016

Member

"device code" and "client credentials" are the OAuth terms. I gave them names that would be more meaningful to a user. Added comments to the constants.

provider/azure/credentials.go
+ label := in.Label
+ in = cloud.NewCredential(clientCredentialsAuthType, attrs)
+ in.Label = label
+ fallthrough
@natefinch

natefinch Sep 15, 2016

Contributor

fallthrough seems extraneous here? Why not just return in, nil?

@axw

axw Sep 15, 2016

Member

Yeah, I was thinking we might need to do something for the resultant auth-type. I don't think we ever will, so updated.

provider/azure: update auth-types
We introduces two new auth-types, and deprecate
use of "userpass", for Azure. The userpass auth-type
is superseded by service-principal-secret, which is
identical except that it does not include the
tenant-id field. There is a new "interactive"
auth-type which is defined, but not yet supported.

If a user uses "userpass", they will receive a
warning explaining that it is deprecated, and what
they need to do to migrate. The credential will
continue to work, we'll just ignore the tenant-id.
Member

axw commented Sep 15, 2016

$$merge$$

Contributor

jujubot commented Sep 15, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Sep 15, 2016

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/9235

Member

axw commented Sep 15, 2016

$$merge$$

Contributor

jujubot commented Sep 15, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit ceeafb3 into juju:master Sep 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment