Set Up SSL Keys for SAML 2.0
To use YouTrack as the Identity Provider with SAML, you must encrypt the connection between YouTrack and a Service Provider. You need to generate an SSL key and a certificate, pack them in a PKCS12 format file, and upload it to YouTrack.
There are several tools that let you create SSL keys and certificates in PKCS12 format. We describe how to create SSL key with the OpenSSL toolkit.
Create an SSL Key with the OpenSSL
- Generate a new 2048 bit RSA key with password protection:
openssl genrsa -des3 -out YouTrack_SAML.key 2048
- Generate a certificate request for the generated key:
openssl req -new -key YouTrack_SAML.key -out YouTrack_SAML.csr
- Generate a certificate:
openssl x509 -req -days 365 -in YouTrack_SAML.csr -signkey YouTrack_SAML.key -out YouTrack_SAML.crt
- Package the key and the certificate in a PKCS12 file:
openssl pkcs12 -export -out YouTrack_SAML.p12 -inkey YouTrack_SAML.key -in YouTrack_SAML.crt -certfile YouTrack_SAML.crt
Result: You have a PKCS12 key store (
YouTrack_SAML.p12 in the example) that is ready for upload to YouTrack.
Upload and Set up the PKCS12 Key Store in YouTrack
- In the Server Settings section of the Administration menu, select .
- Click the Import Key Store button.
- In the sidebar, select the created
.p12key file, provide the password, and upload the key store to YouTrack.
- In the Access Management section of the Administration menu, select .
- Select the key store in the SSL Key drop-down list on the Settings tab.
YouTrack encrypts the connection with SAML Service Providers using the selected SSL Key. YouTrack also extracts and displays the SHA-256, SHA-1, and MD-5 Fingerprints of the certificate that is packed into the selected key store.
A service provider may require any of these fingerprints to enable and configure SAML2.0 on its side.