KNOX-2757 - HadoopGroupProvider parameters should be added to the filter even there is a gateway level property with CENTRAL_GROUP_CONFIG_PREFIX #590
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.
What changes were proposed in this pull request?
From now on, in Knox's HadoopGroupProvider, the gateway-level
CENTRAL_GROUP_CONFIG_PREFIX
prefixed parameters are added together with any custom provider-level parameters into the finalHadoopGroupProvider
identity assertion filter of the generated web application.I also needed to re-factor some code out from the
gateway-server
project that implements certain descriptor-related interfaces fromgateway-spi
as a simple POJO. The new Maven module's name isgateway-spi-common
and I already see the benefit of having this new project serving the same functionality for other developments in the future.With this new project we now do not need to create/mock already existing classes that we can re-use in our test classes where mocking isn't a really good option.
How was this patch tested?
Added new unit tests to check if filter properties are generated as expected. Apart from this, I also tested the fix manually with my local Knox instance using the
Steps to reproduce
information from the corresponding JIRA: