You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sh...@apache.org on 2016/07/08 06:03:14 UTC
[3/3] incubator-atlas git commit: ATLAS-995 Atlas to setup ldap
authentication type as either LDAP / AD or None (nixonrodrigues via
shwethags)
ATLAS-995 Atlas to setup ldap authentication type as either LDAP / AD or None (nixonrodrigues via shwethags)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/1ee2c1bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/1ee2c1bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/1ee2c1bc
Branch: refs/heads/master
Commit: 1ee2c1bc45599a19f6a9546ca2718366f46f47b5
Parents: 7fc276f
Author: Shwetha GS <ss...@hortonworks.com>
Authored: Fri Jul 8 11:33:02 2016 +0530
Committer: Shwetha GS <ss...@hortonworks.com>
Committed: Fri Jul 8 11:33:02 2016 +0530
----------------------------------------------------------------------
distro/src/conf/atlas-application.properties | 3 +-
release-log.txt | 1 +
.../security/AtlasAuthenticationProvider.java | 37 ++++++++------------
3 files changed, 17 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1ee2c1bc/distro/src/conf/atlas-application.properties
----------------------------------------------------------------------
diff --git a/distro/src/conf/atlas-application.properties b/distro/src/conf/atlas-application.properties
index e50d6b9..79723f4 100755
--- a/distro/src/conf/atlas-application.properties
+++ b/distro/src/conf/atlas-application.properties
@@ -92,11 +92,10 @@ atlas.enableTLS=false
# Authentication config
atlas.authentication.method.kerberos=false
-atlas.authentication.method.ldap=false
atlas.authentication.method.file=true
#### ldap.type= LDAP or AD
-atlas.authentication.method.ldap.type=LDAP
+atlas.authentication.method.ldap.type=none
#### user credentials file
atlas.authentication.method.file.filename=${sys:atlas.home}/conf/users-credentials.properties
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1ee2c1bc/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 00a7bf6..b113f41 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES:
+ATLAS-995 Atlas to setup ldap authentication type as either LDAP / AD or None (nixonrodrigues via shwethags)
ATLAS-902 Atlas throws exception due to null definition in Hive create table statement (svimal2106 via shwethags)
ATLAS-987 Atlas hooks should avoid adding dependent libraries to component CLASSPATH (madhan.neethiraj via shwethags)
ATLAS-993 If condition in DSL order by clause is not defined then dsl query fails (guptaneeru via shwethags)
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1ee2c1bc/webapp/src/main/java/org/apache/atlas/web/security/AtlasAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/security/AtlasAuthenticationProvider.java b/webapp/src/main/java/org/apache/atlas/web/security/AtlasAuthenticationProvider.java
index 7780191..b0fe6aa 100644
--- a/webapp/src/main/java/org/apache/atlas/web/security/AtlasAuthenticationProvider.java
+++ b/webapp/src/main/java/org/apache/atlas/web/security/AtlasAuthenticationProvider.java
@@ -35,10 +35,8 @@ public class AtlasAuthenticationProvider extends
.getLogger(AtlasAuthenticationProvider.class);
private boolean fileAuthenticationMethodEnabled = true;
- private boolean ldapAuthenticationMethodEnabled = false;
- private String ldapType = "UNKNOWN";
+ private String ldapType = "NONE";
public static final String FILE_AUTH_METHOD = "atlas.authentication.method.file";
- public static final String LDAP_AUTH_METHOD = "atlas.authentication.method.ldap";
public static final String LDAP_TYPE = "atlas.authentication.method.ldap.type";
@Autowired
@@ -57,9 +55,7 @@ public class AtlasAuthenticationProvider extends
this.fileAuthenticationMethodEnabled = configuration.getBoolean(
FILE_AUTH_METHOD, true);
- this.ldapAuthenticationMethodEnabled = configuration.getBoolean(
- LDAP_AUTH_METHOD, false);
- this.ldapType = configuration.getString(LDAP_TYPE, "UNKNOWN");
+ this.ldapType = configuration.getString(LDAP_TYPE, "NONE");
} catch (Exception e) {
LOG.error(
"Error while getting atlas.login.method application properties",
@@ -71,22 +67,19 @@ public class AtlasAuthenticationProvider extends
public Authentication authenticate(Authentication authentication)
throws AuthenticationException {
- if (ldapAuthenticationMethodEnabled) {
-
- if (ldapType.equalsIgnoreCase("LDAP")) {
- try {
- authentication = ldapAuthenticationProvider
- .authenticate(authentication);
- } catch (Exception ex) {
- LOG.error("Error while LDAP authentication", ex);
- }
- } else if (ldapType.equalsIgnoreCase("AD")) {
- try {
- authentication = adAuthenticationProvider
- .authenticate(authentication);
- } catch (Exception ex) {
- LOG.error("Error while AD authentication", ex);
- }
+ if (ldapType.equalsIgnoreCase("LDAP")) {
+ try {
+ authentication = ldapAuthenticationProvider
+ .authenticate(authentication);
+ } catch (Exception ex) {
+ LOG.error("Error while LDAP authentication", ex);
+ }
+ } else if (ldapType.equalsIgnoreCase("AD")) {
+ try {
+ authentication = adAuthenticationProvider
+ .authenticate(authentication);
+ } catch (Exception ex) {
+ LOG.error("Error while AD authentication", ex);
}
}