You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Mandar Ambawane <ma...@freestoneinfotech.com> on 2019/10/24 07:25:11 UTC

Review Request 71670: Added headers in atlas api

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71670/
-----------------------------------------------------------

Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.


Bugs: ATLAS-3490
    https://issues.apache.org/jira/browse/ATLAS-3490


Repository: atlas


Description
-------

Added headers in atlas api by using AtlasHeaderFilter


Diffs
-----

  webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderFilter.java PRE-CREATION 
  webapp/src/main/webapp/WEB-INF/web.xml 8f3f175 


Diff: https://reviews.apache.org/r/71670/diff/1/


Testing
-------

Tested headers for following apis


GET: atlas/api/atlas/admin/metrics
GET: atlas/api/atlas/admin/status


Thanks,

Mandar Ambawane


Re: Review Request 71670: Added headers in atlas api

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71670/#review218493
-----------------------------------------------------------


Ship it!




Ship It!

- Sarath Subramanian


On Nov. 4, 2019, 6:37 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71670/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2019, 6:37 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3490
>     https://issues.apache.org/jira/browse/ATLAS-3490
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Added headers in atlas api by using AtlasHeaderFilter
> 
> 
> Diffs
> -----
> 
>   webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java f56aeb4 
>   webapp/src/main/java/org/apache/atlas/web/filters/AtlasCSRFPreventionFilter.java 277ac22 
>   webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderFilter.java PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java 8bac8c6 
>   webapp/src/main/java/org/apache/atlas/web/filters/HeadersUtil.java PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/security/AtlasSecurityConfig.java 0b1bbd8 
>   webapp/src/main/webapp/WEB-INF/web.xml 8f3f175 
> 
> 
> Diff: https://reviews.apache.org/r/71670/diff/2/
> 
> 
> Testing
> -------
> 
> Tested headers for following apis
> 
> 
> GET: atlas/api/atlas/admin/metrics
> GET: atlas/api/atlas/admin/status
> 
> Basic testing done for headers.
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Re: Review Request 71670: Added headers in atlas api

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71670/
-----------------------------------------------------------

(Updated Nov. 4, 2019, 2:37 p.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.


Changes
-------

Added HeaderUtil to read headers from a single file.


Bugs: ATLAS-3490
    https://issues.apache.org/jira/browse/ATLAS-3490


Repository: atlas


Description
-------

Added headers in atlas api by using AtlasHeaderFilter


Diffs (updated)
-----

  webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java f56aeb4 
  webapp/src/main/java/org/apache/atlas/web/filters/AtlasCSRFPreventionFilter.java 277ac22 
  webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderFilter.java PRE-CREATION 
  webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java 8bac8c6 
  webapp/src/main/java/org/apache/atlas/web/filters/HeadersUtil.java PRE-CREATION 
  webapp/src/main/java/org/apache/atlas/web/security/AtlasSecurityConfig.java 0b1bbd8 
  webapp/src/main/webapp/WEB-INF/web.xml 8f3f175 


Diff: https://reviews.apache.org/r/71670/diff/2/

Changes: https://reviews.apache.org/r/71670/diff/1-2/


Testing (updated)
-------

Tested headers for following apis


GET: atlas/api/atlas/admin/metrics
GET: atlas/api/atlas/admin/status

Basic testing done for headers.


Thanks,

Mandar Ambawane


Re: Review Request 71670: Added headers in atlas api

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71670/#review218387
-----------------------------------------------------------


Fix it, then Ship it!





webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderFilter.java
Lines 42 (patched)
<https://reviews.apache.org/r/71670/#comment306097>

    Some of these headers are added by other filters:
     X-Frame-Options:           AtlasAuthenticationFilter, AtlasKnoxSSOAuthenticationFilter, AtlasCSRFPreventionFilter
     X-Content-Type-Option:     AtlasAuthenticationFilter, AtlasKnoxSSOAuthenticationFilter
     X-XSS-Protection:          AtlasAuthenticationFilter, AtlasKnoxSSOAuthenticationFilter
     Strict-Transport-Security: AtlasAuthenticationFilter, AtlasKnoxSSOAuthenticationFilter
     Content-Security-Policy:   AtlasSecurityConfig
     Server:                    AtlasSecurityConfig
    
    Please review if addition of such headers in http-responses can be handled from a single Filter class.


- Madhan Neethiraj


On Oct. 24, 2019, 7:25 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71670/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2019, 7:25 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3490
>     https://issues.apache.org/jira/browse/ATLAS-3490
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Added headers in atlas api by using AtlasHeaderFilter
> 
> 
> Diffs
> -----
> 
>   webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderFilter.java PRE-CREATION 
>   webapp/src/main/webapp/WEB-INF/web.xml 8f3f175 
> 
> 
> Diff: https://reviews.apache.org/r/71670/diff/1/
> 
> 
> Testing
> -------
> 
> Tested headers for following apis
> 
> 
> GET: atlas/api/atlas/admin/metrics
> GET: atlas/api/atlas/admin/status
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Re: Review Request 71670: Added headers in atlas api

Posted by Ashutosh Mestry via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71670/#review218388
-----------------------------------------------------------




webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderFilter.java
Lines 43 (patched)
<https://reviews.apache.org/r/71670/#comment306098>

    Since these are added to every request, it may make sense to create a _static final map_ and cycle through all the headers.
    
    Refactor: Extract inline data.
    
    If there are additional headers that are context dependent that are added/removed, consider builder implementation.


- Ashutosh Mestry


On Oct. 24, 2019, 7:25 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71670/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2019, 7:25 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3490
>     https://issues.apache.org/jira/browse/ATLAS-3490
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Added headers in atlas api by using AtlasHeaderFilter
> 
> 
> Diffs
> -----
> 
>   webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderFilter.java PRE-CREATION 
>   webapp/src/main/webapp/WEB-INF/web.xml 8f3f175 
> 
> 
> Diff: https://reviews.apache.org/r/71670/diff/1/
> 
> 
> Testing
> -------
> 
> Tested headers for following apis
> 
> 
> GET: atlas/api/atlas/admin/metrics
> GET: atlas/api/atlas/admin/status
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>