Skip to content
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

feat: add credential_type plugin config #157

Merged
merged 6 commits into from
Apr 11, 2024
Merged

Conversation

JeyJeyGao
Copy link
Collaborator

@JeyJeyGao JeyJeyGao commented Mar 28, 2024

Feat:

  • added creential_type plugin config key
  • supported credential type: default, environment, managedidentity, azurecli

Test:

  • unit test cases
  • e2e test cases
  • tested environment credential, workload identity credential, managed identity in pod of AKS
  • tested Azure cli credential locally

Resolves #146 #154
Signed-off-by: Junjie Gao [email protected]

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.65%. Comparing base (b838f3d) to head (b6f82d6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   91.22%   91.65%   +0.43%     
==========================================
  Files          16       17       +1     
  Lines         581      599      +18     
  Branches       72       74       +2     
==========================================
+ Hits          530      549      +19     
+ Misses         38       37       -1     
  Partials       13       13              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Junjie Gao <[email protected]>
@JeyJeyGao JeyJeyGao force-pushed the feat/credential_type branch from 5578763 to 6135d88 Compare March 28, 2024 06:33
@JeyJeyGao JeyJeyGao requested a review from shizhMSFT March 28, 2024 08:35
@Two-Hearts
Copy link
Collaborator

Two-Hearts commented Mar 29, 2024

So before this PR, i.e., before adding plugin config credential_type, how does a Notation user specify their credential_type?

@JeyJeyGao
Copy link
Collaborator Author

So before this PR, i.e., before adding plugin config credential_type, how does a Notation user specify their credential_type?

through this flag: --plugin-config credential_type=xxxx

@Two-Hearts
Copy link
Collaborator

I'm a bit confused, added credential_type plugin config key means this key is added in this PR right? My question is what's the behavior BEFORE this PR?

@JeyJeyGao
Copy link
Collaborator Author

I'm a bit confused, added credential_type plugin config key means this key is added in this PR right? My question is what's the behavior BEFORE this PR?

Before this PR, users could not set credential_type; it was chosen automatically by the library.
https://learn.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet

@shizhMSFT shizhMSFT requested a review from Two-Hearts April 2, 2024 11:56
Copy link
Collaborator

@Two-Hearts Two-Hearts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is the plugin config credential_type documented anywhere?

Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
@JeyJeyGao
Copy link
Collaborator Author

LGTM. Is the plugin config credential_type documented anywhere?

Added documents.

@JeyJeyGao JeyJeyGao requested a review from shizhMSFT April 10, 2024 07:07
@JeyJeyGao JeyJeyGao merged commit 53bdb04 into main Apr 11, 2024
11 checks passed
@JeyJeyGao JeyJeyGao deleted the feat/credential_type branch April 11, 2024 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

authentication issues
4 participants