You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jan Schlicht <ja...@mesosphere.io> on 2018/05/07 12:14:01 UTC

Re: Review Request 66934: Added token-based authentication to resource provider tests.

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

(Updated May 7, 2018, 2:14 p.m.)


Review request for mesos, Benjamin Bannier and Chun-Hung Hsiao.


Changes
-------

Added JWT generation to `MockResourceProvider`.


Summary (updated)
-----------------

Added token-based authentication to resource provider tests.


Bugs: MESOS-8774
    https://issues.apache.org/jira/browse/MESOS-8774


Repository: mesos


Description (updated)
-------

If compiled with SSL support, resource provider tests will use
authentication. The 'MockResourceProvider' has been updated to create a
JWT when started.


Diffs (updated)
-----

  src/tests/agent_resource_provider_config_api_tests.cpp 6ced582e14966eea3bb109e2e2de0e554acc2968 
  src/tests/api_tests.cpp 1ed26a7d796be3e3d0a44d107d2f769a39ff450a 
  src/tests/executor_http_api_tests.cpp 51cca7a90b3c5c5380ede0f17d66b9fdfeb88c27 
  src/tests/files_tests.cpp 4286e58d3407a2b82cf720651697ee635b10ad63 
  src/tests/logging_tests.cpp 886dcd0d6d6ccf509c98578e8b86b1c6ecd5775f 
  src/tests/master_tests.cpp e159573b550b07f5315878a6eabb3b84080bf15a 
  src/tests/mesos.hpp 8da3b021874097c5b66e5bc7d9fdafcc8fc377ef 
  src/tests/metrics_tests.cpp 55065cd11ece50e5b79a8e72a4075ebc93817794 
  src/tests/operation_reconciliation_tests.cpp 9717e8454a7d4654c58b903a8420aee2b0cea8a2 
  src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8 
  src/tests/slave_tests.cpp 9e398842e57fda67aaed9fd23e15eef4ce180e05 
  src/tests/storage_local_resource_provider_tests.cpp ccb114aacc904998dfeef4128f6d38dfb3c865c7 


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

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


Testing
-------

make check


Thanks,

Jan Schlicht


Re: Review Request 66934: Added token-based authentication to resource provider tests.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66934/#review202547
-----------------------------------------------------------



PASS: Mesos patch 66934 was successfully built and tested.

