-
Notifications
You must be signed in to change notification settings - Fork 69
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
Restrict chromium requests #425
Closed
Closed
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2b2596d
Fix regex validation, detect iframe, embed, object tags
joshuali925 51890cb
Disallow redirection to non-localhost urls
joshuali925 949e016
Disallow connection to non-allowlisted urls
joshuali925 cb317bf
Disable JIT
joshuali925 4f5309d
Fix workflow
joshuali925 d76f4fb
Try to fix CI
joshuali925 6968ccf
Fix localstorage logic
joshuali925 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have an Amazon URL. And how is this used? Why would
opensearch.org
be in this list?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the allowed hosts for all requests and redirections in chromium. The two hosts listed are used by map tiles visualizations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those 2 are not hosts, rather domains. Perhaps narrow the scope to the specific ones we need like
maps.search-services.aws.a2z.com
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think this needs to be configurable because some users will run in intranets. Is there a GH issue/feature request for this ask? I can open one otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thansk @dblock for pointing this one out: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/899/files
It looks like we don't need the a2z one. Could you please confirm, @joshuali925 ? If we can also make the
opensearch.org
more specific that'd be even better.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened opensearch-project/documentation-website#983 to document what's going on with these URLs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: is
ALLOWED_HOSTS
only used for maps? Maybe split it intoALLOWED_HOSTS
andALLOWED_MAPS_HOST
to make it explicit?Also this needs tests. I don't see anything that checks that ALLOWED_HOSTS is taken into consideration in tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidlago yes, good idea to narrow down to maybe
(.+\.)?maps.opensearch.org
. Will remove the a2z one if someone is able to confirm in db.'s issue which dashboards versions use which endpoint.@dblock
ALLOWED_HOSTS
is used for all requests and redirections happening inside chromium. Reporting plugin cannot tell if the request is coming from a map visualization, so I'm not sure if there are values to split them. Will add tests after the a2z issue is addressed