You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by chaitali <ch...@freestoneinfotech.com> on 2020/12/01 08:12:45 UTC

Re: Review Request 73047: ATLAS-4054 : Change Atlas config for atlas.jetty.request.buffer.size

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

(Updated Dec. 1, 2020, 8:12 a.m.)


Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.


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


Repository: atlas


Description
-------

Jetty was upgraded to 9.2.x prior to this jira, but due to some issues with the jetty version, it was reverted back to jetty 8.x, but code changes to set header size were incorrect,

connector.setResponseBufferSize(bufferSize);
connector.setRequestBufferSize(bufferSize);

Prior to change Atlas responds with 413 code even with the header size less than 8K (default header size in jetty 8 is 6K)

curl -w % {size_header} -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6000 | head -n 1)" hostname:21000/api/atlas/admin/session
Error: Request Entity Too Large: head99[root@c116-node8 ~]#

After code changes and setting buffer.size to 16000:

#curl -w %{size_header}
-u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16000 | head -n 1)" hostname:21000/api/atlas/admin/session
[root]# curl -w %

{size_header}
-u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15000 | head -n 1)" hostname:21000/api/atlas/admin/session

{"atlas.rest-csrf.enabled":true,"atlas.rest-csrf.browser-useragents-regex":"^Mozilla.*,^Opera.*,^Chrome","atlas.rest-csrf.methods-to-ignore":"GET,OPTIONS,HEAD,TRACE","atlas.rest-csrf.custom-header":"X-XSRF-HEADER","atlas.feature.taxonomy.enable":false,"atlas.entity.update.allowed":true,"atlas.entity.create.allowed":true,"atlas.ui.editable.entity.types":"hdfs_path,hbase_table,hbase_column,hbase_column_family,kafka_topic","userName":"admin","groups":["ROLE_ADMIN"]}


Diffs
-----

  webapp/src/main/java/org/apache/atlas/web/service/EmbeddedServer.java 5724ad131 


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


Testing
-------

Precommit:

https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/228/console


Thanks,

chaitali


Re: Review Request 73047: ATLAS-4054 : Change Atlas config for atlas.jetty.request.buffer.size

Posted by Nixon Rodrigues <ni...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73047/#review222276
-----------------------------------------------------------


Ship it!




Ship It!

- Nixon Rodrigues


On Dec. 1, 2020, 8:12 a.m., chaitali wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73047/
> -----------------------------------------------------------
> 
> (Updated Dec. 1, 2020, 8:12 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4054
>     https://issues.apache.org/jira/browse/ATLAS-4054
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Jetty was upgraded to 9.2.x prior to this jira, but due to some issues with the jetty version, it was reverted back to jetty 8.x, but code changes to set header size were incorrect,
> 
> connector.setResponseBufferSize(bufferSize);
> connector.setRequestBufferSize(bufferSize);
> 
> Prior to change Atlas responds with 413 code even with the header size less than 8K (default header size in jetty 8 is 6K)
> 
> curl -w % {size_header} -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6000 | head -n 1)" hostname:21000/api/atlas/admin/session
> Error: Request Entity Too Large: head99[root@c116-node8 ~]#
> 
> After code changes and setting buffer.size to 16000:
> 
> #curl -w %{size_header}
> -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16000 | head -n 1)" hostname:21000/api/atlas/admin/session
> [root]# curl -w %
> 
> {size_header}
> -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15000 | head -n 1)" hostname:21000/api/atlas/admin/session
> 
> {"atlas.rest-csrf.enabled":true,"atlas.rest-csrf.browser-useragents-regex":"^Mozilla.*,^Opera.*,^Chrome","atlas.rest-csrf.methods-to-ignore":"GET,OPTIONS,HEAD,TRACE","atlas.rest-csrf.custom-header":"X-XSRF-HEADER","atlas.feature.taxonomy.enable":false,"atlas.entity.update.allowed":true,"atlas.entity.create.allowed":true,"atlas.ui.editable.entity.types":"hdfs_path,hbase_table,hbase_column,hbase_column_family,kafka_topic","userName":"admin","groups":["ROLE_ADMIN"]}
> 
> 
> Diffs
> -----
> 
>   webapp/src/main/java/org/apache/atlas/web/service/EmbeddedServer.java 5724ad131 
> 
> 
> Diff: https://reviews.apache.org/r/73047/diff/1/
> 
> 
> Testing
> -------
> 
> Precommit:
> 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/228/console
> 
> 
> Thanks,
> 
> chaitali
> 
>


Re: Review Request 73047: ATLAS-4054 : Change Atlas config for atlas.jetty.request.buffer.size

Posted by Nixon Rodrigues <ni...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73047/#review222279
-----------------------------------------------------------


Ship it!




Ship It!

- Nixon Rodrigues