Reviews applied: `['66932', '66933', '66934']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66934

- Mesos Reviewbot Windows


On May 7, 2018, 12:14 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66934/
> -----------------------------------------------------------
> 
> (Updated May 7, 2018, 12:14 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Chun-Hung Hsiao.
> 
> 
> Bugs: MESOS-8774
>     https://issues.apache.org/jira/browse/MESOS-8774
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If compiled with SSL support, resource provider tests will use
> authentication. The 'MockResourceProvider' has been updated to create a
> JWT when started.
> 
> 
> Diffs
> -----
> 
>   src/tests/agent_resource_provider_config_api_tests.cpp 6ced582e14966eea3bb109e2e2de0e554acc2968 
>   src/tests/api_tests.cpp 1ed26a7d796be3e3d0a44d107d2f769a39ff450a 
>   src/tests/executor_http_api_tests.cpp 51cca7a90b3c5c5380ede0f17d66b9fdfeb88c27 
>   src/tests/files_tests.cpp 4286e58d3407a2b82cf720651697ee635b10ad63 
>   src/tests/logging_tests.cpp 886dcd0d6d6ccf509c98578e8b86b1c6ecd5775f 
>   src/tests/master_tests.cpp e159573b550b07f5315878a6eabb3b84080bf15a 
>   src/tests/mesos.hpp 8da3b021874097c5b66e5bc7d9fdafcc8fc377ef 
>   src/tests/metrics_tests.cpp 55065cd11ece50e5b79a8e72a4075ebc93817794 
>   src/tests/operation_reconciliation_tests.cpp 9717e8454a7d4654c58b903a8420aee2b0cea8a2 
>   src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8 
>   src/tests/slave_tests.cpp 9e398842e57fda67aaed9fd23e15eef4ce180e05 
>   src/tests/storage_local_resource_provider_tests.cpp ccb114aacc904998dfeef4128f6d38dfb3c865c7 
> 
> 
> Diff: https://reviews.apache.org/r/66934/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 66934: Added token-based authentication to resource provider tests.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66934/#review202549
-----------------------------------------------------------



Patch looks great!

Reviews applied: [66932, 66933, 66934]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On May 7, 2018, 8:14 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66934/
> -----------------------------------------------------------
> 
> (Updated May 7, 2018, 8:14 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Chun-Hung Hsiao.
> 
> 
> Bugs: MESOS-8774
>     https://issues.apache.org/jira/browse/MESOS-8774
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If compiled with SSL support, resource provider tests will use
> authentication. The 'MockResourceProvider' has been updated to create a
> JWT when started.
> 
> 
> Diffs
> -----
> 
>   src/tests/agent_resource_provider_config_api_tests.cpp 6ced582e14966eea3bb109e2e2de0e554acc2968 
>   src/tests/api_tests.cpp 1ed26a7d796be3e3d0a44d107d2f769a39ff450a 
>   src/tests/executor_http_api_tests.cpp 51cca7a90b3c5c5380ede0f17d66b9fdfeb88c27 
>   src/tests/files_tests.cpp 4286e58d3407a2b82cf720651697ee635b10ad63 
>   src/tests/logging_tests.cpp 886dcd0d6d6ccf509c98578e8b86b1c6ecd5775f 
>   src/tests/master_tests.cpp e159573b550b07f5315878a6eabb3b84080bf15a 
>   src/tests/mesos.hpp 8da3b021874097c5b66e5bc7d9fdafcc8fc377ef 
>   src/tests/metrics_tests.cpp 55065cd11ece50e5b79a8e72a4075ebc93817794 
>   src/tests/operation_reconciliation_tests.cpp 9717e8454a7d4654c58b903a8420aee2b0cea8a2 
>   src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8 
>   src/tests/slave_tests.cpp 9e398842e57fda67aaed9fd23e15eef4ce180e05 
>   src/tests/storage_local_resource_provider_tests.cpp ccb114aacc904998dfeef4128f6d38dfb3c865c7 
> 
> 
> Diff: https://reviews.apache.org/r/66934/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 66934: Added token-based authentication to resource provider tests.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66934/#review202633
-----------------------------------------------------------



Patch looks great!

Reviews applied: [66932, 66933, 66934]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On May 8, 2018, 1:09 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66934/
> -----------------------------------------------------------
> 
> (Updated May 8, 2018, 1:09 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Chun-Hung Hsiao.
> 
> 
> Bugs: MESOS-8774
>     https://issues.apache.org/jira/browse/MESOS-8774
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If compiled with SSL support, resource provider tests will use
> authentication. The 'MockResourceProvider' has been updated to create a
> JWT when started.
> 
> 
> Diffs
> -----
> 
>   src/tests/agent_resource_provider_config_api_tests.cpp 6ced582e14966eea3bb109e2e2de0e554acc2968 
>   src/tests/api_tests.cpp 1ed26a7d796be3e3d0a44d107d2f769a39ff450a 
>   src/tests/executor_http_api_tests.cpp 51cca7a90b3c5c5380ede0f17d66b9fdfeb88c27 
>   src/tests/files_tests.cpp 4286e58d3407a2b82cf720651697ee635b10ad63 
>   src/tests/logging_tests.cpp 886dcd0d6d6ccf509c98578e8b86b1c6ecd5775f 
>   src/tests/master_slave_reconciliation_tests.cpp 937bab08c9bef1a2a6a400979dcf0895412168f5 
>   src/tests/master_tests.cpp 0f6042ca15ac5862d5dc73f113bbe23504eda65c 
>   src/tests/mesos.hpp b945edf07e98422bf6bfceb6d0d9fa2ff188aece 
>   src/tests/metrics_tests.cpp 55065cd11ece50e5b79a8e72a4075ebc93817794 
>   src/tests/operation_reconciliation_tests.cpp 39cf1888ed1ad9395203c6f9c6ffd87fc7623195 
>   src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8 
>   src/tests/slave_tests.cpp 9e398842e57fda67aaed9fd23e15eef4ce180e05 
>   src/tests/storage_local_resource_provider_tests.cpp ccb114aacc904998dfeef4128f6d38dfb3c865c7 
> 
> 
> Diff: https://reviews.apache.org/r/66934/diff/4/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 66934: Added token-based authentication to resource provider tests.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66934/
-----------------------------------------------------------

(Updated May 8, 2018, 3:09 p.m.)


Review request for mesos, Benjamin Bannier and Chun-Hung Hsiao.


Changes
-------

Addressed issues.


Bugs: MESOS-8774
    https://issues.apache.org/jira/browse/MESOS-8774


Repository: mesos


Description
-------

If compiled with SSL support, resource provider tests will use
authentication. The 'MockResourceProvider' has been updated to create a
JWT when started.


Diffs (updated)
-----

  src/tests/agent_resource_provider_config_api_tests.cpp 6ced582e14966eea3bb109e2e2de0e554acc2968 
  src/tests/api_tests.cpp 1ed26a7d796be3e3d0a44d107d2f769a39ff450a 
  src/tests/executor_http_api_tests.cpp 51cca7a90b3c5c5380ede0f17d66b9fdfeb88c27 
  src/tests/files_tests.cpp 4286e58d3407a2b82cf720651697ee635b10ad63 
  src/tests/logging_tests.cpp 886dcd0d6d6ccf509c98578e8b86b1c6ecd5775f 
  src/tests/master_slave_reconciliation_tests.cpp 937bab08c9bef1a2a6a400979dcf0895412168f5 
  src/tests/master_tests.cpp 0f6042ca15ac5862d5dc73f113bbe23504eda65c 
  src/tests/mesos.hpp b945edf07e98422bf6bfceb6d0d9fa2ff188aece 
  src/tests/metrics_tests.cpp 55065cd11ece50e5b79a8e72a4075ebc93817794 
  src/tests/operation_reconciliation_tests.cpp 39cf1888ed1ad9395203c6f9c6ffd87fc7623195 
  src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8 
  src/tests/slave_tests.cpp 9e398842e57fda67aaed9fd23e15eef4ce180e05 
  src/tests/storage_local_resource_provider_tests.cpp ccb114aacc904998dfeef4128f6d38dfb3c865c7 


Diff: https://reviews.apache.org/r/66934/diff/4/

Changes: https://reviews.apache.org/r/66934/diff/3-4/


Testing
-------

make check


Thanks,

Jan Schlicht


Re: Review Request 66934: Added token-based authentication to resource provider tests.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66934/#review202624
-----------------------------------------------------------


Fix it, then Ship it!




Could you verify that after rebase no tests set `SlaveFlags::authenticate_http_readwrite = false` when not needed?


src/tests/files_tests.cpp
Line 72 (original), 70 (patched)
<https://reviews.apache.org/r/66934/#comment284539>

    Duh, this is one argument why using decls do not scale (`process::http::authentication::Authenticator` vs `mesos::Authenticator`).



src/tests/files_tests.cpp
Line 81 (original), 79 (patched)
<https://reviews.apache.org/r/66934/#comment284540>

    To keep with the current style lets add using decls for `setAuthenticator` and `unsetAuthenticator`.



src/tests/logging_tests.cpp
Line 65 (original), 63 (patched)
<https://reviews.apache.org/r/66934/#comment284541>

    Add using decl.



src/tests/logging_tests.cpp
Line 75 (original), 74 (patched)
<https://reviews.apache.org/r/66934/#comment284542>

    Add using decl.



src/tests/master_slave_reconciliation_tests.cpp
Lines 449-450 (original), 449-450 (patched)
<https://reviews.apache.org/r/66934/#comment284545>

    This is not needed anymore.



src/tests/mesos.hpp
Lines 72 (patched)
<https://reviews.apache.org/r/66934/#comment284546>

    Can we include this unconditionally?



src/tests/mesos.hpp
Lines 3084-3085 (patched)
<https://reviews.apache.org/r/66934/#comment284550>

    Let's add a `TODO` to revisit this should we add authorization of claims.



src/tests/metrics_tests.cpp
Line 68 (original), 66 (patched)
<https://reviews.apache.org/r/66934/#comment284543>

    Add using decl.



src/tests/metrics_tests.cpp
Line 78 (original), 77 (patched)
<https://reviews.apache.org/r/66934/#comment284544>

    Add using decl.


- Benjamin Bannier


On May 8, 2018, 11:38 a.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66934/
> -----------------------------------------------------------
> 
> (Updated May 8, 2018, 11:38 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Chun-Hung Hsiao.
> 
> 
> Bugs: MESOS-8774
>     https://issues.apache.org/jira/browse/MESOS-8774
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If compiled with SSL support, resource provider tests will use
> authentication. The 'MockResourceProvider' has been updated to create a
> JWT when started.
> 
> 
> Diffs
> -----
> 
>   src/tests/agent_resource_provider_config_api_tests.cpp 6ced582e14966eea3bb109e2e2de0e554acc2968 
>   src/tests/api_tests.cpp 1ed26a7d796be3e3d0a44d107d2f769a39ff450a 
>   src/tests/executor_http_api_tests.cpp 51cca7a90b3c5c5380ede0f17d66b9fdfeb88c27 
>   src/tests/files_tests.cpp 4286e58d3407a2b82cf720651697ee635b10ad63 
>   src/tests/logging_tests.cpp 886dcd0d6d6ccf509c98578e8b86b1c6ecd5775f 
>   src/tests/master_slave_reconciliation_tests.cpp 937bab08c9bef1a2a6a400979dcf0895412168f5 
>   src/tests/master_tests.cpp 0f6042ca15ac5862d5dc73f113bbe23504eda65c 
>   src/tests/mesos.hpp b945edf07e98422bf6bfceb6d0d9fa2ff188aece 
>   src/tests/metrics_tests.cpp 55065cd11ece50e5b79a8e72a4075ebc93817794 
>   src/tests/operation_reconciliation_tests.cpp 39cf1888ed1ad9395203c6f9c6ffd87fc7623195 
>   src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8 
>   src/tests/slave_tests.cpp 9e398842e57fda67aaed9fd23e15eef4ce180e05 
>   src/tests/storage_local_resource_provider_tests.cpp ccb114aacc904998dfeef4128f6d38dfb3c865c7 
> 
> 
> Diff: https://reviews.apache.org/r/66934/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 66934: Added token-based authentication to resource provider tests.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66934/
-----------------------------------------------------------

(Updated May 8, 2018, 11:38 a.m.)


Review request for mesos, Benjamin Bannier and Chun-Hung Hsiao.


Changes
-------

Rebased.


Bugs: MESOS-8774
    https://issues.apache.org/jira/browse/MESOS-8774


Repository: mesos


Description
-------

If compiled with SSL support, resource provider tests will use
authentication. The 'MockResourceProvider' has been updated to create a
JWT when started.


Diffs (updated)
-----

  src/tests/agent_resource_provider_config_api_tests.cpp 6ced582e14966eea3bb109e2e2de0e554acc2968 
  src/tests/api_tests.cpp 1ed26a7d796be3e3d0a44d107d2f769a39ff450a 
  src/tests/executor_http_api_tests.cpp 51cca7a90b3c5c5380ede0f17d66b9fdfeb88c27 
  src/tests/files_tests.cpp 4286e58d3407a2b82cf720651697ee635b10ad63 
  src/tests/logging_tests.cpp 886dcd0d6d6ccf509c98578e8b86b1c6ecd5775f 
  src/tests/master_slave_reconciliation_tests.cpp 937bab08c9bef1a2a6a400979dcf0895412168f5 
  src/tests/master_tests.cpp 0f6042ca15ac5862d5dc73f113bbe23504eda65c 
  src/tests/mesos.hpp b945edf07e98422bf6bfceb6d0d9fa2ff188aece 
  src/tests/metrics_tests.cpp 55065cd11ece50e5b79a8e72a4075ebc93817794 
  src/tests/operation_reconciliation_tests.cpp 39cf1888ed1ad9395203c6f9c6ffd87fc7623195 
  src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8 
  src/tests/slave_tests.cpp 9e398842e57fda67aaed9fd23e15eef4ce180e05 
  src/tests/storage_local_resource_provider_tests.cpp ccb114aacc904998dfeef4128f6d38dfb3c865c7 


Diff: https://reviews.apache.org/r/66934/diff/3/

Changes: https://reviews.apache.org/r/66934/diff/2-3/


Testing
-------

make check


Thanks,

Jan Schlicht