-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1660591 Remove sensitive encryption info when logging #2077
base: master
Are you sure you want to change the base?
SNOW-1660591 Remove sensitive encryption info when logging #2077
Conversation
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
Outdated
Show resolved
Hide resolved
@sfc-gh-mzurek can you have a look? |
* @param message the message text which may contain encryption material | ||
* @return Return filtered message | ||
*/ | ||
public static String filterEncryptionMaterial(String message) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add this function as well to the chain in maskSecrets method?
@@ -1337,7 +1338,8 @@ private static JsonNode parseCommandInGS(SFStatement statement, String command) | |||
} | |||
|
|||
JsonNode jsonNode = (JsonNode) result; | |||
logger.debug("Response: {}", jsonNode.toString()); | |||
|
|||
logger.debug("Response: {}", SecretDetector.filterEncryptionMaterial(jsonNode.toString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we replace that call with maskSecrets method? we want to replace any possible secrets
Overview
SNOW-1660591
Pre-review self checklist
master
branchmvn -P check-style validate
)mvn verify
and inspecttarget/japicmp/japicmp.html
)SNOW-XXXX:
External contributors - please answer these questions before submitting a pull request. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Issue: #NNNN
Fill out the following pre-review checklist:
@SnowflakeJdbcInternalApi
(note that public/protected methods/fields in classes marked with this annotation are already internal)Please describe how your code solves the related issue.
Parses out the "encryptionMaterial" from the JsonNode before logging