* John Klassa <
jo...@klassa.com> [2015-10-23 20:45]:
> My question for the list, then, is how do I arrange to have a
> "providerid" passed along to the IDP, so that (seemingly) some kind
> of a different profile kicks in, that results in the IDP sending
> back "name" information -- which it otherwise doesn't?
That's an interesting observation, an IDP releasing attributes only
when replacing the SAML2.0 defined authentication request with a
proprietary, implementation-specific auth request. (N.B.:
IDP-initiated is not part of any standard).
So that very much sounds like it's an issue at the IDP, as Tom said,
as your SimpleSAMLphp SP software is merely sending a standard SAML2.0
authentication request to the IDP and the IDP responds with that it
thinks is right.
To eliminate out some of the guesswork here: How are you determining
what the IDP sends (in both cases)? Can you reference the exact code
you're using (if you just copied it from the documentation)?
Did you look at the complete SAML response and Assertion the IDP sent,
e.g. using Mozilla Firefox and the SAMLtracer extension? If the IDP
does not encrypt the reponse or assertion likely you'll see exactly
what the IDP sends on the wire, right in your browser.
If so, pay special attention to a Subject element (possibly containing
a NameID element) and to an AttributeStatement element (and its child
elements). Compare those carefully in both cases/approaches.
Background: As the proprietary request sent to the IDP is not fully
equivalent to the SAML-defined one (the latter contains much more
information not supplied to the IDP in the request you showed) maybe
that's the source of the difference. E.g. depending on your SSP
configuration your SP might request a certain NameID (format) from the
IDP in the SAML request. If the IDP didn't support that (and
consequently didn't put one such NameID in the response, possibly no
other format either) *and* your SP was configured to present the
NameID as one of the returned "attributes", that might fully account
for the observed difference.
(Assuming the IDP would assert a certain other NameID [format] when
not asked for one specifically, esp for one it didn't support, which
would likely be the case when using the IDP-initiated approach.)
As a quick test you could set
'NameIDPolicy' => null,
in your 'saml:SP' authsource (in config/authsources.php of your SSP
install) and try again?. That will cause no specific NameID (format)
to be requested in SP-initiated (i.e., SAML-defined) SSO requests.
(If the SAML contains a NameID when using IDP-initiated SSO you could
put that same NameIDFormat into the config element above, so that the
SP requestes the same format the IDP sends. Maybe that'll make it
"work" as expected.=
That all might not make the least bit of a difference (since the IDP
might still not issue a NameID then), and probably you're not looking
at NameID values in your SSP code at all. But it would be one way to
account for the differences based on the SP configuration.
If all else fails it remains just that: An interesting observation
about behaviour of that IDP. I.e., if you want different IDP behaviour
you'd need to talk to the IDP admin. (That would also take out the
guesswork about why specifically the IDP behaves differenty.)
-peter