set DRUID_AUTHORIZATION_CHECKED attribute for router endpoints#8026
Merged
gianm merged 2 commits intoapache:masterfrom Jul 9, 2019
pjain1:fix_router_auth
Merged
set DRUID_AUTHORIZATION_CHECKED attribute for router endpoints#8026gianm merged 2 commits intoapache:masterfrom pjain1:fix_router_auth
gianm merged 2 commits intoapache:masterfrom
pjain1:fix_router_auth
Conversation
Contributor
|
I would think the How about adding that check to that endpoint, instead of skipping authorization for all router endpoints? (And also adding appropriate checks to any other router endpoints that might be missing them) |
Member
Author
|
Changed the code and PR description as per your recommendation. Thanks |
Contributor
|
@pjain1 I wonder if that can be unit-tested easily? |
Member
Author
|
@egor-ryashin added |
gianm
pushed a commit
to implydata/druid-public
that referenced
this pull request
Jul 9, 2019
…e#8026) * add state resource filter to router endpoints * add RouterResource to ResourceFilter test framework
clintropolis
pushed a commit
that referenced
this pull request
Jul 24, 2019
* add state resource filter to router endpoints * add RouterResource to ResourceFilter test framework
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.
Fixes #6786
Description
Router does not perform any authorization checks and depends on requests forwarded to other nodes to perform authorization and set
DRUID_AUTHORIZATION_CHECKEDheader. It works fine in most cases, however for requests that are not forwarded to other nodes and are not in unsecured path list, this header is not set, thusPreResponseAuthorizationCheckFilterthrows exception. Example of this would be/druid/router/v1/brokersend point on router.To fix this added appropriate resource filter to router endpoint.