Add a credentials provider for Github Azure OIDC#965
Merged
renaudhartert-db merged 1 commit intomainfrom Jul 5, 2024
Merged
Conversation
3 tasks
mgyucht
approved these changes
Jul 5, 2024
tanmay-db
added a commit
that referenced
this pull request
Jul 8, 2024
### Internal Changes * Improve Changelog by grouping changes ([#962](#962)). ### Other Changes * Add ChangelogConfig to Generator struct ([#967](#967)). * Add DataPlane API Support ([#936](#936)). * Add a credentials provider for Github Azure OIDC ([#965](#965)). * Added more error messages for retriable errors (timeouts, etc.) ([#963](#963)). * Parse API Error messages with `int` error codes ([#960](#960)).
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 8, 2024
## 0.43.1 ### Major Changes and Improvements: * Add a credentials provider for Github Azure OIDC ([#965](#965)). * Add DataPlane API Support ([#936](#936)). * Added more error messages for retriable errors (timeouts, etc.) ([#963](#963)). ### Internal Changes * Add ChangelogConfig to Generator struct ([#967](#967)). * Improve Changelog by grouping changes ([#962](#962)). * Parse API Error messages with `int` error codes ([#960](#960)).
This was referenced Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: this PR is a copy of PR #950 which could not be merged because of some unverified commits. Please check PR #950 for the original review and comments.
Changes
This PR adds a
CredentialsProviderto authenticate with Azure from Github workflows.The code is inspired by a similar feature already implemented in the Python SDK. It works as follows:
ACTIONS_ID_TOKEN_REQUEST_URLandACTIONS_ID_TOKEN_REQUEST_TOKENas explained here.Tests
Added a test suite which covers all the added code paths. I've also confirmed in my own Github Action that the code is properly able to authenticate.
Note: I'm not super happy with how errors are compared (i.e. using a prefix) which is a little brittle. A better approach would be to leverage
errors.Asorerrors.Is. However, it is difficult to do that at the moment without adding ad hoc new error types. A longer term solution would probably involve standardizing the package around a set of clearly defined error types shared by all implementations ofCredentialsProviderinconfig. That is out of the scope of this PR though.make testpassingmake fmtapplied