Skip to content

RANGER-5624: Fix inconsistent updatedBy masking in groupName API#1055

Merged
ramackri merged 1 commit into
apache:ranger-2.9from
krishnamuttevi:backport-d980f9-to-2.9
Jul 9, 2026
Merged

RANGER-5624: Fix inconsistent updatedBy masking in groupName API#1055
ramackri merged 1 commit into
apache:ranger-2.9from
krishnamuttevi:backport-d980f9-to-2.9

Conversation

@krishnamuttevi

Copy link
Copy Markdown
Contributor

Currently, there is an inconsistency in the masking behavior of the updatedBy field in VXGroup responses across group retrieval APIs. When a group is fetched by its ID (GET /xusers/groups/{id}), the field is correctly masked to prevent metadata leakage. However, retrieving the exact same group by its name ( GET /xusers/groups/groupName/ group_name} ) bypasses this masking and exposes the actual user value (e.g., "Admin"). This inconsistency leads to an unreliable API contract and the unintended exposure of sensitive user-related metadata.

This was solved by:

Resolve the group ID using the requested group name directly within the xuserrest layer.

Route the subsequent retrieval call through the existing xUserMgr.getXGroup(id) method.

Update the following unit tests accordingly

Align the underlying logic so both endpoints share the exact same retrieval pipeline, ensuring the updatedBy field is consistently masked across all responses.

@ChinmayHegde24 ChinmayHegde24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Add this version in JIRA affects version part.

@krishnamuttevi krishnamuttevi marked this pull request as ready for review July 9, 2026 09:45
@ramackri ramackri merged commit d02d53f into apache:ranger-2.9 Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants