SAML Response Error

277 views
Skip to first unread message

Ryan Panning

unread,
Jul 22, 2011, 2:30:38 PM7/22/11
to google-app...@googlegroups.com
Ok, so I'm getting the wounderful "This account cannot be accessed because we could not parse the login request." error. I've tried many ways to send the SAML Respons but none have worked. Attached are files with the full XML response, Base64 encoded, and URL encoded values. I'm able to decode the base 64 and URL encoded values on the SimpleSAML debug page so I know it should be ok. Does anyone see something wrong?
 
Thanks
~ Ryan
Response_XML.txt
Response_Base64.txt
Response_URLencoded.txt

Ryan Panning

unread,
Jul 22, 2011, 2:43:34 PM7/22/11
to google-app...@googlegroups.com
Does the response have to be deflated?
What is an example XML Response? (I seen the one in the 33-post thread but has it changed?)
I'm submitting the HTML form to the ACS URL, not the RelayState, is that correct?
Do I need to URL encode the RelayState before putting it in the hidden form field?
Can I get more details about what Google Apps doesn't like about the response?
 
Thanks
~ Ryan

Claudio Cherubino

unread,
Jul 22, 2011, 2:48:09 PM7/22/11
to google-app...@googlegroups.com
Hi Ryan,

To help us troubleshoot the issue please provide the complete capture of the HTTP traffic, starting from when you typed the url for your mail service and ending after you get the error message.
Thanks

Claudio

 
Thanks
~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-saml-sso/-/Mevsv8RzuE0J.

To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-saml...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-saml-sso?hl=en.

Ryan Panning

unread,
Jul 22, 2011, 3:31:07 PM7/22/11
to google-app...@googlegroups.com
Is there a specific Firefox extension that you would use? I tried HTTP Fox but there isn't a good export option, I'd have to copy all the rows and paste into Notepad. Do you want just headers? Or Cookies, POST data, etc. too?
 
P.S. Can use Chrome too.
 
Thanks
~ Ryan

Scott Tomilson

unread,
Jul 22, 2011, 3:35:53 PM7/22/11
to google-app...@googlegroups.com
Not sure if Google would want more than this, but just an FYI for all looking for SAML debugging tools - there is an experimental Firefox add-on called SAML Tracer that I've found useful:


Cheers
Scott

 
Thanks
~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.

Ryan Panning

unread,
Jul 22, 2011, 3:58:12 PM7/22/11
to google-app...@googlegroups.com
Claudio, Attached is a list of HTTP traffic from start to error. The other attachment is my Response specifically to the ACS URL. Any other requests you would like data on?
 
Scott, I'll check that extension out. Thanks for the tip!
 
Thanks,
~ Ryan
HTTP Traffic.txt
Response to ACS.txt

Claudio Cherubino

unread,
Jul 22, 2011, 4:08:16 PM7/22/11
to google-app...@googlegroups.com
Hi Ryan,

My suggestion would to use the Firefox extension called LiveHTTPheaders.
Anyway, I checked your SAML request and response and the only unusual thing I found is that the request has ID="fgjenoobngjgmjcnpiloapdkgnjobdnljidannjd" and the response has InResponseTo="dmponmagkphbblbcgaappgcbjdgmkhjgkgcdkajb". The value of the latter should match that of the former.

Something may have happened between the two captures you attached, though, and I may have missed it.
If this doesn't help, please try capturing a new login attempt with LiveHTTPheaders, perhaps it will provide us with more details.
Thanks

Claudio

 
Thanks,
~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.

Ryan Panning

unread,
Jul 22, 2011, 5:07:17 PM7/22/11
to google-app...@googlegroups.com
The differences in ID's are correct as they are from two different captures. Sorry
 
Attached is a full capture from Live HTTP Headers in Firefox. I'll try to dig through them next week as my day is over. :)
 
Thanks for your help!!
~ Ryan
LiveHTTPHeaders.txt

Claudio Cherubino

unread,
Jul 22, 2011, 5:10:00 PM7/22/11
to google-app...@googlegroups.com
Thanks Ryan, I'll go through them next week as well.
Can you also tell me whether this issue only affects a single user or all users in your domain?

Claudio

~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.

Ryan Panning

unread,
Jul 22, 2011, 5:14:54 PM7/22/11
to google-app...@googlegroups.com
All users in the domain. Checked a couple others with the same result.
 
~ Ryan

Ryan Panning

unread,
Jul 25, 2011, 3:47:41 PM7/25/11
to google-app...@googlegroups.com
Well, I've dug through that capture and didn't notice anything out of place. I did fix a few things like now generating a random Response ID (which I just had one typed in before). And correctly set the Signature Reference URI. Also tried deflating the response. Still not able to get Google to accept my response, error "This account cannot be accessed because we could not parse the login request." Does anything else look incorrect?

Thanks
~ Ryan

Claudio Cherubino

unread,
Jul 25, 2011, 3:50:08 PM7/25/11
to google-app...@googlegroups.com
Ryan,

I'm still looking at it, I haven't found the issue yet.
Is this coming from an open-source or commercial SSO implementation like SimpleSAMLphp or is it your implementation?

