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

Set SendCertificateChain option in KeyVaultReader to enable SN+I authentication #10179

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

adityapatwardhan
Copy link
Contributor

Summary of the changes (in less than 80 characters):

  • Set the ClientCertificateCredentialOptions with SendCertificateChain when the KeyVaultConfiguration is configured with SendCertificateChain

@adityapatwardhan adityapatwardhan requested a review from a team as a code owner September 10, 2024 22:37
@@ -99,7 +99,19 @@ private SecretClient InitializeClient()
}
else
{
credential = new ClientCertificateCredential(_configuration.TenantId, _configuration.ClientId, _configuration.Certificate);
if (_configuration.SendX5c)
Copy link
Contributor

Choose a reason for hiding this comment

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

@adityapatwardhan
Do you have a use case for this scenario? Otherwise, we're moving to Managed identity. KV reader is less of a priority for us.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PowerShell Gallery is planning to use SN+I. We cannot use Managed Identity for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Could you be able to add unit tests covering the new code path?

@joelverhagen
Copy link
Member

Good point on UT coverage from @erdembayar. This is especially important to assert this behavior is needed by PowerShell Gallery.

Copy link
Member

@joelverhagen joelverhagen left a comment

Choose a reason for hiding this comment

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

UTs, so we can protect regressing this code path your team needs.

joelverhagen
joelverhagen previously approved these changes Sep 12, 2024
@joelverhagen joelverhagen merged commit 08cf2a8 into NuGet:dev Sep 12, 2024
2 checks passed
@adityapatwardhan adityapatwardhan deleted the AddSendX5cToKeyVaultReader branch September 13, 2024 17:11
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.

3 participants