On Dec. 3, 2020, 12:53 p.m., chaitali wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73047/
> -----------------------------------------------------------
> 
> (Updated Dec. 3, 2020, 12:53 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4054
>     https://issues.apache.org/jira/browse/ATLAS-4054
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Jetty was upgraded to 9.2.x prior to this jira, but due to some issues with the jetty version, it was reverted back to jetty 8.x, but code changes to set header size were incorrect,
> 
> connector.setResponseBufferSize(bufferSize);
> connector.setRequestBufferSize(bufferSize);
> 
> Prior to change Atlas responds with 413 code even with the header size less than 8K (default header size in jetty 8 is 6K)
> 
> curl -w % {size_header} -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6000 | head -n 1)" hostname:21000/api/atlas/admin/session
> Error: Request Entity Too Large: head99[root@c116-node8 ~]#
> 
> After code changes and setting buffer.size to 16000:
> 
> #curl -w %{size_header}
> -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16000 | head -n 1)" hostname:21000/api/atlas/admin/session
> [root]# curl -w %
> 
> {size_header}
> -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15000 | head -n 1)" hostname:21000/api/atlas/admin/session
> 
> {"atlas.rest-csrf.enabled":true,"atlas.rest-csrf.browser-useragents-regex":"^Mozilla.*,^Opera.*,^Chrome","atlas.rest-csrf.methods-to-ignore":"GET,OPTIONS,HEAD,TRACE","atlas.rest-csrf.custom-header":"X-XSRF-HEADER","atlas.feature.taxonomy.enable":false,"atlas.entity.update.allowed":true,"atlas.entity.create.allowed":true,"atlas.ui.editable.entity.types":"hdfs_path,hbase_table,hbase_column,hbase_column_family,kafka_topic","userName":"admin","groups":["ROLE_ADMIN"]}
> 
> 
> Diffs
> -----
> 
>   webapp/src/main/java/org/apache/atlas/web/service/EmbeddedServer.java 5724ad131 
> 
> 
> Diff: https://reviews.apache.org/r/73047/diff/2/
> 
> 
> Testing
> -------
> 
> Precommit:
> 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/228/console
> 
> 
> Thanks,
> 
> chaitali
> 
>


Re: Review Request 73047: ATLAS-4054 : Change Atlas config for atlas.jetty.request.buffer.size

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


Ship it!




Ship It!

- Sarath Subramanian


On Dec. 3, 2020, 4:53 a.m., chaitali wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73047/
> -----------------------------------------------------------
> 
> (Updated Dec. 3, 2020, 4:53 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4054
>     https://issues.apache.org/jira/browse/ATLAS-4054
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Jetty was upgraded to 9.2.x prior to this jira, but due to some issues with the jetty version, it was reverted back to jetty 8.x, but code changes to set header size were incorrect,
> 
> connector.setResponseBufferSize(bufferSize);
> connector.setRequestBufferSize(bufferSize);
> 
> Prior to change Atlas responds with 413 code even with the header size less than 8K (default header size in jetty 8 is 6K)
> 
> curl -w % {size_header} -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6000 | head -n 1)" hostname:21000/api/atlas/admin/session
> Error: Request Entity Too Large: head99[root@c116-node8 ~]#
> 
> After code changes and setting buffer.size to 16000:
> 
> #curl -w %{size_header}
> -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16000 | head -n 1)" hostname:21000/api/atlas/admin/session
> [root]# curl -w %
> 
> {size_header}
> -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15000 | head -n 1)" hostname:21000/api/atlas/admin/session
> 
> {"atlas.rest-csrf.enabled":true,"atlas.rest-csrf.browser-useragents-regex":"^Mozilla.*,^Opera.*,^Chrome","atlas.rest-csrf.methods-to-ignore":"GET,OPTIONS,HEAD,TRACE","atlas.rest-csrf.custom-header":"X-XSRF-HEADER","atlas.feature.taxonomy.enable":false,"atlas.entity.update.allowed":true,"atlas.entity.create.allowed":true,"atlas.ui.editable.entity.types":"hdfs_path,hbase_table,hbase_column,hbase_column_family,kafka_topic","userName":"admin","groups":["ROLE_ADMIN"]}
> 
> 
> Diffs
> -----
> 
>   webapp/src/main/java/org/apache/atlas/web/service/EmbeddedServer.java 5724ad131 
> 
> 
> Diff: https://reviews.apache.org/r/73047/diff/2/
> 
> 
> Testing
> -------
> 
> Precommit:
> 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/228/console
> 
> 
> Thanks,
> 
> chaitali
> 
>


Re: Review Request 73047: ATLAS-4054 : Change Atlas config for atlas.jetty.request.buffer.size

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73047/
-----------------------------------------------------------

(Updated Dec. 3, 2020, 12:53 p.m.)


Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, and Sarath Subramanian.


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


Repository: atlas


Description
-------

Jetty was upgraded to 9.2.x prior to this jira, but due to some issues with the jetty version, it was reverted back to jetty 8.x, but code changes to set header size were incorrect,

connector.setResponseBufferSize(bufferSize);
connector.setRequestBufferSize(bufferSize);

Prior to change Atlas responds with 413 code even with the header size less than 8K (default header size in jetty 8 is 6K)

curl -w % {size_header} -u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6000 | head -n 1)" hostname:21000/api/atlas/admin/session
Error: Request Entity Too Large: head99[root@c116-node8 ~]#

After code changes and setting buffer.size to 16000:

#curl -w %{size_header}
-u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16000 | head -n 1)" hostname:21000/api/atlas/admin/session
[root]# curl -w %

{size_header}
-u admin:'admin' -H "X-LongHeader: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15000 | head -n 1)" hostname:21000/api/atlas/admin/session

{"atlas.rest-csrf.enabled":true,"atlas.rest-csrf.browser-useragents-regex":"^Mozilla.*,^Opera.*,^Chrome","atlas.rest-csrf.methods-to-ignore":"GET,OPTIONS,HEAD,TRACE","atlas.rest-csrf.custom-header":"X-XSRF-HEADER","atlas.feature.taxonomy.enable":false,"atlas.entity.update.allowed":true,"atlas.entity.create.allowed":true,"atlas.ui.editable.entity.types":"hdfs_path,hbase_table,hbase_column,hbase_column_family,kafka_topic","userName":"admin","groups":["ROLE_ADMIN"]}


Diffs (updated)
-----

  webapp/src/main/java/org/apache/atlas/web/service/EmbeddedServer.java 5724ad131 


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

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


Testing
-------

Precommit:

https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/228/console


Thanks,

chaitali