Handling RequestedAuthnContext from idP

99 views
Skip to first unread message

huwi...@champlain.edu

unread,
Sep 29, 2022, 10:18:57 PM9/29/22
to SimpleSAMLphp
Is there any support for Authentication Contexts at the idP level?  

For example, if an SP sends...

<samlp:RequestedAuthnContext Comparison="exact">  <saml:AuthnContextClassRef>https://refeds.org/profile/mfa</saml:AuthnContextClassRef>
</samlp:RequestedAuthnContext>

... how do I (a) respond with the following in my idP's response?

<saml:AuthnContext>  <saml:AuthnContextClassRef>https://refeds.org/profile/mfa</saml:AuthnContextClassRef>
</saml:AuthnContext>

... and (b) is there a way to access requested context from api on custom auth page in order to limit authentication choices?

Thanks in advance!
Matt

pat...@cirrusidentity.com

unread,
Sep 30, 2022, 2:44:02 PM9/30/22
to SimpleSAMLphp
Hi Matt,

For A)
You can define a an authproc filter https://simplesamlphp.org/docs/stable/saml/authproc_authncontextclassref.html to set it for your response
For B) in your custom auth page you'll likely have access to the user's state. It should be in there (I've accessed it from auth filters before), and it can be multi-valued.
 `$state['saml:RequestedAuthnContext']['AuthnContextClassRef']`

- Patrick

huwi...@champlain.edu

unread,
Sep 30, 2022, 4:30:36 PM9/30/22
to SimpleSAMLphp
This is exactly what I was looking for.  Thank you Patrick.
Reply all
Reply to author
Forward
0 new messages