* Vitor Franchi <
naoten...@gmail.com> [2016-06-09 23:23]:
JFYI, not that it relates to your question or that it's our job to
correct someone else's "documentation":
Step 10 in "Create the Relying Party Trust in ADFS 2012R2" configures
your MS-ADFS to assert the "UPN" attribute as a transient NameID.
That's not appropriate (see the SAML spec on what transient NameIDs
really are) and it's also not correct that this "is required to allow
SimpleSAMLphp to talk with ADFS."
While SSP currently has a bug in this area (it fails when no NameID is
available), it can work with any kind of NameID. There's no
requirement to use transients, and UPN is not a "transient" value.
> But now, looking at the session expire date, I know the
> authentication will expire in like 24 hours, or when I close my
> browse. I really don't want the user to have to keep entering user
> and password credentials everyday.
That's very unusual. Most are satisfied with SSO sessions (on the IDP)
lasting, say, a business day (e.g. 8h) and having SP sessions much
shorter.
And unless the IDP prevents this (by putting a cap on the SP's maximum
session duration) you can have quite long-lived sessions on the SP,
too. (E.g. in the past I had a special kind of SP where sessions
lasted a whole week.)
> I would like a "Remember Me" option, to keep the user logged in, but
> also, if the user get's removed from the Active Directory, I want my
> app to be able to know that the user in question is not valid
> anymore and thus, must log him out.
That's not how session (based on HTTP Cookies) on the web work, or how
SAML works generally. Whether an object representing a person still
exists in LDAP has no bearing on existing sessions or cookies (but
maybe your SAML IDP implementation works differently).
> I came across the isPassive argument but I didn't understand what it
> does entirely
isPassive can be used to test whether the subject's browser still has
an active SSO session at the IDP, not whether the subject exists in
some data store. If your SAML IDP (MS-ADFS) performs administrative
logout of the IDP/SSO session when a person's object is removed from
LDAP then yes, it would do what you'd expect it to.
You'd still have to cycle the subject's browser through the IDP and
back in order to test whether the subject's browser still has an
active SSO session at the IDP or not. So it is disrupting the use of
the protected resource, something you'd want to consider when deciding
how often you'd like to initiate SSO with isPassive set.
isPassive also won't work the way you want if you have short-lived SSO
sessions at the IDP and want long-lived sessions at the SP: Most of
the time the subject would return with a SAML2 error message informing
your SAML SP that no session was found -- and since you're trying to
conflate "valid session exists at the IDP" with "person object exists
in the LDAP store used by the IDP" you wouldn't be able to tell
whether my SSO session at the IDP just expired, or whether I had left
the company.
-peter