You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "dhavalshah9131 (via GitHub)" <gi...@apache.org> on 2025/10/29 09:53:44 UTC

Re: [PR] RANGER-5341: Capture opCode in KMS access logs for EEK_OP operations [ranger]

dhavalshah9131 commented on code in PR #688:
URL: https://github.com/apache/ranger/pull/688#discussion_r2472360028


##########
kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSMDCFilter.java:
##########


Review Comment:
   Please check for the unit test coverage for new changes.



##########
kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSMDCFilter.java:
##########
@@ -70,15 +78,32 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
                 DATA_TL.remove();
 
                 UserGroupInformation ugi         = HttpUserGroupInformation.get();
-                String               method      = ((HttpServletRequest) request).getMethod();
-                StringBuffer         requestURL  = ((HttpServletRequest) request).getRequestURL();
-                String               queryString = ((HttpServletRequest) request).getQueryString();
+                String               method      = req.getMethod();
+                StringBuffer         requestURL  = req.getRequestURL();
+                String               queryString = req.getQueryString();
+
+                // Extract operation from query parameters if present

Review Comment:
   Can you check for exception and handle it accordingly. E.G. UnsupportedEncodingException.



-- 
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: dev-unsubscribe@ranger.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org