mneethiraj commented on code in PR #831:
URL: https://github.com/apache/ranger/pull/831#discussion_r2747958517
##########
agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRESTClient.java:
##########
@@ -732,8 +747,18 @@ private Client buildClient() {
client = Client.create(config);
}
- if (basicAuthFilter != null &&
!client.isFilterPresent(basicAuthFilter)) {
+ if (StringUtils.isNotEmpty(jwt)) { // use JWT if present
+ client.addFilter(new ClientFilter() {
Review Comment:
Line 713 removes `basicAuthFilter` to enable use of session cookie.
Similarlly the filter set here for JWT needs to be removed as well. Please
review and update.
##########
agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRESTClient.java:
##########
@@ -115,9 +125,14 @@ public RangerRESTClient(String url, String
sslConfigFileName, Configuration conf
} else {
setLastKnownActiveUrlIndex((new
Random()).nextInt(getConfiguredURLs().size()));
}
+ this.propertyPrefix = propertyPrefix;
init(config);
}
+ private static String getPropertyPrefix(Configuration config) {
Review Comment:
`private` methods should be after all `public` and `protected` methods.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]