ranger icon indicating copy to clipboard operation
ranger copied to clipboard

fix: mismatch the value of access_type and action

Open Wenkang-xu opened this issue 2 years ago • 3 comments

When I try to use the ranger audit logs to analysis the access info, the value of Access Type and Permission on the ranger web page confuses me. After readed the source code, I found the problem that mismatch the value of Access Type and Permission.

Wenkang-xu avatar Apr 10 '23 02:04 Wenkang-xu

image image Look at the picture above, the first picture shows some hive audit logs, the second picture shows some prestodb audit logs.

explain the problem

We know Permission on the web page is the Operation Type [this.setAction(hiveOpTypeName);] which doesn't contain "select"(See this). For example: HiveAccessType.SELECT can reference many Operation Type, like QUERY, SHOWPARTITIONS etc. You can find in this code. Therefore we can clearly judge that mismatch the value between Access Type and Action.

Test my code

After I changed the code which is my submit and repackaged it, the web page show autit logs as I expected. image

image

Wenkang-xu avatar Apr 10 '23 03:04 Wenkang-xu