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
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,13 @@ In production, the **onelogin.saml2.strict** setting parameter MUST be set as **
72
72
73
73
In production also we highly recommend to register on the settings the IdP certificate instead of using the fingerprint method. The fingerprint, is a hash, so at the end is open to a collision attack that can end on a signature validation bypass. Other SAML toolkits deprecated that mechanism, we maintain it for compatibility and also to be used on test environment.
74
74
75
+
The IdPMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
76
+
77
+
Usually the same administrator that handles the Service Provider also sets the URL to the IdP, which should be a trusted resource.
78
+
79
+
But there are other scenarios, like a SAAS app where the administrator of the app delegates this functionality to other users. In this case, extra precaution should be taken in order to validate such URL inputs and avoid attacks like SSRF.
onelogin.saml2.organization.displayname = SP Java Example
@@ -433,10 +449,10 @@ The AuthNRequest will be sent signed or unsigned based on the security settings
433
449
434
450
The IdP will then return the SAML Response to the user's client. The client is then forwarded to the Attribute Consumer Service of the SP with this information.
435
451
436
-
We can set a 'returnTo' url parameter to the login function and that will be converted as a 'RelayState' parameter:
452
+
We can set a 'RelayState' parameter containing a return url to the login function:
437
453
```
438
-
String targetUrl = 'https://example.com';
439
-
auth.login(returnTo=targetUrl)
454
+
String returnUrl = 'https://example.com';
455
+
auth.login(relayState=returnUrl)
440
456
```
441
457
The login method can receive 6 more optional parameters:
442
458
-*forceAuthn* When true the AuthNRequest will have the 'ForceAuthn' attribute set to 'true'
@@ -605,10 +621,10 @@ The Logout Request will be sent signed or unsigned based on the security setting
605
621
606
622
The IdP will return the Logout Response through the user's client to the Single Logout Service of the SP.
607
623
608
-
We can set a 'returnTo' url parameter to the logout function and that will be converted as a 'RelayState' parameter:
624
+
We can set a 'RelayState' parameter containing a return url to the login function:
609
625
```
610
-
String targetUrl = 'https://example.com';
611
-
auth.logout(returnTo=targetUrl)
626
+
String returnUrl = 'https://example.com';
627
+
auth.logout(relayState=returnUrl)
612
628
```
613
629
614
630
Also there are 7 optional parameters that can be set:
0 commit comments