[
https://issues.apache.org/jira/browse/RANGER-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Abhishek Kumar resolved RANGER-5795.
------------------------------------
Fix Version/s: 3.0.0
Resolution: Fixed
Merged in master:
https://github.com/apache/ranger/commit/ad5eddafe829f7bd378b0d45e391b2bded145ed7
> Support pluggable token supplier in Ranger REST client to obtain and refresh
> bearer tokens dynamically
> ------------------------------------------------------------------------------------------------------
>
> Key: RANGER-5795
> URL: https://issues.apache.org/jira/browse/RANGER-5795
> Project: Ranger
> Issue Type: Improvement
> Components: Ranger
> Reporter: Abhishek Kumar
> Assignee: Abhishek Kumar
> Priority: Major
> Fix For: 3.0.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Allow a pluggable token supplier for the Ranger REST client, configurable per
> plugin, e.g.:
> ranger.plugin.hive.policy.rest.client.jwt.provider=com.example.MyJwtSupplier
> 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 (preferring a Configuration-arg
> constructor, falling back to a no-arg constructor); otherwise the built-in
> DefaultJwtProvider is used.
> As part of this, the Ranger-specific JwtProvider interface is replaced by
> Supplier<String>, and DefaultJwtProvider now implements Supplier<String>.
> The supplier's get() is invoked per request, so applications can plug in
> custom logic that obtains and refreshes tokens dynamically when the Ranger
> REST client makes calls.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)