Repository navigation
Add config to allow setting up custom unsecured paths for druid nodes. - #5614
Conversation
There was a problem hiding this comment.
Suggest adding this to AuthConfig instead using druid.auth.unsecuredPaths, so that all of the general auth-related parameters are in one place
|
There are some checks in AuthorizationUtils that check for bugs where the code authorizes a request multiple times: Prior to this patch, UNSECURED_PATHS only contained paths that did not have authorization checks. With this patch, this check would need to be adjusted so that these functions no-op when the path is already allowed through the unsecured paths config. Perhaps |
5a6c758 to
08a6267
Compare
nishantmonu51
left a comment
There was a problem hiding this comment.
@jon-wei : Made changes are per your comments.
|
|
||
| AuthenticationResult result = (AuthenticationResult) request.getAttribute(AuthConfig.DRUID_AUTHENTICATION_RESULT); | ||
| if (authInfoChecked != null || result != null) { | ||
| if (authInfoChecked != null || result != null || allowUnsecured != null) { |
There was a problem hiding this comment.
Let's remove the "allowUnsecured" condition here, it's sufficient to check for just authInfoChecked since UnsecuredResourceFilter sets that attribute
There was a problem hiding this comment.
Ah sorry, misread this, thought this was another area, please ignore the above comment
|
Had one comment, latest changes look good aside from that, there are some real unit test failures with the mocks not expecting the new attribute Can you also add something to the integration tests? There's already a test set up in |
review comment - Add integration test and fix UT
|
@jon-wei done. |
|
👍 after travis |
apache#5614) * Add config to allow setting up custom unsecured paths for druid nodes. * return all resources for Unsecured paths * review comment - Add test * fix tests * fix test
apache#5614) * Add config to allow setting up custom unsecured paths for druid nodes. * return all resources for Unsecured paths * review comment - Add test * fix tests * fix test
apache#5614) * Add config to allow setting up custom unsecured paths for druid nodes. * return all resources for Unsecured paths * review comment - Add test * fix tests * fix test
This PR adds a new config
druid.auth.unsecuredPathswhich allows users to set custom unsecured paths.