Skip to content

feat: Adding support for OIDC Token in Azure plugin#12736

Merged
kodiakhq[bot] merged 5 commits intocloudquery:mainfrom
joytandon17:add-cognito-support
Aug 9, 2023
Merged

feat: Adding support for OIDC Token in Azure plugin#12736
kodiakhq[bot] merged 5 commits intocloudquery:mainfrom
joytandon17:add-cognito-support

Conversation

@joytandon17
Copy link
Copy Markdown
Contributor

This PR is created to support OIDC Token in Azure plugin. This PR would enable Azure plugin to be used without AZURE_CLIENT_SECRET. This follows principle of Azure AD workload identity federation with AWS.

@cq-bot cq-bot added the azure label Aug 2, 2023
@joytandon17 joytandon17 changed the title Adding support for OIDC Token in Azure plugin feat(azure): Adding support for OIDC Token in Azure plugin Aug 2, 2023
@candiduslynx candiduslynx self-requested a review August 2, 2023 18:14
@joytandon17 joytandon17 changed the title feat(azure): Adding support for OIDC Token in Azure plugin feat: Adding support for OIDC Token in Azure plugin Aug 2, 2023
@candiduslynx
Copy link
Copy Markdown
Contributor

Hi @joytandon17!

Shouldn't this already work with the current code given that the default creds will attempt to use OIDC based on the env variables set?
See https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#-option-2-use-workload-identity

@joytandon17
Copy link
Copy Markdown
Contributor Author

joytandon17 commented Aug 3, 2023

Hi @joytandon17!

Shouldn't this already work with the current code given that the default creds will attempt to use OIDC based on the env variables set? See https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#-option-2-use-workload-identity

Hi @candiduslynx I think it only supports MSI(Managed Service Identity) Token which is from Azure itself, This PR would enable to use OIDC token(I think for which we need to use this function NewClientAssertionCredential) which is not generated from Azure but for example AWS Cognito, Please see this document
https://blog.identitydigest.com/azuread-federate-aws/

@hermanschaaf
Copy link
Copy Markdown
Contributor

hermanschaaf commented Aug 8, 2023

Hi @joytandon17 👋 Thanks for this PR! I think it makes sense from the perspective of supporting a new feature.

I'd like to request one or two changes if you don't mind:

Let me know if that makes sense and if we can help in any way!

@joytandon17
Copy link
Copy Markdown
Contributor Author

Hi @joytandon17 👋 Thanks for this PR! I think it makes sense from the perspective of supporting a new feature.

I'd like to request one or two changes if you don't mind:

Let me know if that makes sense and if we can help in any way!

Hi @hermanschaaf, Thanks for the review, Will do the required changes.

@joytandon17 joytandon17 requested a review from disq as a code owner August 8, 2023 19:12
@joytandon17 joytandon17 requested a review from a team August 8, 2023 19:12
@cq-bot cq-bot added aws labels Aug 8, 2023
@joytandon17 joytandon17 marked this pull request as draft August 8, 2023 19:13
@joytandon17 joytandon17 force-pushed the add-cognito-support branch from 2f8eb6d to 49fc73e Compare August 8, 2023 19:40
@cq-bot cq-bot removed aws labels Aug 8, 2023
@joytandon17
Copy link
Copy Markdown
Contributor Author

@hermanschaaf can you please review the PR?
Also please ignore the tags added and removed by cqbot, I committed(by mistake) after merging main to my PR with some issues hence all the commits of main were showing here so I had to force push to previous commit to fix that.

@hermanschaaf
Copy link
Copy Markdown
Contributor

Thanks for the contribution @joytandon17!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants