I just want to start off by saying that I am by no means a security expert and this is in fact my first time working with SAML. I undertstand (I think) many of the concepts, but there are still plenty of fuzzy areas for me -- a lot of just "accepting" that it works for now.
Here is what I have. I was given a message (sample SAMLResponse & RelayState) from my IdP. I used a tool that I found online (https://rnd.feide.no/simplesaml/module.php/saml2debug/debug.php) to decode the message to review the structure. I then plugged it into a url and passed the response to my servlet. My servlet run() contains the following code: (omitted try-catch for readability)
--[ code start ]----
MessageContext messageContext = new BasicSAMLMessageContext();
HTTPPostDecoder samlMessageDecoder = new HTTPPostDecoder();
Response samlResponse = (Response)messageContext.getInboundMessage();
--[code end ]----
I put a trace on the Binding, and at run time I see this show up in the console:
.. so I assume that this is working ok. Here is the strange part. If I use the HTTPPostDecoder, then I get an exception stating that it only works with messages of type This message deocoder only supports the HTTP POST. If I switch the decoder to HTTPRedirectDeflateDecoder, then I do manage to decode the message, but I get a different error:
14:46:38.822 [http-8080-1] DEBUG o.o.s.b.d.HTTPRedirectDeflateDecoder - Decoded RelayState: id-rrcf-3cZev-PRqoA-5xc1iYmxX
14:46:38.822 [http-8080-1] DEBUG o.o.s.b.d.HTTPRedirectDeflateDecoder - Base64 decoding and inflating SAML message
14:46:38.832 [http-8080-1] DEBUG o.o.w.m.decoder.BaseMessageDecoder - Parsing message stream into DOM document
14:46:38.842 [http-8080-1] ERROR o.o.w.m.decoder.BaseMessageDecoder - Encountered error parsing message into its DOM representation
org.opensaml.xml.parse.XMLParserException: Unable to read XML from input stream
To be honest, I'm not sure what the problem is, and my efforts to find someone with the same problem have turned up nothing.
Can anyone help?
IdP (on the other end) is Oracle OIM