Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
174 stars 124 forks source link

Consider creating `ClientAssertionCredential` and implementing `WorkloadIdentityCredential` in terms of it #4905

Closed ahsonkhan closed 1 month ago

ahsonkhan commented 1 year ago

Other languages like .NET and GoLang have this credential. We can start with this being private implementation detail of WIC and turn it to be public once there is a customer need for it in C++.

https://github.com/Azure/azure-sdk-for-net/blob/a932f53e2fc200cee443614a0bf991b02b518055/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs#L18 https://github.com/Azure/azure-sdk-for-go/blob/e7968b534c61da1e38a683e21ac690deb14833c7/sdk/azidentity/client_assertion_credential.go#L26

WIC composing CAC: https://github.com/Azure/azure-sdk-for-go/blob/e7968b534c61da1e38a683e21ac690deb14833c7/sdk/azidentity/workload_identity.go#L28

cc @chlowell

ahsonkhan commented 3 months ago

This is needed for https://github.com/Azure/azure-sdk-for-cpp/issues/4968

sershe-ms commented 2 months ago

Hmm, since #4968 is closed, is it possible to expose this class for compatibility with the C# SDK?

ahsonkhan commented 2 months ago

We are looking for scenarios where customers would need a ClientAssertionCredential, exposed publicly in C++.

Can you please share details on how you'd use it and what your requirements are for using this credential in C++? What's motivating the need for C# compatibility?

sershe-ms commented 2 months ago

We are adding Azure support as a plugin to librdkafka Kafka client library. Some of the users of the library are using federated credentials, not just pure MSI, to have more fine-grained access control (as far as I understand)