Skip to content

Commit 5cf47be

Browse files
committed
Deprecate idp_cert_fingerprint and idp_cert_fingerprint_algorithm
1 parent cd9a6f0 commit 5cf47be

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -239,20 +239,21 @@ end
239239

240240
## Signature Validation
241241

242-
Ruby SAML allows different ways to validate the signature of the SAMLResponse:
243-
- You can provide the IdP X.509 public certificate at the `idp_cert` setting.
244-
- You can provide the IdP X.509 public certificate in fingerprint format using the
245-
`idp_cert_fingerprint` setting parameter and additionally the `idp_cert_fingerprint_algorithm` parameter.
246-
247-
When validating the signature of redirect binding, the fingerprint is useless and the certificate
248-
of the IdP is required in order to execute the validation. You can pass the option
249-
`:relax_signature_validation` to `SloLogoutrequest` and `Logoutresponse` if want to avoid signature
250-
validation if no certificate of the IdP is provided.
251-
252-
In production also we highly recommend to register on the settings the IdP certificate instead
253-
of using the fingerprint method. The fingerprint, is a hash, so at the end is open to a collision
254-
attack that can end on a signature validation bypass. Other SAML toolkits deprecated that mechanism,
255-
we maintain it for compatibility and also to be used on test environment.
242+
Ruby SAML allows different ways to validate the signature of the SAML Response:
243+
- You may provide the IdP X.509 public certificate at the `idp_cert` setting.
244+
- (Deprecated) You may provide the IdP X.509 public certificate in fingerprint format using the
245+
`idp_cert_fingerprint` and `idp_cert_fingerprint_algorithm` parameters.
246+
247+
In addition, you may pass the option `:relax_signature_validation` to `SloLogoutrequest` and
248+
`Logoutresponse` if want to skip signature validation on logout.
249+
250+
The `idp_cert_fingerprint` option is deprecated for the following reasons. It will be
251+
removed in Ruby SAML version 3.0.
252+
1. It only works with HTTP-POST binding, not HTTP-Redirect, since the full certificate
253+
is not sent in the Redirect URL parameters.
254+
2. It is theoretically be susceptible to collision attacks, by which a malicious
255+
actor could impersonate the IdP. (However, as of January 2025, such attacks have not
256+
been publicly demonstrated for SHA-256.)
256257

257258
## Handling Multiple IdP Certificates
258259

UPGRADING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ request.uuid #=> "my_id_a1b3c5d7-9f1e-3d5c-7b1a-9f1e3d5c7b1a"
9797
```
9898

9999
A side-effect of this change is that the `uuid` of the `Authrequest`, `Logoutrequest`, and `Logoutresponse`
100-
classes now is `nil` until the `#create` method is called (previously, it was set in the constructor.)
100+
classes now is `nil` until the `#create` method is called (previously, it was set in the initializer.)
101101
After calling `#create` for the first time the `uuid` will not change, even if a `Settings` object with
102102
a different `sp_uuid_prefix` is passed-in on subsequent calls.
103103

@@ -215,7 +215,7 @@ the [CVE-2017-11428](https://www.cvedetails.com/cve/CVE-2017-11428/) vulnerabili
215215

216216
Version `1.6.0` changes the preferred way to construct instances of `Logoutresponse` and
217217
`SloLogoutrequest`. Previously the _SAMLResponse_, _RelayState_, and _SigAlg_ parameters
218-
of these message types were provided via the constructor's `options[:get_params]` parameter.
218+
of these message types were provided via the initializer's `options[:get_params]` parameter.
219219
Unfortunately this can result in incompatibility with other SAML implementations; signatures
220220
are specified to be computed based on the _sender's_ URI-encoding of the message, which can
221221
differ from that of Ruby SAML. In particular, Ruby SAML's URI-encoding does not match that

0 commit comments

Comments
 (0)