-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Potential bug when using SAML and workers might result in "Unsolicited response" errors #7530
Comments
I believe this is a duplicate of #7056. |
Based on the conversation in #7056, it seems like this might be a different cause that ends up in the same error. |
@clokep If you're reopening it, could you please rename this issue with something more explicit? "Potential bug in SAML + worker mode" sounds quite hazy. |
Hi, @clokep I think same problem here. I run 3 generic.worker via nginx
and the client ends up on URL error from generic.worker log:
Removing regex Also when adding
as recommended in workers.md not even the SAML login works anymore. Ciao |
The workaround right now is to ensure that all saml logins go to a single process (usually the main process). Sounds like that's what you've done to get it working? |
This comment has been minimized.
This comment has been minimized.
It probably is not necessary for those endpoints to go to a worker. They are only used during initial login. Multiple workers not handling the SAML endpoints properly is a bug. |
If SSO login is used (e.g. SAML) in a multi worker setup, it should be mentioned that currently all SAML logins must run on the same worker, see #7530 Also, if you are using different ports (for example 443 and 8448) in a reverse proxy for client and federation, the path `/_matrix/media` on the client and federation port must point to the listener of the `media_repository` worker, otherwise you'll get a 404 on the federation port for the path `/_matrix/media`, if a remote server is trying to get the media object on federation port, see #8695
This is related to: #9427 |
I'm unsure if this will be a problem in reality or is just a potential for issues, but figured I should document it. This is somewhat similar to #6705, but is:
The SAML handler stores state about ongoing SAML requests in memory (see uses of
_outstanding_requests_dict
in thesynapse.handlers.saml_handler.SamlHandler
class).In worker mode, it is possible for a request to get created and the callback to occur on different workers causing an error about an unrequested SAML response.
I believe the workaround is to ensure that the following endpoints all go to the same worker:
/_matrix/client/r0/login/sso/redirect
/_matrix/saml2/authn_response
/_matrix/client/r0/auth/(org.matrix.login.sso|m.login.sso)/fallback/web
The text was updated successfully, but these errors were encountered: