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

Larry McCay commented on HADOOP-12758:
--------------------------------------

[~cnauroth] - thanks for articulating that - I agree with you.

>From an ops perspective we need to minimize what needs to be done by the admin 
>for each component across the platform as much as possible. Having sane 
>defaults for a mechanism like this is very important.

There may be a third option and that is to reverse the semantics of the 
excluded user-agents and create a browsers list instead of non-browsers. This 
would address both the defaults for ops/admins as well as not breaking any 
non-browsers. Python and Ruby wouldn't need to provide some user-agent to match 
the list.

It would likely result in many strings given the variations in the user-agent 
string based on versions. Perhaps, it would make sense to use a list of regex 
expressions to match browsers. We could then wildcard a bit and reduce the 
hassle of maintaining this list with every browser release, etc. It would 
however have a cost of more complicated configuration - regex.

If this were palatable to folks then maybe we could add it to 
AltKerberosAuthenticationHandler as an option as well.

I am open to other suggestions as well.

> Extend CSRF Filter with UserAgent Checks
> ----------------------------------------
>
>                 Key: HADOOP-12758
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12758
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>            Reporter: Larry McCay
>            Assignee: Larry McCay
>             Fix For: 2.8.0
>
>         Attachments: HADOOP-12758-001.patch, HADOOP-12758-002.patch
>
>
> To protect against CSRF attacks, HADOOP-12691 introduces a CSRF filter that 
> will require a specific HTTP header to be sent with every REST API call. This 
> will affect all API consumers from web apps to CLIs and curl. 
> Since CSRF is primarily a browser based attack we can try and minimize the 
> impact on non-browser clients.
> This enhancement will provide additional configuration for identifying 
> non-browser useragents and skipping the enforcement of the header requirement 
> for anything identified as a non-browser. This will largely limit the impact 
> to browser based PUT and POST calls when configured appropriately.



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

Reply via email to