KillTask should return empty inputSource resources#14106
Merged
zachjsh merged 5 commits intoapache:masterfrom Apr 18, 2023
Merged
KillTask should return empty inputSource resources#14106zachjsh merged 5 commits intoapache:masterfrom
zachjsh merged 5 commits intoapache:masterfrom
Conversation
indexing-service/src/main/java/org/apache/druid/indexing/common/task/HadoopIndexTask.java
Outdated
Show resolved
Hide resolved
indexing-service/src/test/java/org/apache/druid/indexing/common/task/IndexTaskTest.java
Show resolved
Hide resolved
...vice/src/test/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResourceTest.java
Show resolved
Hide resolved
indexing-service/src/test/java/org/apache/druid/indexing/common/task/HadoopIndexTaskTest.java
Outdated
Show resolved
Hide resolved
abhishekrb19
approved these changes
Apr 18, 2023
Contributor
abhishekrb19
left a comment
There was a problem hiding this comment.
Thanks for the fix and addressing the review feedback! LGTM after CI
Should we backport this fix to 26.0 once it's merged to master? (cc: @clintropolis)
...-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java
Outdated
Show resolved
Hide resolved
zachjsh
added a commit
to zachjsh/druid
that referenced
this pull request
Apr 18, 2023
### Description
This pr fixes a few bugs found with the inputSource security feature.
1. `KillUnusedSegmentsTask` previously had no definition for the `getInputSourceResources`, which caused an unsupportedOperationException to be thrown when this task type was submitted with the inputSource security feature enabled. This task type should not require any input source specific resources, so returning an empty set for this task type now.
2. Fixed a bug where when the input source type security feature is enabled, all of the input source type specific resources used where authenticated against:
`{"resource": {"name": "EXTERNAL", "type": "{INPUT_SOURCE_TYPE}"}, "action": "READ"}`
When they should be instead authenticated against:
`{"resource": {"name": "{INPUT_SOURCE_TYPE}", "type": "EXTERNAL"}, "action": "READ"}`
3. fixed bug where supervisor tasks were not authenticated against the specific input source types used, if input source security feature was enabled.
zachjsh
added a commit
that referenced
this pull request
Apr 19, 2023
### Description
This pr fixes a few bugs found with the inputSource security feature.
1. `KillUnusedSegmentsTask` previously had no definition for the `getInputSourceResources`, which caused an unsupportedOperationException to be thrown when this task type was submitted with the inputSource security feature enabled. This task type should not require any input source specific resources, so returning an empty set for this task type now.
2. Fixed a bug where when the input source type security feature is enabled, all of the input source type specific resources used where authenticated against:
`{"resource": {"name": "EXTERNAL", "type": "{INPUT_SOURCE_TYPE}"}, "action": "READ"}`
When they should be instead authenticated against:
`{"resource": {"name": "{INPUT_SOURCE_TYPE}", "type": "EXTERNAL"}, "action": "READ"}`
3. fixed bug where supervisor tasks were not authenticated against the specific input source types used, if input source security feature was enabled.
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 pr fixes a few bugs found with the inputSource security feature.
KillUnusedSegmentsTaskpreviously had no definition for thegetInputSourceResources, which caused an unsupportedOperationException to be thrown when this task type was submitted with the inputSource security feature enabled. This task type should not require any input source specific resources, so returning an empty set for this task type now.Fixed a bug where when the input source type security feature is enabled, all of the input source type specific resources used where authenticated against:
{"resource": {"name": "EXTERNAL", "type": "{INPUT_SOURCE_TYPE}"}, "action": "READ"}When they should be instead authenticated against:
{"resource": {"name": "{INPUT_SOURCE_TYPE}", "type": "EXTERNAL"}, "action": "READ"}This PR has: