Isn't there already an implementation of SAML 2.0 for Spring Security?
> I am trying to send an unsigned base64 encoded authorisation request
> to SS IDP.:
This is incorrectly encoded. You have not compressed it before you
base64-encoded it. See the specification for the HTTP-Redirect binding.
[...]
> Two questions:
> 1. Do I need to configure the IDP to accept both an signed and
> unsigned authentication request and how?
No, unless the IdP is configured to require signed requests, it does
not care about the signature status of the message.
> 2. Is the authentication request valid.
No, as mentioned above, it is incorrectly encoded.
Best regards,
Olav Morken
UNINETT / Feide
On Mon, Apr 16, 2012 at 18:14:02 +0930, Steve wrote:
> Thanks for your response Olav.
>
> I think you have identified the problem. I am very new to SAML as you can
> see. I was hoping to configure a very simple implementation to get us going
> initially.
I'd encourage you to use already existing implementations. Implementing
it from scratch requires much work, and is easy to get wrong.
Signature validation is very complex, and a mistake leaves you with an
SP without security.
> Could you please send me an example (xml) of a valid un-encoded idp request
> to SimpleSAML ISP plus the deflated base64 encode request, for comparison to
> allow me to validate I am sending a correct request.
Here is a working request:
[...]/SSOService.php?SAMLRequest=nVJLb9swDP4rhu6On0lrIQmQNRgWoF2DOtthl4GxmEWALLkivbX%2FvrLdoe0OOewiASS%2FBz9wSdCaTm56PtsHfOyROHpqjSU5Nlai91Y6IE3SQoskuZH15u5W5rNUdt6xa5wR7yCXEUCEnrWzItptV%2BKnqk55lRVVAfPsmB6vikWWFwWU1wUs5mmlyuIIizKdp3MRfUdPAbkSgSjAiXrcWWKwHEpplsdpGWeLQ5bJspLl1Q8RbcM22gKPqDNzRzJJtOpiDo3ZCbXCmXUJ6bYzOJhPhicfRpK6vq%2FR%2F9YNzrpzJ6LNX%2Bc3zlLfon%2Ftfnu4feOmC9StU70ZyZJJavrzGBoaqwpP0BuOKajtX5P9pK3S9tflUI%2FTEMkvh8M%2B3t%2FXB7FeDtxyDMmv%2F9NeiwwKGP5xt0zecy%2BnA%2FoaXO22e2d08xx9dr4Fvmx6qGgVn8ZRyR4sabQcgjbG%2FbnxCIwrwb5HkawnyY9nun4B&RelayState=https%3A%2F%2Fsp-test.feide.no%2F%3Flogin
Decoded (with whitespace inserted to make it readable):
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="_d9f291393a51b0b7361233a483a6509d43ba640505"
Version="2.0"
IssueInstant="2012-04-16T11:49:47Z"
Destination="https://idp-test.feide.no/simplesaml/saml2/idp/SSOService.php"
AssertionConsumerServiceURL="https://sp-test.feide.no/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
>
<saml:Issuer>https://sp-test.feide.no/simplesaml/module.php/saml/sp/metadata.php/default-sp</saml:Issuer>
<samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
AllowCreate="true"
/>
</samlp:AuthnRequest>
(Note that this is just one example of an request. Not all attributes
present in this request are actually required.)
> I will deflate before base64 encoding as per HTTP-Redirect binding spec and
> give it another try.
>
> You are correct in relation to Spring Security support for SAML. It is
> currently an extension, with no official word from Spring Source as to its
> inclusion in security. I do notice that Vladamir Schafer has updated
> recently, so may be worth looking at in more detail. Has anyone in your
> community used it?
I know that at least one SP connected to the Feide IdP uses it (which
is why I have heard about it). From looking at SP metadata, there are
problably more, but it is difficult to say for sure.
> Anyway, I really appreciate your help.
You're welcome!