-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[6012]Update auth.go to support azure workload identity on AKS pod #6014
[6012]Update auth.go to support azure workload identity on AKS pod #6014
Conversation
plugins/rest/auth.go
Outdated
@@ -340,6 +341,14 @@ func (ap *oauth2ClientCredentialsAuthPlugin) requestToken(ctx context.Context) ( | |||
if ap.ClientID != "" { | |||
body.Add("client_id", ap.ClientID) | |||
} | |||
} else if ap.ClientAssertionFile != "" { | |||
body.Add("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add a ClientAssertionType
field to the plugin struct and default it to urn:ietf:params:oauth:client-assertion-type:jwt-bearer
. Also a ClientAssertion
field to set the value directly and not a file path would be helpful too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will push an update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will push an update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashutosh-narkar could you point me which test case is still failing? I couldn't find the failed test method
@superff this seems like a good start. Please also add test cases that exercise the new functionality. |
Sounds good |
1. Added the default value for client_assertion_type 2. Update the validation of client_credential Signed-off-by: Fred Feng <[email protected]>
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Sign off by: Fred Feng<[email protected]>
Fix for loop Sign off by: Fred Feng<[email protected]>
Go lint Sign off by: Fred Feng<[email protected]>
…f/opa into dev/feat/workloadidentity
Previously if a data file was removed those changes would not be reflected on the store and OPA would continue using old data to run the test. This change attempts to fix that. Fixes: open-policy-agent#5986 Signed-off-by: boranx <[email protected]> Signed-off-by: Fred Feng <[email protected]>
Signed-off-by: Fred Feng <[email protected]>
Signed-off-by: Fred Feng <[email protected]>
1. Added the default value for client_assertion_type 2. Update the validation of client_credential Signed-off-by: Fred Feng <[email protected]>
Sign off by: Fred Feng<[email protected]> Signed-off-by: Fred Feng <[email protected]>
Fix for loop Sign off by: Fred Feng<[email protected]> Signed-off-by: Fred Feng <[email protected]>
Go lint Sign off by: Fred Feng<[email protected]> Signed-off-by: Fred Feng <[email protected]>
) Signed-off-by: Charlie Egan <[email protected]> Signed-off-by: Fred Feng <[email protected]>
* Update awesome opa logo Signed-off-by: Charlie Egan <[email protected]> * Add awesome-opa to integrations list Signed-off-by: Charlie Egan <[email protected]> --------- Signed-off-by: Charlie Egan <[email protected]> Signed-off-by: Fred Feng <[email protected]>
Concurrent evaluation of the http.send builtin for the same object can sometimes result in the HTTP headers map being concurrently accessed. This can happen for example when a key already present in the inter-query cache needs to be revalidated and multiple routines may access the HTTP headers at the same time resulting in a race. This change adds a new Clone method to cache interface. The idea is to give each routine its own copy of the cached object which would mean it has a copy of the headers map and thus should be able to avoid any sync issues. Signed-off-by: Ashutosh Narkar <[email protected]> Signed-off-by: Fred Feng <[email protected]>
Also update project description to match styra.com copy Signed-off-by: Charlie Egan <[email protected]> Signed-off-by: Fred Feng <[email protected]>
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Fred Feng <[email protected]>
…f/opa into dev/feat/workloadidentity
Signed-off-by: Fred Feng <[email protected]>
Why the changes in this PR are needed?
To support Azure AD workload identity ,
in order to get a token from Azure AD with workload identity
the code needs to fetch the client_assertion token from a file generated by K8s service account
https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow#third-case-access-token-request-with-a-federated-credential
sample token request
What are the changes in this PR?
Notes to assist PR review:
Further comments: