Repository navigation
Replies: 1 comment
|
Feature request: add an operator-configurable allowlist for redirect hosts used by dynamically registered OAuth clients. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Scope & Context
Follow-up to GHSA-pg47-7c3r-fwfx.
POST /oauth/registeris public by design (RFC 7591, MCP clients need it), andvalidateRedirectUrionly checks the URI shape, so anyone can register a client with any HTTPS redirect host. #30276 now marks the known clients as verified on the consent screen, which helps members spot an impostor. Self-hosted operators still have no hard control over where an anonymously registered client can send authorization codes.I have a ready change but can't open a PR since the repo now limits PR creation to collaborators. Branch: https://github.com/Belkouche/twenty/tree/fix/oauth-dcr-redirect-host-allowlist (one commit on top of current
main). Happy for a maintainer to open it from there, or to adjust it.Current behavior
Any HTTPS host is accepted as a
redirect_urion Dynamic Client Registration, with no way for an operator to narrow it.Expected behavior
An operator can list the hostnames that dynamically registered clients may redirect to. With no configuration, behavior stays as it is today.
Technical inputs
OAUTH_DCR_ALLOWED_REDIRECT_HOSTS(array, advanced settings). Default*keeps the current behavior.validateRedirectUritakes an optionalallowedHostslist. When it is set and does not contain*, a non-localhost HTTPS redirect whose hostname is not listed is rejected. Localhost and the allowed custom schemes (cursor:,vscode:,code:) still pass.OAuthRegistrationControllerpasses the list. Authenticated app registration and the authorize-time re-check are unchanged.OUTBOUND_HTTP_ALLOWED_INTERNAL_HOSTS.validate-redirect-uri.util.spec.tscovers the default,*, allowed and rejected hosts, case-insensitive matching, and the localhost/custom-scheme bypass (16 passing on currentmain).All reactions