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

MSAL and OIDC support #2308

Closed
wants to merge 26 commits into from
Closed

MSAL and OIDC support #2308

wants to merge 26 commits into from

Conversation

thomas11
Copy link
Contributor

About

This PR contains two related pieces:

  1. Switch the provider from the deprecated ADAL authentication method to the current MSAL method. This is discussed in detail in the document MSAL auth in the Azure Native Provider. However, this document outlines three options for using MSAL, each with drawbacks. Since writing this document I believe I have found a better option that this PR implements: detect the unsupported cli case dynamically and fall back to ADAL in that case.
  2. Enable OIDC for authentication. The actual OIDC implementation is in our dependencies but enabling it was gated behind MSAL. This PR exposes the relevant configuration settings and adds a dedicated test.

Testing

I picked an existing e2e test, keyvault. In general, any e2e test will do since we only want to see that authentication works. However, keyvault has more authentication test coverage than the other tests because it also creates a key vault secret, which is a data plane operation that requires a different token.

I used Go build tags to make this test as oidc. This required moving it into its own file.

In the OIDC test run, we run only this test, unsetting the ARM client secret to make sure we really test OIDC.

Next steps

To fully release OIDC support we need to document it in our user-facing documentation.

I should also document the particular OIDC integration used in testing in our wiki (AD principal, roles, permissions etc.).

thomas11 and others added 26 commits March 17, 2023 11:47
Spike: upgrade hashicorp/go-azure-helpers to 0.40

Unblock Azure auth by using long-lived context

Fix logic bug in getting object id.

Upgrade some more minor dependencies

minor dependency upgrades

Switch back to ADAL but keep the upgrades.

Fix nil pointer bug in getClientConfig
@thomas11 thomas11 closed this Mar 22, 2023
@danielrbradley
Copy link
Member

Replaced with #2320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants