You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2014/10/01 23:22:34 UTC

Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN

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

Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.


Bugs: AMBARI-7598
    https://issues.apache.org/jira/browse/AMBARI-7598


Repository: ambari


Description
-------

/api/v1/views/FILES/versions/0.1.0/instances/FILES_1

Configuration properties for a view instance should only be accessible from the Views REST API if you are an AMBARI.ADMIN. This protects view instance config props info from regular users of a view. If a view client-side happens to need access to these properties for some reason, they should implement a server-side resource in their view that exposes this information.

{code}
    "properties" : {
      "dataworker.defaultFs" : "webhdfs://c6401.ambari.apache.org:50070",
      "dataworker.username" : null
    }
{code}


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java e48c88e 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 8f34916 

Diff: https://reviews.apache.org/r/26248/diff/


Testing
-------

Manual tests.

Updated unit tests.  All existing tests pass ...

Results :

Tests run: 2076, Failures: 0, Errors: 0, Skipped: 16
…


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38:14.386s
[INFO] Finished at: Wed Oct 01 16:54:39 EDT 2014
[INFO] Final Memory: 38M/423M
[INFO] ------------------------------------------------------------------------


Thanks,

Tom Beerbower


Re: Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN

Posted by Tom Beerbower <tb...@hortonworks.com>.

> On Oct. 2, 2014, 1:56 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java, line 321
> > <https://reviews.apache.org/r/26248/diff/1/?file=710351#file710351line321>
> >
> >     I'm not sure how fast it is to retrieve a user's AmbariGrantedAuthority, but if it's expensive, could this call be moved to outside of the for-loop?

Yes, good catch!  Thanks!


- Tom


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


On Oct. 1, 2014, 9:22 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26248/
> -----------------------------------------------------------
> 
> (Updated Oct. 1, 2014, 9:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-7598
>     https://issues.apache.org/jira/browse/AMBARI-7598
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> /api/v1/views/FILES/versions/0.1.0/instances/FILES_1
> 
> Configuration properties for a view instance should only be accessible from the Views REST API if you are an AMBARI.ADMIN. This protects view instance config props info from regular users of a view. If a view client-side happens to need access to these properties for some reason, they should implement a server-side resource in their view that exposes this information.
> 
> {code}
>     "properties" : {
>       "dataworker.defaultFs" : "webhdfs://c6401.ambari.apache.org:50070",
>       "dataworker.username" : null
>     }
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java e48c88e 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 8f34916 
> 
> Diff: https://reviews.apache.org/r/26248/diff/
> 
> 
> Testing
> -------
> 
> Manual tests.
> 
> Updated unit tests.  All existing tests pass ...
> 
> Results :
> 
> Tests run: 2076, Failures: 0, Errors: 0, Skipped: 16
> …
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 38:14.386s
> [INFO] Finished at: Wed Oct 01 16:54:39 EDT 2014
> [INFO] Final Memory: 38M/423M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26248/#review55180
-----------------------------------------------------------

Ship it!



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
<https://reviews.apache.org/r/26248/#comment95568>

    I'm not sure how fast it is to retrieve a user's AmbariGrantedAuthority, but if it's expensive, could this call be moved to outside of the for-loop?


- Jonathan Hurley


On Oct. 1, 2014, 5:22 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26248/
> -----------------------------------------------------------
> 
> (Updated Oct. 1, 2014, 5:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-7598
>     https://issues.apache.org/jira/browse/AMBARI-7598
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> /api/v1/views/FILES/versions/0.1.0/instances/FILES_1
> 
> Configuration properties for a view instance should only be accessible from the Views REST API if you are an AMBARI.ADMIN. This protects view instance config props info from regular users of a view. If a view client-side happens to need access to these properties for some reason, they should implement a server-side resource in their view that exposes this information.
> 
> {code}
>     "properties" : {
>       "dataworker.defaultFs" : "webhdfs://c6401.ambari.apache.org:50070",
>       "dataworker.username" : null
>     }
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java e48c88e 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 8f34916 
> 
> Diff: https://reviews.apache.org/r/26248/diff/
> 
> 
> Testing
> -------
> 
> Manual tests.
> 
> Updated unit tests.  All existing tests pass ...
> 
> Results :
> 
> Tests run: 2076, Failures: 0, Errors: 0, Skipped: 16
> …
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 38:14.386s
> [INFO] Finished at: Wed Oct 01 16:54:39 EDT 2014
> [INFO] Final Memory: 38M/423M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN

Posted by Tom Beerbower <tb...@hortonworks.com>.

> On Oct. 1, 2014, 9:26 p.m., Alejandro Fernandez wrote:
> > Ship It!
> 
> Alejandro Fernandez wrote:
>     Will this be committed *after* we have first provided a way for the Jobs view to access the properties it needs?

Yes, I'll hold off pushing this until that Jira clears.  Thanks!


- Tom


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


On Oct. 1, 2014, 9:22 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26248/
> -----------------------------------------------------------
> 
> (Updated Oct. 1, 2014, 9:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-7598
>     https://issues.apache.org/jira/browse/AMBARI-7598
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> /api/v1/views/FILES/versions/0.1.0/instances/FILES_1
> 
> Configuration properties for a view instance should only be accessible from the Views REST API if you are an AMBARI.ADMIN. This protects view instance config props info from regular users of a view. If a view client-side happens to need access to these properties for some reason, they should implement a server-side resource in their view that exposes this information.
> 
> {code}
>     "properties" : {
>       "dataworker.defaultFs" : "webhdfs://c6401.ambari.apache.org:50070",
>       "dataworker.username" : null
>     }
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java e48c88e 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 8f34916 
> 
> Diff: https://reviews.apache.org/r/26248/diff/
> 
> 
> Testing
> -------
> 
> Manual tests.
> 
> Updated unit tests.  All existing tests pass ...
> 
> Results :
> 
> Tests run: 2076, Failures: 0, Errors: 0, Skipped: 16
> …
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 38:14.386s
> [INFO] Finished at: Wed Oct 01 16:54:39 EDT 2014
> [INFO] Final Memory: 38M/423M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN

Posted by Alejandro Fernandez <af...@hortonworks.com>.

> On Oct. 1, 2014, 9:26 p.m., Alejandro Fernandez wrote:
> > Ship It!

Will this be committed *after* we have first provided a way for the Jobs view to access the properties it needs?


- Alejandro


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


On Oct. 1, 2014, 9:22 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26248/
> -----------------------------------------------------------
> 
> (Updated Oct. 1, 2014, 9:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-7598
>     https://issues.apache.org/jira/browse/AMBARI-7598
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> /api/v1/views/FILES/versions/0.1.0/instances/FILES_1
> 
> Configuration properties for a view instance should only be accessible from the Views REST API if you are an AMBARI.ADMIN. This protects view instance config props info from regular users of a view. If a view client-side happens to need access to these properties for some reason, they should implement a server-side resource in their view that exposes this information.
> 
> {code}
>     "properties" : {
>       "dataworker.defaultFs" : "webhdfs://c6401.ambari.apache.org:50070",
>       "dataworker.username" : null
>     }
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java e48c88e 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 8f34916 
> 
> Diff: https://reviews.apache.org/r/26248/diff/
> 
> 
> Testing
> -------
> 
> Manual tests.
> 
> Updated unit tests.  All existing tests pass ...
> 
> Results :
> 
> Tests run: 2076, Failures: 0, Errors: 0, Skipped: 16
> …
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 38:14.386s
> [INFO] Finished at: Wed Oct 01 16:54:39 EDT 2014
> [INFO] Final Memory: 38M/423M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26248/#review55139
-----------------------------------------------------------

Ship it!


Ship It!

- Alejandro Fernandez


On Oct. 1, 2014, 9:22 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26248/
> -----------------------------------------------------------
> 
> (Updated Oct. 1, 2014, 9:22 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-7598
>     https://issues.apache.org/jira/browse/AMBARI-7598
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> /api/v1/views/FILES/versions/0.1.0/instances/FILES_1
> 
> Configuration properties for a view instance should only be accessible from the Views REST API if you are an AMBARI.ADMIN. This protects view instance config props info from regular users of a view. If a view client-side happens to need access to these properties for some reason, they should implement a server-side resource in their view that exposes this information.
> 
> {code}
>     "properties" : {
>       "dataworker.defaultFs" : "webhdfs://c6401.ambari.apache.org:50070",
>       "dataworker.username" : null
>     }
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java e48c88e 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 8f34916 
> 
> Diff: https://reviews.apache.org/r/26248/diff/
> 
> 
> Testing
> -------
> 
> Manual tests.
> 
> Updated unit tests.  All existing tests pass ...
> 
> Results :
> 
> Tests run: 2076, Failures: 0, Errors: 0, Skipped: 16
> …
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 38:14.386s
> [INFO] Finished at: Wed Oct 01 16:54:39 EDT 2014
> [INFO] Final Memory: 38M/423M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26248/#review55389
-----------------------------------------------------------

Ship it!


+1 again just in case you needed it after new submission.

- Jonathan Hurley


On Oct. 2, 2014, 8:34 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26248/
> -----------------------------------------------------------
> 
> (Updated Oct. 2, 2014, 8:34 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-7598
>     https://issues.apache.org/jira/browse/AMBARI-7598
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> /api/v1/views/FILES/versions/0.1.0/instances/FILES_1
> 
> Configuration properties for a view instance should only be accessible from the Views REST API if you are an AMBARI.ADMIN. This protects view instance config props info from regular users of a view. If a view client-side happens to need access to these properties for some reason, they should implement a server-side resource in their view that exposes this information.
> 
> {code}
>     "properties" : {
>       "dataworker.defaultFs" : "webhdfs://c6401.ambari.apache.org:50070",
>       "dataworker.username" : null
>     }
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java e48c88e 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 8f34916 
> 
> Diff: https://reviews.apache.org/r/26248/diff/
> 
> 
> Testing
> -------
> 
> Manual tests.
> 
> Updated unit tests.  All existing tests pass ...
> 
> Results :
> 
> Tests run: 2076, Failures: 0, Errors: 0, Skipped: 16
> …
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 38:14.386s
> [INFO] Finished at: Wed Oct 01 16:54:39 EDT 2014
> [INFO] Final Memory: 38M/423M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26248/
-----------------------------------------------------------

(Updated Oct. 2, 2014, 12:34 p.m.)


Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.


Changes
-------

Review changes


Bugs: AMBARI-7598
    https://issues.apache.org/jira/browse/AMBARI-7598


Repository: ambari


Description
-------

/api/v1/views/FILES/versions/0.1.0/instances/FILES_1

Configuration properties for a view instance should only be accessible from the Views REST API if you are an AMBARI.ADMIN. This protects view instance config props info from regular users of a view. If a view client-side happens to need access to these properties for some reason, they should implement a server-side resource in their view that exposes this information.

{code}
    "properties" : {
      "dataworker.defaultFs" : "webhdfs://c6401.ambari.apache.org:50070",
      "dataworker.username" : null
    }
{code}


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java e48c88e 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java 8f34916 

Diff: https://reviews.apache.org/r/26248/diff/


Testing
-------

Manual tests.

Updated unit tests.  All existing tests pass ...

Results :

Tests run: 2076, Failures: 0, Errors: 0, Skipped: 16
…


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38:14.386s
[INFO] Finished at: Wed Oct 01 16:54:39 EDT 2014
[INFO] Final Memory: 38M/423M
[INFO] ------------------------------------------------------------------------


Thanks,

Tom Beerbower