You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by rm...@apache.org on 2016/07/11 22:17:41 UTC
[3/3] incubator-ranger git commit: RANGER-842: Fixed Apache License
Header and Added additional option to invoke PAM authentication
RANGER-842: Fixed Apache License Header and Added additional option to invoke PAM authentication
Signed-off-by: rmani <rm...@hortonworks.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/b063a998
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/b063a998
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/b063a998
Branch: refs/heads/master
Commit: b063a9989e9ceddc251eb02f85ffe5caee180070
Parents: 5ba4831
Author: sneethiraj <sn...@apache.org>
Authored: Mon Jul 11 13:15:22 2016 -0400
Committer: rmani <rm...@hortonworks.com>
Committed: Mon Jul 11 15:09:30 2016 -0700
----------------------------------------------------------------------
.../handler/RangerAuthenticationProvider.java | 2 ++
.../unix/jaas/UsernamePasswordCallbackHandler.java | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/b063a998/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java b/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
index 9525612..3fa3436 100644
--- a/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
+++ b/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
@@ -121,6 +121,8 @@ public class RangerAuthenticationProvider implements AuthenticationProvider {
}
}
if (rangerAuthenticationMethod.equalsIgnoreCase("UNIX")) {
+ boolean isPAMAuthEnabled = PropertiesUtil.getBooleanProperty("ranger.pam.authentication.enabled", false);
+ authentication= (isPAMAuthEnabled ? getPamAuthentication(authentication) : getUnixAuthentication(authentication));
authentication= getUnixAuthentication(authentication);
if(authentication!=null && authentication.isAuthenticated()){
return authentication;
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/b063a998/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UsernamePasswordCallbackHandler.java
----------------------------------------------------------------------
diff --git a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UsernamePasswordCallbackHandler.java b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UsernamePasswordCallbackHandler.java
index a73f653..ff1ed15 100644
--- a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UsernamePasswordCallbackHandler.java
+++ b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UsernamePasswordCallbackHandler.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.ranger.authentication.unix.jaas;
import javax.security.auth.callback.*;