[ 
https://issues.apache.org/jira/browse/CASSANDRA-12151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468457#comment-16468457
 ] 

Jason Brown commented on CASSANDRA-12151:
-----------------------------------------

On the whole, we're almost there. I've done a last-pass review, fixed a few 
last dangling items (see below), and pushed a commit up to my branch. Just a 
few last questions:
 - Do we need the -D jvm arg to set {{AuditLogOptions#audit_logs_dir}}? This 
kinda comes out of nowhere and matches nothing else in the audit log config.
 - Operators cannot, in an obvious manner, adjust the following 
{{AuditLogOptions}} options: 
audit_logs_dir/block/max_queue_weight/max_log_size/roll_cycle. They are 
basically hidden yaml options: you can set them, but you have to know they 
exist. I understand these are more advanced options, but we should document 
them either in the yaml or the doc page.

what i've done in latest commit:
 - cleaned up yaml comments, and point users to the audit_log docs; else, it's 
gonna real messy real quick
 - trivial clean ups: NEWS.txt, formatting, white space, comments, removed 
unused methods, fixed test method names in {{AuditLoggerTest}}
 - reworked {{AuditLogFilter#create()}} to eliminate garbage collection of all 
the {{HashSet}} s, which then we pass to {{ImmutableSet#of}}
 - Added path checking in {{AuditLogManager}} to ensure when enabling either 
FQL or audit logging, the path doesn't conflict with the other. This was easy 
enough to do for the {{BinLog}}-related {{IAuditLogger}}, but I have no idea 
how to get the directory or file from logback (when using {{FileAuditLogger}}). 
Since that's a 'spare' implementation, I've punted for now.
 - clarified {{AuditLogEntry#timestamp}} to allow {{Builder}} users to 
explicitly set the value. This allows the FQL paths to be more in tune with 
their original code (where it would get {{System#currentTimeMillis()}} instead 
of using {{queryStartNanoTime}}).

Tests running.

> Audit logging for database activity
> -----------------------------------
>
>                 Key: CASSANDRA-12151
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12151
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: stefan setyadi
>            Assignee: Vinay Chella
>            Priority: Major
>             Fix For: 4.x
>
>         Attachments: 12151.txt, CASSANDRA_12151-benchmark.html, 
> DesignProposal_AuditingFeature_ApacheCassandra_v1.docx
>
>
> we would like a way to enable cassandra to log database activity being done 
> on our server.
> It should show username, remote address, timestamp, action type, keyspace, 
> column family, and the query statement.
> it should also be able to log connection attempt and changes to the 
> user/roles.
> I was thinking of making a new keyspace and insert an entry for every 
> activity that occurs.
> Then It would be possible to query for specific activity or a query targeting 
> a specific keyspace and column family.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to