Browser facing certificate for Shibboleth IdP using the Certificate snap-in in Windows
Earlier versions of the IdP may use jetty.browser.keystore.password
instead of jetty.sslContext.keyStorePassword
Browser facing certificate for Shibboleth IdP using the Certificate snap-in in Windows
This page will take you through creating a browser facing certificate using the certificate snap-in to the Microsoft management Console (MMC) in Windows. This will allow you to create a certificate request (CSR), you then pass this to a Certificate Authority (CA) for signing, import it into the certificate snap-in and then export as PKCS12 file that can be used with Jetty as part of the Shibboleth IdP Windows Installer.
Note: we use idp.example.ac.uk as the FQDN for your Shibboleth IdP in this example. you should replace this with the one you intended to use.
- Add the Certificate Snap-in into MMC for the computer account, further instructions can be found at Add the Certificates Snap-in to an MMC
- Open 'Certificates (Local Computer)', expand 'Personal' and 'Certificates' folders
- Right click, choose 'All Tasks', choose 'Advanced Operations' and 'Create Custom Request'
- On the 'Select Certificate Enrolment Policy' page, choose 'Proceed without enrolment policy'
- On the 'Custom request' page, ensure that 'Template' is set to '(No template) CNG key' and that 'Request format' is set to 'PKCS #10', then hit 'Next'.
- On the 'Certificate Information' page, click the drop down for 'Details' and then 'Properties'
- On the 'General tab', enter the 'Friendly name:' as 'Browser facing certificate for idp.example.ac.uk'
- On the 'Subject' tab, under 'Subject name' select Type: 'Common name' and enter value '
idp.example.ac.uk
', repeat this for each of the follow- Country – C (country) i.e.
GB
- Email – E (a contact e-mail address) e.g.
it@example.ac.uk
- Locality – L (town / city) e.g.
Example City
- Organization – O (Organisation Name) e.g.
Example University
- State – S (County) e.g.
Example
- Country – C (country) i.e.
- On the 'Subject' tab, under 'Alternative name' select Type: 'DNS' and enter value '
idp.example.ac.uk
'. You may wish to repeat this step for any additionalSubjectAlternativeNames
that are required. - On the 'Private Key' tab:
- under 'Cryptographic Service provider' ensure that 'RSA,Microsoft Software Key Storage Provider' is selected
- under 'Key options' set the 'Key size:' to at least '2048', choose 'Make private key exportable'
- under 'Select Hash Algorithm' set the Hash Algorithm to 'SHA256'
- Click OK to close the Certificate Properties dialogue,
- On the 'Certificate Information' page click 'Next'
- Enter a filename for the certificate request e.g.
idp.example.ac.uk
, and ensure that Base64 is now ticked - Take your
idp.example.ac.uk.csr
file and submit to your choosen Certificate Authority. You may wish to use the Jisc Certificate Service - Once you have your Public Key certificate and the Intermediate Public key certificates, you can then import each into MMC. These are sometimes provided as a Zip file, so you may need to unzip those to a suitable location.
- Right Click, choose All Tasks, and then Import. On the first page of the Certificate Import Wizard, ensure Store Location is 'Local Machine' and hit next
- Select the File name of the certificate to import, and hit Next
- On the Certificate Storage, page ensure it is selected to 'Place all certificate in the following store', and Certificate Store: Personal.
- On the 'Completing the Certificate Import Wizard' page hit 'Finish'
- You should now see the Certificate listed.
- Repeat steps - 15-19 to add an intermediate certificates provided by your CA.
- From within MMC, choose your certificate. If you double click on the certificate should tell you that 'You have a private key that corresponds to this certificate'
- Right Click on the certificate, choose 'All Tasks' and 'Export'
- On the Certificate Export Wizard, Choose 'Next'.
- Export Private Key, Choose 'Yes, export the private key'
- Export File Format, should now have chosen 'Personal Information Exchange - PKCS #12 (.PFX), e nsure that 'Include all certificate in the certification path if possible' and 'Export all extended properties' are chosen, and choose Next
- Under 'Security', choose 'Password'. In terms of setting the password at this point you can either;
- Open up
C:\Program Files(x86)\Shibboleth\IdP\jetty-base\start.d\idp.ini
, and use thejetty.sslContext.keyStorePassword
provided (Note the {} are part of the password)
- Open up
jetty.sslContext.keyStorePassword={ABCDEF01-ABCD-0123-4567-89ABCDEF0123}
- Alternatively, enter a new password and at a later stage update
jetty.sslContext.keyStorePassword=
inC:\Program Files(x86)\Shibboleth\IdP\jetty-base\start.d\idp.ini
- Alternatively, enter a new password and at a later stage update
- Under File to Export, Select the file, navigate to
C:\Program Files(x86)\Shibboleth\IdP\credentials
and choose 'Save as Type', and 'All Files (*.*)', enter a suitable filename e.g.idp.example.ac.uk.pfx
and Click Next - Completing the certificate Export Wizard, Click Finish, and on you should have a dialogue to say that 'The Export was successful'
- Open up
C:\Program Files(x86)\Shibboleth\IdP\jetty-base\start.d\idp.ini
and on the linejetty.sslContext.keyStorePassword=
changeidp-userfacing.p12
toidp.example.ac.uk.pfx
- You can now start the Shibboleth IdP. Go to
C:\Program Files(x86)\Shibboleth\ProcRun
and chooseshibd_idpw.exe
and Click Start [If it as already running you may need to hit Start]. - Visit your IdP status page at https://idp.example.ac.uk/idp/status in a Browser. If you are testing without the relevant external DNS records and firewalls in place you might wish to temporarily add an entry to your system hosts file
C:\Windows\System32\drivers\etc\hosts
so that you can test
127.0.0.1 idp.example