-
Notifications
You must be signed in to change notification settings - Fork 78
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
Support workload identity by enabling 'OIDCTokenFile' as credentials source in providerConfig #402
Support workload identity by enabling 'OIDCTokenFile' as credentials source in providerConfig #402
Conversation
Required status checks have been changed, could you please rebase this PR? |
@turkenf Can you check the PR now ? I have added some more instructions to test it. |
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.
LGTM! Though I'd like @ulucinar or @sergenyalcin 's approval before merge as it's been quite a while since I contributed this repo.
Let me trigger an end-to-end test to be sure that we do not break anything. |
/test-examples="examples/resource/resourcegroup.yaml" |
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.
Thanks @asajoshi LGTM!
can we merge it today ? @sergenyalcin |
Description of the changes
Goal -
To enable OIDCTokenFile as providerConfig credential source option.
By doing this, provider can perform CRUD operations on resources without passing any secrets in the providerconfig.
This is related to #94
ProviderConfig example-
Dependancy
This PR holds AUTHENTICATION.md. To document the changes suggested in the current PR, we need to make changes in the AUTHENTICATION.md file.
Purpose
Currently, ProviderConfig only supports secret / managed identities as sources of credentials to authenticate the provider to azure. However, terraform azurerm v0.41 also accepts
oidc_token_file_path
whenuse_oidc
is enabled. If we want to enable authentication using service principle and OpenId connect, the changes in this commit are the simplest way to expose the underlying terraform functionality to do so.Prerequisites to test the functionality-
azure-identity-token
. This can be verified by execing into the pod and checking path/var/run/secrets/azure/tokens
where azure-identity-token holds a oidc token.Fixes #94
I have:
make reviewable test
to ensure this PR is ready for review.make local-deploy
How has this code been tested
Install custom azure provider
xpkg.upbound.io/asajoshi/my-repo:v0.30.0
from this PR , you should build it yourself to test it.Federated Credentials
tab under umi. we also need to associate aContributor
role to be able to create/update/delete resources.azure-identity-token
mounted at path/var/run/secrets/azure/tokens/azure-identity-token
. Make sure that workload identity is enabled on your AKS cluster.More testing scenarios verified-
OidcTokenFilePath
:/var/run/secrets/azure/tokens/azure-identity-token
.OidcTokenFilePath
, meaning this variable should be optional with a default value set to/var/run/secrets/azure/tokens/azure-identity-token