Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
When you're done with this primer, read the topic on Shibboleth IdP Keys and Certificates.

Terminology

  • KeyDescriptor : An <md:KeyDescriptor> element in SAML metadataKeyDescriptor of type “signing”: An <md:KeyDescriptor use=”signing”> element in ”signing”> element in SAML metadata

  • KeyDescriptor of type “encryption”: An <md:KeyDescriptor use=”encryption”> element in element in SAML metadata

  • Signing certificate: A public key certificate bound to a KeyDescriptor of type “signing” in SAML metadata. A signing certificate is indistinguishable from a back-channel TLS certificate in metadata.

  • Back-channel TLS certificate: A public key certificate bound to a KeyDescriptor of type “signing” in SAML metadata. A back-channel TLS certificate is indistinguishable from a signing certificate in metadata.

  • Encryption certificate: A public key certificate bound to a KeyDescriptor of type “encryption” in SAML metadata.

  • Credential: A private key plus its corresponding public key certificate.

  • Signing credential: A key pair used for XML Signature. The public key is bound to a signing certificate in metadata. The private key is securely held by the party that signs the XML message.

  • Back-channel TLS credential: A key pair used for back-channel TLS authentication. The public key is bound to a back-channel TLS certificate in metadata. The private key is securely held by the party to be authenticated.

  • Encryption credential: A key pair used for XML Encryption. The public key is bound to an encryption certificate in metadata. The private key is securely held by the party that decrypts the XML message.

...

Code Block
languagebash
titleCreate a private key and certificate
# change these values as needed
$ OUT_DIR=/tmp/credentials
$ LIFETIME=3650 # 10 yrs

# normally, only a back-channel TLS certificate needs a subject name
# but it doesn't hurt to add this to a signing or encryption certificate
$ SUBJECT_NAME='/CN=hostname.example.org'
$ 
LIFETIME=3650 # 10 yrs

# create a 2048-bit key with long-lived, self-signed certificate
$ /usr/bin/openssl req -new -x509 -nodes \
    -newkey rsa:2048 -keyout $OUT_DIR/key.pem \
    -days $LIFETIME -subj $SUBJECT_NAME -out $OUT_DIR/cert.pem

...

Finally, bind the above certificate to an <md:KeyDescriptor>KeyDescriptor use="signing"> element in SAML metadata:

Code Block
languagexml
titleA KeyDescriptor of type "signing"
<md:KeyDescriptor use=”signing”>
  <ds:KeyInfo>
    <ds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gQRiE3Y2r7kChNE5dju9Okoz+ZdD3K5ScbfnwQKgwgNP/x7WEiVX31h5lB7DCMO2
/rlpQxRvThyojO1B3PyyTnU6IGdRnQ==
      </ds:X509Certificate>
    </ds:X509Data>
  </ds:KeyInfo>
</md:KeyDescriptor>

The above certificate above is either a signing certificate or a back-channel TLS certificate (or both).