Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idp example: failed to validate request: EOF #507

Open
aep opened this issue Mar 19, 2023 · 0 comments
Open

idp example: failed to validate request: EOF #507

aep opened this issue Mar 19, 2023 · 0 comments

Comments

@aep
Copy link

aep commented Mar 19, 2023

this is likely user error, as i'm totally new to saml.

  1. saml/example/idp/idp -idp https://example.com/
  2. go to https://samltest.id/upload.php and fetch https://example.com/metadata
  3. download https://samltest.id/saml/providers and curl -X PUT https://example.com/services/what -d '@samltestid.xml'
  4. start a flow from https://samltest.id/start-idp-test/
  5. the login form shows fine, but when the form posts, with or without correct credentials:
  6. bad request: failed to validate request: EOF

i noticed that in the form that is rendered, there's a hidden field, but its empty

<input type="hidden" name="SAMLRequest" value="" /><input type="hidden" name="RelayState" value="" />
2023/03/19 20:42:35.903340 Starting Goji on [::]:16667
2023/03/19 20:43:27.503248 [whale/6BUsY31YzP-000005] Started GET "/metadata" from 10.128.9.1:59994
2023/03/19 20:43:27.503641 [whale/6BUsY31YzP-000005] Returning 200 in 342.918µs
2023/03/19 20:47:30.507802 [whale/6BUsY31YzP-000013] Started PUT "/services/what" from 10.128.9.1:34520
2023/03/19 20:47:30.544169 [whale/6BUsY31YzP-000013] Returning 204 in 36.338998ms
2023/03/19 20:47:40.247274 [whale/6BUsY31YzP-000014] Started GET "/sso?SAMLRequest=fZFfT4MwFMW%2FCun7KP%2FGpBkkuD24ZCoZ6IMvpms7aYQWe8vUby8MjTMxe2vSc3%2FnnnOXQNumI3lva7UTb70A63y0jQJy%2BkhRbxTRFCQQRVsBxDJS5rdbErge6Yy2mukGOTmAMFZqtdIK%2BlaYUpijZOJht01RbW0HBOORaAcDV3Jc1nK%2F142wtQug8YgMcHFfVshZDxKp6Ej7neXiOKOic18N7TlrdM9dptuBCRo5m3WKnimPuDdfRFdhfGDBwedeFCcsYfMkjMKYx4MMoBcbBZYqm6LAC8KZF878pPITEi1I5D0hp%2FiOdC0Vl%2Brlcv79JAJyU1XFbNr%2BURg4bT4IULYcM5OTsTnr9TKW%2FpSJsv%2BqG98YuiU%2BY09GHbkbYJt1oRvJPp28afT7yghqRYp8hLNp5O%2B1sy8%3D&RelayState=ss%3Amem%3Aea02ffb45ace0028fb9a598f9b02fd0e7dbe5eb8d534e2bb8dc72b1994923787" from 10.128.9.1:35294
2023/03/19 20:47:40.247843 [whale/6BUsY31YzP-000014] Returning 200 in 534.772µs
2023/03/19 20:48:02.691238 [whale/6BUsY31YzP-000015] Started GET "/sso" from 10.128.9.1:35586
2023/03/19 20:48:02 failed to parse request: cannot decompress request: unexpected EOF
2023/03/19 20:48:02.691392 [whale/6BUsY31YzP-000015] Returning 400 in 91.003µs
aep added a commit to aep/saml that referenced this issue Mar 19, 2023
Options.URL must NOT have a trailing slash
otherwise the form will post to //sso which gets redirected to /sso without reposting the data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant