You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,6 +251,31 @@ class SamlController < ApplicationController
251
251
end
252
252
end
253
253
```
254
+
255
+
256
+
## Signature validation
257
+
258
+
On the ruby-saml toolkit there are different ways to validate the signature of the SAMLResponse:
259
+
- You can provide the IdP x509 public certificate at the 'idp_cert' setting.
260
+
- You can provide the IdP x509 public certificate in fingerprint format using the 'idp_cert_fingerprint' setting parameter and additionally the 'idp_cert_fingerprint_algorithm' parameter.
261
+
262
+
When validating the signature of redirect binding, the fingerprint is useless and the the certficate of the IdP is required in order to execute the validation.
263
+
You can pass the option :relax_signature_validation to SloLogoutrequest and Logoutresponse if want to avoid signature validation if no certificate of the IdP is provided.
264
+
265
+
In some scenarios the IdP uses different certificates for signing/encryption, or is under key rollover phase and more than one certificate is published on IdP metadata.
266
+
267
+
In order to handle that the toolkit offers the 'idp_cert_multi' parameter.
268
+
When used, 'idp_cert' and 'idp_cert_fingerprint' values are ignored.
269
+
270
+
That 'idp_cert_multi' must be a Hash as follows:
271
+
{
272
+
:signing => [],
273
+
:encryption => []
274
+
}
275
+
276
+
And on 'signing' and 'encryption' arrays, add the different IdP x509 public certificates published on the IdP metadata.
277
+
278
+
254
279
## Metadata Based Configuration
255
280
256
281
The method above requires a little extra work to manually specify attributes about the IdP. (And your SP application) There's an easier method -- use a metadata exchange. Metadata is just an XML file that defines the capabilities of both the IdP and the SP application. It also contains the X.509 public
0 commit comments