ATLAS-1310: attempt LDAP authentication only when enabled
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/94a82722 Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/94a82722 Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/94a82722 Branch: refs/heads/master Commit: 94a827220cc02b722607adbb40f2060809a12ab9 Parents: 4db76f9 Author: Madhan Neethiraj <[email protected]> Authored: Sun Nov 20 16:25:09 2016 -0800 Committer: Madhan Neethiraj <[email protected]> Committed: Sun Nov 20 21:24:38 2016 -0800 ---------------------------------------------------------------------- release-log.txt | 4 +++- .../web/security/AtlasAuthenticationProvider.java | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/94a82722/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 8f1147c..a8f65c4 100644 --- a/release-log.txt +++ b/release-log.txt @@ -9,8 +9,10 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai) ALL CHANGES: +ATLAS-1310 attempt LDAP authentication only when enabled (mneethiraj) +ATLAS-1309 updated HBase model with addition of column-family and column entity-defs (mneethiraj) ATLAS-916 Return System Attributes in get entity definition (svimal2106) -ATLAS-1242 update TypesResource API implementation to use new v2 TypesREST API +ATLAS-1242 update TypesResource API implementation to use new v2 TypesREST API ([email protected] via mneethiraj) ATLAS-1306 bootstrap type-load ignores model file contents if a type in the file already exists ATLAS-1299 The project org.apache.atlas:atlas-hbase-client-shaded - build error (shwethags) ATLAS-1246 Upgrade versions of dependencies (shwethags) http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/94a82722/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 68553df..953d737 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 @@ -37,6 +37,7 @@ public class AtlasAuthenticationProvider extends private boolean fileAuthenticationMethodEnabled = true; 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"; @@ -59,11 +60,16 @@ public class AtlasAuthenticationProvider extends this.fileAuthenticationMethodEnabled = configuration.getBoolean( FILE_AUTH_METHOD, true); - this.ldapType = configuration.getString(LDAP_TYPE, "NONE"); + + boolean ldapAuthenticationEnabled = configuration.getBoolean(LDAP_AUTH_METHOD, false); + + if (ldapAuthenticationEnabled) { + this.ldapType = configuration.getString(LDAP_TYPE, "NONE"); + } else { + this.ldapType = "NONE"; + } } catch (Exception e) { - LOG.error( - "Error while getting atlas.login.method application properties", - e); + LOG.error("Error while getting atlas.login.method application properties", e); } }
