1

I am wondering why the saml signed request and response XML attached key.

I saw the signature comes with a certificate?

Shouldn't the certificate already be negotiated ahead of time between SP and IDP?

I am just wondering if the attacker can sign the invaded message with their own private key and give the SP their public key to verify.

Or the certificate on response will be validated to match the already negotiated one? Then why it is necessary/bother to attach the the certificate on each request/response?

Shaozhen Ding
  • 187
  • 1
  • 11

1 Answers1

3

Your reasoning is correct: the certificate, or some unique reference to it like a thumbprint, should already have been negotiated out of band.

There are 2 situations in which it is useful to send the certificate anyhow with the requests:

  1. you've negotiated only the thumbprint or subject/issuer instead of the actual certificate
  2. you are capable of rolling over certificates and both the old and new certificate have been exchanged; then the certificate that is included in the request will prevent the receiver from having to try each key in turn until it finds the current signing key

But I would also argue that a lot of times the certificate is just included because it is the default setting for the SAML software stack used by the sender...

Hans Z.
  • 50,496
  • 12
  • 102
  • 115