Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.56k stars 2.78k forks source link

[FEATURE REQ][Azure.Core] Please add ability to specify if a client-side feature is being used in User-Agent string #28419

Open seanmcc-msft opened 1 year ago

seanmcc-msft commented 1 year ago

We would like to append the User-Agent strings in the Storage SDKs to indicate if a customer is using client-side encryption. This ask is coming out of an MSRC case where we had a security vulnerability in our client-side encryption, but we were unable to tell which SDK customers were using the feature.

https://github.com/Azure/azure-sdk/issues/5401

annatisch commented 1 year ago

It's possible this is already supported: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py#L239-L244 Is there anything else needed apart from simply being able to append to the UA string? We'd need to check where this method is called though - as this method does no checks and we wouldn't want to append the same thing multiple times. IIRC, client side encryption is only configurable at the client constructor, so it should be easy for that example at least to call this during the client constructor creation of the UA policy in the pipeline.

annatisch commented 1 year ago

CC @jalauzon-msft, @vincenttran-msft