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

Use POST instead of Redirect after discovery to avoid big headers issues #970

Open
pdesgarets opened this issue Aug 21, 2024 · 2 comments
Open

Comments

@pdesgarets
Copy link

pdesgarets commented Aug 21, 2024

I am using SATOSA with Renater federation WAYF (SAML frontend / SAML backend with discovery).

The global nginx reverse proxy on our infra is sending 502 errors after the selection of the IDP on the WAYF, because the headers of the response contain the Location with the SAMLRequest query param and is too big (upstream sent too big header while reading response header from upstream).

I see the order of bindings_to_try in saml2.client.Saml2Client.prepare_for_negotiated_authenticate (called by satosa.backends.saml2.SAMLBackend.authn_request) is hardcoded. Could it be configurable, so that POST is preferred over Redirect ? (is there a reason to prefer Redirect ?)
Should not preferred_binding be used there ? (I don't understand fully all the types of services, so maybe a silly idea)

@vladimir-mencl-eresearch
Copy link
Contributor

Hi @pdesgarets ,

What version of SATOSA and pysaml2 are you running?

Just wondering whether this might be caused by an issue reported in pysaml2 #819 and resolved in #380. Prior to this fix, the AuthnRequest included an XML signature (besides being also signed at the redirect binding level) and that caused the overall redirect URL to be quite large.

If this still impacts you, removing the extra signature might be you below the threshold...

Hope this helps.

Cheers,
Vlad

@pdesgarets
Copy link
Author

I'm using the latest versions, SATOSA 8.4.0 and pysaml2 7.5.0
So I guess that's not the cause

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

2 participants