Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 949BF17D0C for ; Thu, 2 Oct 2014 01:56:55 +0000 (UTC) Received: (qmail 46352 invoked by uid 500); 2 Oct 2014 01:56:55 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 46318 invoked by uid 500); 2 Oct 2014 01:56:55 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 46304 invoked by uid 99); 2 Oct 2014 01:56:55 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2014 01:56:55 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id DD2D01DDB04; Thu, 2 Oct 2014 01:56:51 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4817427096134721660==" MIME-Version: 1.0 Subject: Re: Review Request 26248: Views: the "properties" object should only be accessible from REST API if AMBARI.ADMIN From: "Jonathan Hurley" To: "Alejandro Fernandez" , "Jonathan Hurley" Cc: "Tom Beerbower" , "Ambari" Date: Thu, 02 Oct 2014 01:56:51 -0000 Message-ID: <20141002015651.18846.35400@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Jonathan Hurley" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/26248/ X-Sender: "Jonathan Hurley" References: <20141001212234.19177.85474@reviews.apache.org> In-Reply-To: <20141001212234.19177.85474@reviews.apache.org> Reply-To: "Jonathan Hurley" X-ReviewRequest-Repository: ambari --===============4817427096134721660== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit ----------------------------------------------------------- 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 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 > > --===============4817427096134721660==--