Input source security 26.0.0 backport#14066
Merged
clintropolis merged 3 commits intoapache:26.0.0from Apr 13, 2023
Merged
Conversation
… types (apache#14050) ### Description This change allows for input sources used during MSQ ingestion to be authorized for multiple input source types, instead of just 1. Such an input source that allows for multiple types is the CombiningInputSource. Also fixed bug that caused some input source specific functions to be authorized against the permissions ` [ new ResourceAction(new Resource(ResourceType.EXTERNAL, ResourceType.EXTERNAL), Action.READ), new ResourceAction(new Resource(ResourceType.EXTERNAL, {input_source_type}), Action.READ) ] ` when the inputSource based authorization feature is enabled, when it should instead be authorized against ` [ new ResourceAction(new Resource(ResourceType.EXTERNAL, {input_source_type}), Action.READ) ] `
### Description Previously msq controller and worker tasks did not have implementations for the `getInputSourceResources()` method. This causes the submission of these tasks to fail if the following auth config is enabled: `druid.auth.enableInputSourceSecurity=true` Added implementations of this method for these tasks that return an empty set of input sources. This means that for these task types, if `druid.auth.enableInputSourceSecurity=true` config is used, the input source types will be properly computed and authorized in the SQL layer, but not if the equivalent controller / worker tasks are submitted to the task endpoint.
…ty-26.0.0-backport
Member
|
ci failure is unrelated, should be fixed by #14079 |
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.
Description
This change backports the following 2 prs: (#14050, #14056)
#14050 allows for input sources used during MSQ ingestion to be authorized for multiple input source types, instead of just 1. Such an input source that allows for multiple types is the CombiningInputSource.
Also fixed bug that caused some input source specific functions to be authorized against the permissions
[ new ResourceAction(new Resource(ResourceType.EXTERNAL, ResourceType.EXTERNAL), Action.READ), new ResourceAction(new Resource(ResourceType.EXTERNAL, {input_source_type}), Action.READ) ]when the inputSource based authorization feature is enabled, when it should instead be authorized against
[ new ResourceAction(new Resource(ResourceType.EXTERNAL, {input_source_type}), Action.READ) ]#14056 fixed a bug where msq controller and worker tasks did not have implementations for the
getInputSourceResources()method. This causes the submission of these tasks to fail if the following auth config is enabled:druid.auth.enableInputSourceSecurity=trueAdded implementations of this method for these tasks that return an empty set of input sources. This means that for these task types, if
druid.auth.enableInputSourceSecurity=trueconfig is used, the input source types will be properly computed and authorized in the SQL layer, but not if the equivalent controller / worker tasks are submitted to the task endpoint.This PR has: