Skip to content

RANGER-5795: Support pluggable token supplier in Ranger REST client to obtain and refresh bearer tokens dynamically - #1227

Open
kumaab wants to merge 3 commits into
apache:masterfrom
kumaab:ranger_5795
Open

RANGER-5795: Support pluggable token supplier in Ranger REST client to obtain and refresh bearer tokens dynamically#1227
kumaab wants to merge 3 commits into
apache:masterfrom
kumaab:ranger_5795

Conversation

@kumaab

@kumaab kumaab commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Introduce new config:

  • ranger.plugin.<service>.policy.rest.client.jwt.supplier to supply a custom Token Supplier
  • defaulting to DefaultTokenSupplier if unavailable and JWT_SOURCE is configured.

The configured class must implement the JDK's java.util.function.Supplier<String>, so custom token suppliers can be plain lambdas/suppliers with no dependency on Ranger libraries. If the property is set, the class is instantiated via reflection.

Refactoring occurrences to generic TokenSupplier and using JWT as one default implementation via DefaultTokenSupplier

How was this patch tested?

  • added additional unit tests

…o obtain and refresh bearer tokens dynamically
@kumaab kumaab self-assigned this Sep 11, 2026
@kumaab
kumaab marked this pull request as draft September 11, 2026 21:47
@kumaab
kumaab marked this pull request as ready for review September 13, 2026 18:11
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