[
https://issues.apache.org/jira/browse/AMBARI-14044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026334#comment-15026334
]
Hudson commented on AMBARI-14044:
---------------------------------
ABORTED: Integrated in Ambari-trunk-Commit #3907 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/3907/])
AMBARI-14044. Change Anonymous API Authentication To A Declared User (rlevas:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d5a661aa228f4b35f6033a02711b283c46337a49])
* ambari-server/src/test/python/stacks/2.3/common/services-hawq-3-hosts.json
*
ambari-server/src/test/python/stacks/2.3/common/services-normal-nohawq-3-hosts.json
* contrib/ambari-scom/ambari-scom-server/conf/ambari.properties
*
ambari-server/src/test/python/stacks/2.3/common/services-normal-hawq-3-hosts.json
*
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
* ambari-web/app/assets/data/services/ambari.json
*
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
*
ambari-server/src/test/python/stacks/2.3/common/services-master_ambari_colo-3-hosts.json
* ambari-server/src/test/python/stacks/2.3/common/services-nohawq-3-hosts.json
*
ambari-server/src/test/python/stacks/2.3/common/services-standby_ambari_colo-3-hosts.json
*
ambari-server/src/test/python/stacks/2.3/common/services-master_standby_colo-3-hosts.json
* ambari-server/conf/windows/ambari.properties
*
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
*
ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
*
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
* contrib/ambari-scom/ambari-scom-server/src/test/resources/ambari.properties
* ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
* ambari-server/src/test/python/stacks/2.3/common/services-hawq-1-host.json
* ambari-server/conf/unix/ambari.properties
> Change Anonymous API Authentication To A Declared User
> ------------------------------------------------------
>
> Key: AMBARI-14044
> URL: https://issues.apache.org/jira/browse/AMBARI-14044
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: 2.2.0
> Reporter: Robert Levas
> Assignee: Robert Levas
> Labels: api, authentication, rbac
> Fix For: 2.2.0
>
> Attachments: AMBARI-14044_trunk_01.patch, AMBARI-14044_trunk_02.patch
>
>
> When using {{api.authenticate=false}}, REST requests to the Ambari APIs don't
> need to contain any user information. As a result, new code being placed
> which assumes an authenticated user will throw NPE exceptions:
> {code}
> // Ensure that the authenticated user has authorization to get this
> information
> if (!isUserAdministrator &&
> !AuthorizationHelper.getAuthenticatedName().equalsIgnoreCase(userName)) {
> throw new AuthorizationException();
> }
> {code}
> {code}
> java.lang.NullPointerException
> at
> org.apache.ambari.server.controller.internal.ActiveWidgetLayoutResourceProvider.getResources(ActiveWidgetLayoutResourceProvider.java:156)
> at
> org.apache.ambari.server.controller.internal.ClusterControllerImpl$ExtendedResourceProviderWrapper.queryForResources(ClusterControllerImpl.java:946)
> at
> org.apache.ambari.server.controller.internal.ClusterControllerImpl.getResources(ClusterControllerImpl.java:132)
> at
> org.apache.ambari.server.api.query.QueryImpl.doQuery(QueryImpl.java:512)
> at
> org.apache.ambari.server.api.query.QueryImpl.queryForResources(QueryImpl.java:381)
> at
> org.apache.ambari.server.api.query.QueryImpl.execute(QueryImpl.java:217)
> {code}
> Recommend changing this option to something like
> {code}
> api.authenticated.user=admin
> {code}
> This will preserve the existing functionality while allowing the new code to
> continue to assume authenticated users.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)