alluxio icon indicating copy to clipboard operation
alluxio copied to clipboard

Support record audit log for getMountTable op

Open maobaolong opened this issue 2 years ago • 2 comments

What changes are proposed in this pull request?

Support record the audit log for getMounttable operation.

Why are the changes needed?

Just add auditlog context.

Does this PR introduce any user facing changes?

No.

2022-08-03 22:53:40,239 INFO  AUDIT_LOG - succeeded=true	allowed=true	ugi=mbl,staff (AUTH=SIMPLE)	ip=/127.0.0.1:65311	cmd=getMountPointInfo(invokeUfs)	src=null	dst=null	perm=null	executionTimeUs=436
2022-08-03 22:53:51,628 INFO  AUDIT_LOG - succeeded=true	allowed=true	ugi=mbl,staff (AUTH=SIMPLE)	ip=/127.0.0.1:65332	cmd=getMountPointInfo(invokeUfs)	src=null	dst=null	perm=null	executionTimeUs=940
2022-08-03 22:54:00,779 INFO  AUDIT_LOG - succeeded=true	allowed=true	ugi=mbl,staff (AUTH=SIMPLE)	ip=/127.0.0.1:65348	cmd=getMountPointInfo(invokeUfs)	src=null	dst=null	perm=null	executionTimeUs=617
2022-08-03 22:54:14,247 INFO  AUDIT_LOG - succeeded=true	allowed=true	ugi=mbl,staff (AUTH=SIMPLE)	ip=/127.0.0.1:65439	cmd=getMountPointInfo	src=null	dst=null	perm=null	executionTimeUs=71
2022-08-03 22:54:24,869 INFO  AUDIT_LOG - succeeded=true	allowed=true	ugi=mbl,staff (AUTH=SIMPLE)	ip=/127.0.0.1:65451	cmd=getMountPointInfo	src=null	dst=null	perm=null	executionTimeUs=78
2022-08-03 22:54:32,817 INFO  AUDIT_LOG - succeeded=true	allowed=true	ugi=mbl,staff (AUTH=SIMPLE)	ip=/127.0.0.1:65475	cmd=getMountPointInfo	src=null	dst=null	perm=null	executionTimeUs=94

maobaolong avatar Aug 03 '22 15:08 maobaolong

The code change looks good to me, but may I ask why you want audit info for this call? This method is purely informational, does not mutate Alluxio nor UFS's state, and does not require or check any user permission. So audit logging this call does not seem very useful to me.

dbw9580 avatar Aug 04 '22 02:08 dbw9580

@dbw9580 I can see the source ip and whether this call will invoke ufs, the most important information for me is execution time.

maobaolong avatar Aug 04 '22 15:08 maobaolong

alluxio-bot, merge this please

jiacheliu3 avatar Aug 12 '22 03:08 jiacheliu3