<html><head></head><body><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">Hi,</div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">I am trying to implement a Java app using OpenSAML that can integrate with a service provider/SP endpoint that is provided as part of Oracle's Access Manager (OAM) federation capability. </div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">What I have been able to do thus far is implement a Java app that can produce a SAML response message that includes an signed assertion and that looks like it matches some SAML response messages that I have captured from previous testing with OAM federation. <br></div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">However, when I try to send the responses from my Java app into OAM federation, I am getting a "system error" and looking at the stacktraces in the logs, it appears that OAM is encountering some kind of Base64-related error. I am not 100% sure, but it appears that this error is happening when OAM is attempting to get the return URL.</div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">Right now, the processing that I do after I build the SAML response (in a string named 'samlResponse', and the return URL for my test should be 'http://sandboxdtm01.xxx.dev:38443/test.html') is:</div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">...<br></div><div class="ydpff0e4a34yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><span> Base64.Encoder encoder = Base64.getUrlEncoder(); // I have also tried using just Base64.getEncoder()...<br> String str = encoder.encodeToString(samlResponse.getBytes()); <br> String str2 = "SAMLResponse=" + str + "&RelayState=https%3A%2F%2Fsandboxdtm01.xxx.dev%3A38443%2Ftest.html";<br> System.out.println("\n\n========================================\nBASE64-Encoded string:\n");<br> System.out.println(str2);<br></span><div><span> System.out.println("\n============================================\n"); </span></div><div><span></span><br></div><div>....<br></div><span> <br></span><div>The resulting 'str2' value looks like (following is a snippet of an example):</div><div><br></div><div><span>SAMLResponse=PD94.....cDpSZXNwb25zZT4=&RelayState=https%3A%2F%2Fsandboxdtm01.gxaws.dev%3A38443%2Ftest.html</span></div><div><span><br></span></div><div><span></span>and I send that 'str2' value as the content body in a POST to the OAM SP endpoint, which results in the 'system error'.</div><div><br></div><div>Is what I doing above for the Base64 encoding of the samlResponse correct for building the SAML response and the RelayState?</div><div><br></div><div>Also, part of the reason I am asking the above (besides the error stacktraces mentioning Base64) is that, from the logging of the "good" captures that I did with OAM previously, it looks like the SAMLResponse that is being sent in the "good" tests end with TWO equal signs ('==') whereas the Base64 strings I am seeing from my code seem to have only one equal ('=') at the end, which is making me wondering if I should be doing different for the Base64 encoding?</div><div><br></div><div>Thanks for your patience!!</div><div><br></div><div>Jim<br></div></div></body></html>