ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject [2/2] ambari git commit: AMBARI-14864. Scheduled requests get 403 error on execution. (mpapirkovskyy)
Date Mon, 01 Feb 2016 14:46:00 GMT
AMBARI-14864. Scheduled requests get 403 error on execution. (mpapirkovskyy)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d8804cfb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d8804cfb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d8804cfb

Branch: refs/heads/trunk
Commit: d8804cfb576681f86d52cfb9778b18f2f958b09d
Parents: bb3b509
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Mon Feb 1 16:09:01 2016 +0200
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Mon Feb 1 16:45:14 2016 +0200

----------------------------------------------------------------------
 .../server/security/authorization/AmbariAuthorizationFilter.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d8804cfb/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
index 82c03e4..e2a28d0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
@@ -122,7 +122,8 @@ public class AmbariAuthorizationFilter implements Filter {
       }
     }
 
-    if (authentication == null || !authentication.isAuthenticated()) {
+    if (authentication == null || authentication instanceof AnonymousAuthenticationToken
||
+        !authentication.isAuthenticated()) {
       String token = httpRequest.getHeader(INTERNAL_TOKEN_HEADER);
       if (token != null) {
         context.setAuthentication(new InternalAuthenticationToken(token));


Mime
View raw message