Extract a Certificate From the Service Provider Metadata in Okta
Last Updated:
Overview
Extract an encryption or signing certificate from a Service Provider (SP) metadata file by copying the certificate string into a text editor and saving it as a PEM file. This process is required when configuring Single Logout (SLO) or encryption for a custom Secure Assertion Markup Language (SAML) application in Okta.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Service Provider (SP) Metadata File
- Custom Secure Assertion Markup Language (SAML) Application
Solution
Single Logout (SLO) Requires a Signature from Both Parties
Secure Assertion Markup Language (SAML) single logout requires a signature on both sides. The party that initiates the logout sends a signed SAML LogoutRequest to the other, and the receiver responds with a signed response. Configuring Single Logout (SLO) requires a signing certificate. The SLO feature allows a user to sign out of an SLO-participating application on their device and end their Okta session.
The Identity Provider (IdP) Performs Encryption During Setup
The Identity Provider (IdP) performs encryption when sending a SAML response to a Service Provider (SP). Because the IdP uses the SP public key, the SP must provide that public key to the IdP during setup. The SP includes this key in the SAML metadata or provides it separately as a standalone certificate.
What are the steps to extract a certificate from the Service Provider metadata file?
Extract the certificate by downloading the metadata file, copying the certificate string, and saving it as a PEM-encoded file in a text editor.
- Download the SP metadata file from the application.
- Create a new file in a text editor and enter the following text exactly as shown:
-----BEGIN CERTIFICATE----- -----END CERTIFICATE----- - Open the downloaded SP metadata file in a text editor.
- Copy the appropriate certificate line from the SP metadata file.
-
Paste the copied line into the blank line between the
-----BEGIN CERTIFICATE-----and-----END CERTIFICATE-----lines in the new file. -
Save the PEM-encoded file.
NOTE: Not all Service Providers have multiple or separate certificates in their metadata file. Sometimes, only one certificate is visible. For further clarification, contact the Service Provider support team.
