smiklosovic commented on a change in pull request #1043:
URL: https://github.com/apache/cassandra/pull/1043#discussion_r646329548
##########
File path: src/java/org/apache/cassandra/cql3/QueryEvents.java
##########
@@ -235,6 +246,15 @@ public void notifyPrepareFailure(@Nullable CQLStatement
statement, String query,
}
}
+ private String possiblyObfuscateQuery(CQLStatement statement, String query)
Review comment:
@sumanth-pasupuleti this is really it? Are we sure they are set /
changed just in these cases? I am just asking, seems to be rather simple :) it
is possible to get if it is DCL statement from `statement.auditContext()`
something like:
```
private String possiblyObfuscateQuery(CQLStatement statement, String query)
{
return statement.getAuditLogContext().auditLogEntryType.getCategory() ==
AuditLogEntryCategory.DCL ?
queryObfuscator.obfuscate(query) : query;
}
```
This seems to me to be more "robust". However, `getAuditLogContext` is
creating new object every time so I am not sure about this approach and maybe
we are better off, from performance perspective, to do it like you do. I just
want to be sure that we have not forgotten anything else because if we work
with credentials in any other statement in the future (which is quite
unlikely), they would start to leak if we dont update this code. I would rather
cover whole DCL class then individual statements.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]