[ 
https://issues.apache.org/jira/browse/HDFS-9343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mingliang Liu updated HDFS-9343:
--------------------------------
    Attachment: HDFS-9343.001.patch

Thank you [~hitesh] for your comment.

{quote}
isValid() - is this meant to be a public API? Should this be renamed to 
isContextValid() as it is only checking the context part?
{quote}
Yes, it makes a lot of sense to rename the method as we validate the context 
only.

{quote}
Not checking for zero-length string?
should signature validity check be moved into a function too?
{quote}
Yes we should ignore the signature if user passes an empty string. The 
signature will be null because the {{CallerContext.Builder.setSignature()}} 
will ignore empty string. We have a test case for this in 
{{org.apache.hadoop.hdfs.server.namenode.TestAuditLogger:365}}. We don't know 
the maximum signature in caller context class as we don't have access to 
configuration, moving the validation to {{CallerContext}} may be not necessary.

> Empty caller context considered invalid
> ---------------------------------------
>
>                 Key: HDFS-9343
>                 URL: https://issues.apache.org/jira/browse/HDFS-9343
>             Project: Hadoop HDFS
>          Issue Type: Task
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>         Attachments: HDFS-9343.000.patch, HDFS-9343.001.patch
>
>
> The caller context with empty context string is considered invalid, and it 
> should not appear in the audit log.
> Meanwhile, too long signature will not be written to audit log.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to