Claudio


~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.

Ryan Panning

unread,
Jul 25, 2011, 4:29:44 PM7/25/11
to google-app...@googlegroups.com

Claudio Cherubino

unread,
Jul 25, 2011, 4:35:38 PM7/25/11
to google-app...@googlegroups.com
Ryan,

I don't know what's wrong with this code but I know that other solutions like SimpleSAMLphp or Shibboleth work with Google Apps.
Since they are both open-source solutions, you may probably want to give a look at their implementation and compare it with yours.
You may also want to install one of them and compare its SAML Response with yours.
Another thing I'd recommend you to check is that the certificate you are using is valid and is the same you uploaded to Google Apps.

Claudio

 
~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.

Ryan Panning

unread,
Jul 27, 2011, 4:52:41 PM7/27/11
to google-app...@googlegroups.com
(sigh) Still haven't figured it out. Unfortunutally I don't have access to setup another externally accessible server with Java (Tomcat) or PHP.
 
So you don't see anything wrong with the SAML Response? Can you post an example, correct SAML Response XML? I'm sure it's something small that I'm missing. I did make a couple changes that others have made, attached is a new capture. I even re-generated the RSA keystore and certificate using Keytool on a Mac. Is there a way to verify that it's working? If I go through the E-mail Support in my dashboard will they be able to lookup more log details?
 
Thanks again.
~ Ryan
HTTP Traffic.txt

Claudio Cherubino

unread,
Jul 27, 2011, 5:46:24 PM7/27/11
to google-app...@googlegroups.com
Hi Ryan,

Try comparing your SAML Response with the one attached.
It was generated by a SimpleSAMLphp installation located at http://simplesamlphp.i for the domain mydomain.com and for the user whose username is "student".

Claudio

~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.
samlrequest.xml
samlresponse.xml

Ryan Panning

unread,
Jul 28, 2011, 5:00:48 PM7/28/11
to google-app...@googlegroups.com
Alright, I changed my response to match that of the generated SimpleSAMLphp example. Still didn't work. Taking a look at it, the opening tags don't specify saml2 like other examples do. However, the namespaces specify version 2 so it must be a hybrid of the two.?. Also, it looks like the whole SAML:Response is signed, is this required? If so, is it signed before or after the Assersion is signed?
 
~ Ryan

Claudio Cherubino

unread,
Jul 28, 2011, 5:15:03 PM7/28/11
to google-app...@googlegroups.com
Please sign the whole SAMLResponse and not the Assertion. If that still doesn't work, please share a new HTTP capture.
Please also check the documentation for SAML v2:


Claudio

On Thu, Jul 28, 2011 at 2:00 PM, Ryan Panning <pan...@traileyes.com> wrote:
Alright, I changed my response to match that of the generated SimpleSAMLphp example. Still didn't work. Taking a look at it, the opening tags don't specify saml2 like other examples do. However, the namespaces specify version 2 so it must be a hybrid of the two.?. Also, it looks like the whole SAML:Response is signed, is this required? If so, is it signed before or after the Assersion is signed?
 
~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.

Ryan Panning

unread,
Aug 5, 2011, 12:09:13 PM8/5/11
to google-app...@googlegroups.com
Alright, I finally had a chance to get back to this project. After reviewing everything again I get the feeling it has something to do with the signing. Since I am able to decode it with the SimpleSAMLphp debugger and view the XML response then the Base 64 encoding is ok. And the actual XML response matches what you produced with SimpleSAMLphp and what the SAML documentation states. Therefor it must be the signature.

I'll try signing the whole Response as well. Do I include the Assertion when signing? How about the Assertion signature too?

Is there a good utility to verify the public key in Google Apps is able to verify the signature? The only thing I can think of is to set a SP using the same cert/keystore.

Thanks again, hope we're able to get this one last piece working, it's all that's left not working.

~ Ryan

Claudio Cherubino

unread,
Aug 5, 2011, 1:36:48 PM8/5/11
to google-app...@googlegroups.com
I agree the problem is likely to be in the signature.
As we don't recommend writing your own SAML implementation, I'm not sure I remember the nitty-gritty details of the signing algorithm and I don't want to give you the wrong advice.
My suggestion would be to check what SimpleSAMLphp does and try to do the same.

Claudio


~ Ryan

--
You received this message because you are subscribed to the Google Groups "SAML-based Single Sign On for Google Apps" group.

Ryan Panning

unread,
Aug 5, 2011, 5:05:05 PM8/5/11
to google-app...@googlegroups.com
Well, after today's battle I'm no closer. I tried signing in these ways:
  1. Signed just the Assertion (what I have been doing)
  2. Signed the Assertion, then signed the Response WITH the Assertion Signature
  3. Signed Response WITHOUT the Assertion Signature, then signed the Assertion
  4. Signed the Response and Assertion SEPARATELY, then injected the signatures after
Attached is the latest LiveHTTPHeaders and the decoded SAMLResponse.

(Sigh) That's all for me today. Thanks

~ Ryan
LiveHTTPHeaders.txt
Response_XML.txt
Reply all
Reply to author
Forward
0 new messages