-1

I've created a power shell script that sets the SSL based on a provided PFX file.

Using the VSTS pipeline, what is the recommended way of passing PFX file to the script?

  • Including PFX file in a solution

  • getting the PFX file path on a target environment (contains dependency, assuming that PFX file is already placed on target environment)

any other solution...?

armache
  • 596
  • 5
  • 22
  • It's just a file. I'm assuming you're using `Import-PfxCertificate` – Maximilian Burszley May 08 '18 at 15:28
  • As long as the certificate is considered a sensitive data, you might want to keep it in the Azure Key Vault. Here is another similar SO thread about it: https://stackoverflow.com/questions/33728213/how-to-serialize-and-deserialize-a-pfx-certificate-in-azure-key-vault. Also, quick googling brings a more solid article on the topic: http://www.rahulpnath.com/blog/pfx-certificate-in-azure-key-vault/ – Yan Sklyarenko May 08 '18 at 15:30
  • thanks for responses.... but I am not using Azure – armache May 08 '18 at 15:46
  • For the person who 'disliked' the question - based on my research I found 2 solutions. First - raises security concerns and second - adds dependency. Hence I am asking the community which of the specified options to be preferred or if there is any other solution. I hope you will think twice before before clicking on that button next time. – armache May 08 '18 at 16:02

1 Answers1

0

The common way to pass authentication to the script is using option 1 (Including PFX file in a solution) as you listed.

After adding the pfx file into your solution, you can import certificates and private keys by import-PfxCertificate.

Detail usage and examples of Import-PfxCertificate, you can refer this document.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74