get-cert - exporting the AzureStack root ca

Reading time ~1 minute

Below is just about everything you’ll need to do to get the AzureStacks root certificate. General handy for using the az cli az cli. This Post is written with the User in mind. Not the Admin.

is stumbled across this Microsoft Documentation on exporting a root cert for AzureStack Users. As i did not want to install a Windows VM, i thought there ust be easier way´s

The Windows Way

All you need is

  • a Web Browser
  • a Windows machine
  • openssl ( from WSL, or openSSL )

Download then Cert from the User Portal

use a Windows Machine and point you webrowser to the user Portal, aka https://management.your-region.your-stack.com

make sure you log in

click on the twistlock in the Address Bar.

twistlock

the certificate information should now open:

Point to the root cert.

click on the certificate to open the Cert:

click on it

once the certificate opens, click on certification path:

certification path

make sure you select the Certificate Root, an click on View Certificate:

Point to the root cert.

click on copy file to start the export wizard

copy to file

leave DER encoded X.509 format selected

Select X.509 DER encoded

Click on next and select a filename, e.g. root.cer

Export to file.

Once the file is saved, we can use openssl to convert the DER binary ecoded certificate into a PEM file

Code Snippet

openssl.exe x509 -inform DER  -outform pem -in .\root.cer -out root.pem

The MAC way

Warning: you might consider using/buying a mac when you see this…..

Simply open textedit to the side, and select unformatted text. click on the twistlock in the browser, select the root cert, and move the root cert to the textedit window. holding down the option key will covert the cert into a PEM format :smile:

The ease when using a Mac