Open mawasile opened 3 months ago
With a bit digging in, it turns out there isn't a one for all existing Go module to support workload identity fedoration OIDC auth for now. The most comprehensive one I found is https://pkg.go.dev/golang.org/x/oauth2@v0.22.0/google/externalaccount, but it doesn't support Azure, e.g., as it hardcodedthe grant type to be urn:ietf:params:oauth:grant-type:token-exchange
, while Azure AD only supports client_credential
.
On the other hand, as the STS is short lived token, it might be possible to just use the restful_operation
resource to get that token in CI like Github?
I've successfully construct a config to show case how to retrieve and use the Azure access token from a Github action:
thanks, let me try that out in out use case, but if that works I would take that as a ok workaround.
The provider should support OIDC authentication so that we can call endpoints from the providers inside Github pipelines (ideally it should work in a generic way that any OIDC provider should work)
Example code: