[ 
https://issues.apache.org/jira/browse/RANGER-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133319#comment-18133319
 ] 

Abhishek Kumar commented on RANGER-5795:
----------------------------------------

Merged in ranger-2.10: 
https://github.com/apache/ranger/commit/f7f746f63f746a147575b27c061f1a797584f32a

> 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
(v10.3.26#10030026)

Reply via email to