SAML Signing And Encryption Keys

Singing SAML requests and encrypting responses ensure secure and verified communication between the Identity Provider (IdP) and Service Provider (SP). By default, Descope generates a private key during tenant creation to sign SAML requests and decrypt SAML responses from the IdP. Descope provides the ability to integrate custom private keys to allow organizations to use their own private keys, offering enhanced flexibility and control over the single sign-on process.

Descope Console

In tenant settings, under the SAML SSO authentication method, a section called "SSO Keys" allows configuring the signing and encryption keys:

Descope SSO SAML keys section


Using Descope's keys

Descope as a Service Provider (SP), signs the SAML request using Descope's private key. By using the signing public certificate, the IdP to verify the validity of the request's signature The Identity Provider (IdP) is capable of consuming and utilizing the public certificates provided through the Service Provider's (SP) metadata URL. In scenarios where manual configuration is preferred, these certificates can be downloaded from the configuration page so they can be manually uploaded to the IdP.

Example for uploading and configuring the certificates in Okta as the IdP:

Okta example for upload public cert section

Using custom keys

When using custom keys, the "Upload Custom Key" expects a PEM certificate file representing a private key. After uploading the private keys and saving the configuration, the public key pairs are updated in the metadata URL or available for download to be used in the IdP.

An example for a PEM file format:

-----BEGIN PRIVATE KEY-----
MIIB1QIBADANBgkqhkiG9w0BAQEFAASCAb8wggG7AgEAAl0DH3YqFv4mzt67RAAm
KqZSY32GtoUqkLXzSJOIew2ofiKx3ojdJvL69pXZLKNoKkKb8RQKyWdhAIkbTEFX
3k8mroXea5NMfB9NAH0AASQ6uoK5XYs7mMubQgu1dhcCAwEAAQJdAjrb+LAUaQe8
+cFTze0UeK48Ow5nxn4wvniriIA9v3vaMGJ0Hl6qkFO1qq76O+uvSehxPHnzBrfs
SXkQ8nScyeGpoTpn0DCnMnFRiY1hAMy6SqVdC4t7UP9u6oCBAi8B+POU6nCyUOnL
FlPVGFoBxSoxC7q7tJytq+xaPfGBN63AT3sdnXm06YAH1uE/1wIvAZVPf+1sDjIP
c4hFNPzIPh/x1M3qDN9eBr6tdPwymuPmpQ1lik/b9ZpMfXGns8ECLwDTVfcci+BF
tyP1i06jq4AUKg1u8E+BTxXs37YBOOOxDvpvCYMiln6eP6SITavvAi8A6n71d8rl
p6by4+uOjZXZA6hpw7zfN7hx1I4MugEZRjPiWI7f5/ZN8bjBdylcwQIvAQp1f9vQ
S+P5ktRlO7vEm10LtKotJ85Rp+le7PX56re+nntKVZFsliKW0yPmWJE=
-----END PRIVATE KEY-----
Was this helpful?

On this page