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

provider/azure: update auth-types #6249

Merged
merged 1 commit into from Sep 15, 2016
Merged

Conversation

axw
Copy link
Contributor

@axw 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.

@axw
Copy link
Contributor Author

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

Copy link
Contributor

@natefinch natefinch left a comment

Choose a reason for hiding this comment

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

LGTM, with a couple small suggestions.

credAttrAppPassword = "application-password"

clientCredentialsAuthType cloud.AuthType = "service-principal-secret"
deviceCodeAuthType cloud.AuthType = "interactive"
Copy link
Contributor

@natefinch natefinch Sep 15, 2016

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"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.

label := in.Label
in = cloud.NewCredential(clientCredentialsAuthType, attrs)
in.Label = label
fallthrough
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

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.
@axw
Copy link
Contributor Author

axw commented Sep 15, 2016

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Sep 15, 2016

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

@jujubot
Copy link
Collaborator

jujubot commented Sep 15, 2016

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

@axw
Copy link
Contributor Author

axw commented Sep 15, 2016

$$merge$$

@jujubot
Copy link
Collaborator

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
Labels
None yet
Projects
None yet
3 participants