Skip to content

RANGER-5709: Fix KMS secure download for roles, tags, and userstore - #1114

Merged
ramackri merged 2 commits into
apache:masterfrom
ramackri:RANGER-5709
Jul 29, 2026
Merged

RANGER-5709: Fix KMS secure download for roles, tags, and userstore#1114
ramackri merged 2 commits into
apache:masterfrom
ramackri:RANGER-5709

Conversation

@ramackri

@ramackri ramackri commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

KMS plugin users (e.g. rangerkms) were getting HTTP 400 on secure roles, tags, and userstore download. Those endpoints called getServiceByName(), which requires keyadmin to read a KMS service—before the download allowlist is checked.

Policy download already uses getServiceByNameForDP() for KMS. This PR applies the same pattern to:

Endpoint Allowlist config
RoleREST.getSecureRangerRolesIfUpdated() policy.download.auth.users
TagREST.getSecureServiceTagsIfUpdated() tag.download.auth.users
XUserREST.getSecureRangerUserStoreIfUpdated() userstore.download.auth.users

Test changes

  • TestTagREST — updated KMS mocks (test52, test54) to expect getServiceByNameForDP()
  • TestRoleREST — added test17eGetSecureRangerRolesIfUpdatedKmsUsesServiceByNameForDP
  • TestXUserREST — no code changes (existing tests still pass)

Test plan

  • TestTagREST KMS secure download tests
  • TestRoleREST#test17e KMS secure roles download
  • TestRoleREST#test17* regression
  • TestXUserREST#test142 regression
  • PMD on security-admin

https://issues.apache.org/jira/browse/RANGER-5709

Use getServiceByNameForDP() for KMS services in RoleREST, TagREST, and
XUserREST secure download paths, matching policy download behavior.
Assert RoleREST uses getServiceByNameForDP() for KMS services.
@ramackri
ramackri merged commit 7e2af7a into apache:master Jul 29, 2026
4 checks passed
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.

2 participants