* Lennart Nordgreen <
gree...@gmail.com> [2014-07-04 10:22]:
> I need it like this:
> <SPSSODescriptor AuthnRequestsSigned="true"
> WantAssertionsSigned="true"protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
I know. I just said that I don't think this is currently possible, so
you'd just serve up a file with that content yourself.
> Doesn't simpleSAMLphp need that metadata of its own (to read or
> generate on the fly) in its own environment.
Not sure about the use of these elements.
saml2int.org for example
mandates the signing of assertions anyway, so many deployments will do
that whether you put WantAssertionsSigned in your SP's metadata or
not.
You didn't follow up on whether configuriung your SSP SP to sign
authnRequests did produce the AuthnRequestsSigned element in metadata,
but I doubt it will.
> Take Shibboleht e.g. there I can specify all these options and
> attribute directly in a metadata file
That's only true for the Shibboleth IDP, which has a handler (by
default in /idp/Metadata/SAML, assumung "idp" is the context you've
deployed your IDP) which serves up a static XML file from the file
system. So it does /exactly/ what I suggested you do yourself with
SimpleSAMLphp.
I.e. if the Shib IDP does what you want you'll need to do the same
with SimpleSAMLphp.
For the Shibboleth SP that simply isn't the case. The Shib SP des not
give you a metadata file you edit and which it will serve it (which,
again, is semi-pointless as you can serve up a metadata file yourself
from the webserver), it will autogenerate SAML metadata at (by
default) /Shibboleth.sso/Metadata, based on its internal
configuration. And that also includes a big warning at the very
beginning of that resource, telling you NOT to use this metadata as
is.
> but where do I do that in simpleSAMlphp?
I told you what I would do (provided I knew I absolutely needed those
elements to be present, of course). Maybe others on this list will
know more.
> The thing is, you'd like the IDp to be able to fetch the metadata
> from your SP without us having to modify it all the time
Do you sign that SAML metadata and was the IDP willing and able to
configura that one signing key specifically to verify signatures on
that one SP's SAML metadata? If not that's all security theater, for
the most part (serving up unsigned plain text files over the internet
to bootsrtap technical trust in cryptographic credentials and protocol
endpoints).
So no, you usually don't point the IDP to your metadata endpoint to
dynamically pull metadata from there, as that would allow others at
any point in the future to sneak in metadata of their own (MITM, etc.)
and the IDP would have no way of noticing.
Also, metadata doesn't change "all the time" in common deployments but
maybe you're requirements are different.
So you still have several options:
0. Find out whether (not) adding those attributes to your metadata
actually causes the IDP to behave differently (doubtful IMHO).
1. Add the missing functionality to SimpleSAMLphp, with new config
options or tied to existing ones (like the one I previously pointed
out, causing the SP to actually sign authnRequests)
2. Point the metadata consumers to a resouces (script) that you
control and in that script fetch and modify your own metadata in
the fly. That way automatically generated metadata will always be
up-to-date and you can still add/modify whatever you want to that.
Doing that in XSLT would be rather simple, for example.
Of course if you're signing the metadata with the SAML
implementation you can't do that as changing the metadata after the
fact would invalidate the signature. You'd need to do the signing
in your script then, after your modifications.
> like in Shibboleth.
Not really. (For the IDP yes, but that's just a static XML file on
disk. For the SP no, it doesn't give you a metadata file you can just
modify and it will serve it up).
-peter