You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/03/30 07:39:12 UTC

[GitHub] reddycharan commented on a change in pull request #1311: (WIP) Issue #1310: Filter out body and masterKey from ProcessorV3s

reddycharan commented on a change in pull request #1311: (WIP) Issue #1310: Filter out body and masterKey from ProcessorV3s
URL: https://github.com/apache/bookkeeper/pull/1311#discussion_r178247154
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/WriteEntryProcessorV3.java
 ##########
 @@ -170,4 +170,18 @@ public void safeRun() {
                          requestProcessor.addRequestStats);
         }
     }
+
+    /**
+     * this toString method filters out body and masterKey from the output.
+     * masterKey contains the password of the ledger and body is customer data,
+     * so it is not appropriate to have these in logs or system output.
+     */
+    @Override
+    public String toString() {
+        Request.Builder reqBuilder = Request.newBuilder().setHeader(request.getHeader());
 
 Review comment:
   I've mixed opinion. 
   
   AFAIU These kind of log lines (involving toString of ProcessorV3) are called rarely and may be it is ok to create a new request object. Also, it is easier to backlist one are two unwanted fields rather than whitelisting all other fields (including header/fields of header).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services