azure-devopsazure-service-fabricazure-keyvaultserviceconnection

Service Fabric, Azure Devops Deployment fails : The specified network password is not correct


I was recently ordered by our IT team to disable the NAT pools on my service fabric cluster due to security risks. The only way I could do this was to deploy a new cluster with all its components.

Because this is a test environment I opt to use a self signed cert without a password for my cluster, the certificate is in my vault and the cluster is up and running.

The issue I have now is when I try to deploy my application from an Azure Devops Release Pipeline I get the following message:

An error occurred attempting to import the certificate. Ensure that your service endpoint is configured properly with a correct certificate value and, if the certificate is password-protected, a valid password. Error message: Exception calling "Import" with "3" argument(s): "The specified network password is not correct.

I generated the self signed certificate in Key Vault, downloaded the certificate and used Powershell to get the Base64 string for the service connection.

Should I create the certificate myself, with a password?


Solution

  • With the direction of the two comments supplied, I ended up generating a certificate on my local machine using the powershell script included with service fabric's local run time.

    A small caveat here is to change the key size in the script to a large key size than the default, because ke vault does not support 1024 keys.

    I then exported the pfx from my user certificates added a password(this is required for the service connection) and impoted the new pfx into my key vault.

    Redeployed my cluster and it worked.