-
Notifications
You must be signed in to change notification settings - Fork 51
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
Authenticating via a Service Principal and a Client Certificate tries to authenticate with Managed Identities and times out #609
Comments
Hi @FrancescaRodricks , Thank you for taking time to report this issue! Please share the debug log to help us investigate. Here's how:
|
same problem with version 1.15.0 |
Hi @alexey-ban , are you having the same issue when authenticating with client certificate? |
@ms-henglu We have the same issue with provider version Using:
Results in the error message:
But using the following provider config works. I assume that the credential object for the certificate is not built correctly or is just empty. Even with the correct parameters provided.
|
Hi all, I believe the cause is that the certificate format is not supported in the Azure Go SDK(tracked by Azure/azure-sdk-for-go#22906). If you enable the debug logs by adding this environment variable "TF_LOG=DEBUG", and you encountered the blow error message:
Please try to use below command to export the openssl pkcs12 -certpbe PBE-SHA1-3DES -keypbe PBE-SHA1-3DES -export -macalg sha1 -password pass:"{password}" -out ~/my.pfx -inkey
~/service-principal.key -in ~/service-principal.crt" |
@ms-henglu I will try it out today. Looking into this |
@ms-henglu The new export command is working. Thank you. |
https://github.com/Azure/terraform-provider-azapi/blob/main/docs/guides/service_principal_client_certificate.md#configuring-the-service-principal-in-terraform
I tried to run a similar setup https://github.com/thomast1906/thomasthorntoncloud-examples/blob/master/Terraform-OpenAI-ContentFilter-AzAPI/terraform/main.tf#L38 of code with provider version as below.
Provider version used -
azure/azapi v1.14.0...
And had the following error when trying to create
azapi_resource
.So i tried to set managed identity based auth to false using the
use_msi = false
And ran into the following error
Which indicates that service principal credentials are not being used.
Expected Behaviour - The provider should use the service principal rather that a managed identity
The text was updated successfully, but these errors were encountered: