Repository navigation
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request introduces a new environment variable,
OAUTH_ALLOWED_REDIRECT_HOSTS, to restrict which hostnames can be used as OAuth client redirect URIs for registration and authorization. The change enhances security by allowing administrators to specify a comma-separated allow-list of hosts, with loopback addresses always permitted. The implementation includes code changes, documentation updates, and new tests to cover the feature.OAuth Redirect Host Allow-List Feature:
OAUTH_ALLOWED_REDIRECT_HOSTSenvironment variable to.env-cmdrc-template,config/.env.dev, anddocker-compose.ymlto configure allowed OAuth redirect hosts. [1] [2] [3]src/services/oauth.js) to enforce the allow-list: only hosts inOAUTH_ALLOWED_REDIRECT_HOSTSor loopback addresses are accepted forredirect_uriduring client registration and authorization. [1] [2]Documentation:
README.mdto explain the usage and behavior ofOAUTH_ALLOWED_REDIRECT_HOSTS, including default behavior and examples.Testing:
tests/oauth.test.jsto verify correct enforcement of the allow-list during OAuth client registration and authorization flows.