<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks Peter.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
This is helpful.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature" class="elementToProof">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: garamond, serif; font-size: 15px; color: rgb(36, 36, 36);">
<span style="background-color: rgb(255, 255, 255);">Thanks and Regards,</span></div>
<div class="elementToProof" style="font-family: arial, sans-serif; font-size: 15px; color: rgb(34, 34, 34);">
<span style="background-color: rgb(255, 255, 255);"><b><br>
</b></span></div>
<div class="elementToProof" style="font-family: arial, sans-serif; font-size: 15px; color: rgb(34, 34, 34);">
<span style="background-color: rgb(255, 255, 255);"><b>Amit Dongaonkar</b></span></div>
<div class="elementToProof" style="background-color: rgb(255, 255, 255); margin: 0px;">
<div class="elementToProof" style="direction: ltr; margin: 0px; font-family: "Calibri Light", sans-serif; font-size: 15px; color: rgb(118, 113, 113);">
<i><br>
</i></div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> users <users-bounces@shibboleth.net> on behalf of Peter Schober via users <users@shibboleth.net><br>
<b>Sent:</b> Friday, June 13, 2025 8:55 AM<br>
<b>To:</b> users@shibboleth.net <users@shibboleth.net><br>
<b>Cc:</b> Peter Schober <peter.schober@univie.ac.at><br>
<b>Subject:</b> Re: Selection of IdP based on an attribute from the SAML Assertion</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">CAUTION : EXTERNAL SENDER | Proceed carefully when clicking links or opening attachments.<br>
<br>
Amit Dongaonkar via users <users@shibboleth.net> [2025-06-13 14:31 CEST]:<br>
> I have a scenario where our SP needs to decide which IdP to request<br>
> a SAML assertion based on one of the attributes received from the<br>
> initial assertion received.<br>
[...]<br>
> If the 'userType' attribute has the alphanumeric value then we need<br>
> to reach out to a different IdP and request another SAML assertion.<br>
<br>
The SP provides you with all the recieved, decrytped, decoded, mapped<br>
attributes sent by the "initial" IDP's assertion.<br>
<br>
The SP also allows you to initiate SSO with an IDP given its entityID.<br>
<br>
Here's how to do the missing step between those two:<br>
<br>
Using the SP's sessionHook faciluty you can inject your own code into<br>
the processing -- running on the same machine as the Shib SP, so it<br>
has access to the attributes from the just created session. That code<br>
needs to be accessible by the subject's web browser somehow, at any<br>
path of your chosing. In that code you can perform any checks (or<br>
lookups) you want and then decide what to do with the request.<br>
<br>
If the signalling attribute is present and has a certain value you<br>
issue an HTTP Response Header ("Location: ") to the subject's web<br>
browser, pointing that redirect to the SP's session initiator with the<br>
desired IDP's entityID (which your code determines from the value of<br>
the signalling attribute) and the originally requested ressource<br>
('return' query parameter) as parameters, e.g.<br>
/Shibboleth.sso/Login=entityID=$other_idp&target=$return<br>
<br>
If the signalling attribute is missing or is missing the expected<br>
value(s) you let them pass by simply redirecting the browser to the<br>
value of the provided 'return' query parameeter.<br>
<br>
Best,<br>
-peter<br>
--<br>
For Consortium Member technical support, see <a href="https://shibboleth.atlassian.net/wiki/x/ZYEpPw">
https://shibboleth.atlassian.net/wiki/x/ZYEpPw</a><br>
To unsubscribe from this list send an email to users-unsubscribe@shibboleth.net<br>
</div>
</span></font></div>
</body>
</html>