KNOX-3397: Add preauth.auth.header.actor.groups to set actor groups header name explicitly - #1329
Merged
Merged
Conversation
…eader name explicitly
Test Results40 tests 40 ✅ 6s ⏱️ Results for commit 418d53b. |
smolnar82
added a commit
that referenced
this pull request
Jul 27, 2026
…eader name explicitly (#1329)
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.
KNOX-3397 - Allow the actor groups header name to be configured explicitly
What changes were proposed in this pull request?
KNOX-3354 removed the index suffix from the actor groups header when roles are resolved at the resource layer (rather than in the LDAP interceptors), so that the configured actor groups header is not postfixed. This is useful in environments where role lookup is configured locally.
However, a topology may instead use the RemoteAuthFilter to authenticate requests, where the remote counterpart is configured for role lookup. In that case remote.auth.group.header returns roles rather than groups, but the
KNOX-AUTH-SERVICEconfigured in the topology still emits the suffixed version ofpreauth.auth.header.actor.groups.prefix, causing a mismatch.To give operators explicit control over this, this PR introduces a new configuration parameter in AbstractAuthResource:
preauth.auth.header.actor.groups. When declared, it takes precedence over the existingpreauth.auth.header.actor.groups.prefixparameter and is used directly as the groups header name in the response, without any index suffix.When the new parameter is not set, behavior is unchanged (fully backward compatible). The header-name selection logic was also extracted into a small private
createGroupsHeaderName(...)helper for readability.How was this patch tested?
Integration Tests
N/A
UI changes
N/A