Using Azure SDK to authenticate via certificateCredential requires parameter filePath to pem cert including private key. This is not desirable in an environment where it is not safe to have pem certs that include private key.
If the user has pem bytes in the variable, he should be able to pass it and authenticate.
One use case is Azure Databricks Environment. User does not want to store the certificate inside a file on a cluster. Instead he can get the certificate from mounted keyvault and use it for authentication.
Because the code is just reading pem bytes from file path, let it also consume pem bytes from user if the user has it.
Using Azure SDK to authenticate via certificateCredential requires parameter filePath to pem cert including private key. This is not desirable in an environment where it is not safe to have pem certs that include private key.
If the user has pem bytes in the variable, he should be able to pass it and authenticate.
One use case is Azure Databricks Environment. User does not want to store the certificate inside a file on a cluster. Instead he can get the certificate from mounted keyvault and use it for authentication.
Because the code is just reading pem bytes from file path, let it also consume pem bytes from user if the user has it.
azure-sdk-for-python/sdk/identity/azure-identity/azure/identity/_credentials/certificate.py
Line 52 in e2cac03