Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
1ee2c1bc
Commit
1ee2c1bc
authored
Jul 08, 2016
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-995 Atlas to setup ldap authentication type as either LDAP / AD or None…
ATLAS-995 Atlas to setup ldap authentication type as either LDAP / AD or None (nixonrodrigues via shwethags)
parent
7fc276f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
24 deletions
+17
-24
atlas-application.properties
distro/src/conf/atlas-application.properties
+1
-2
release-log.txt
release-log.txt
+1
-0
AtlasAuthenticationProvider.java
...pache/atlas/web/security/AtlasAuthenticationProvider.java
+15
-22
No files found.
distro/src/conf/atlas-application.properties
View file @
1ee2c1bc
...
@@ -92,11 +92,10 @@ atlas.enableTLS=false
...
@@ -92,11 +92,10 @@ atlas.enableTLS=false
# Authentication config
# Authentication config
atlas.authentication.method.kerberos
=
false
atlas.authentication.method.kerberos
=
false
atlas.authentication.method.ldap
=
false
atlas.authentication.method.file
=
true
atlas.authentication.method.file
=
true
#### ldap.type= LDAP or AD
#### ldap.type= LDAP or AD
atlas.authentication.method.ldap.type
=
LDAP
atlas.authentication.method.ldap.type
=
none
#### user credentials file
#### user credentials file
atlas.authentication.method.file.filename
=
${sys:atlas.home}/conf/users-credentials.properties
atlas.authentication.method.file.filename
=
${sys:atlas.home}/conf/users-credentials.properties
...
...
release-log.txt
View file @
1ee2c1bc
...
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
...
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL 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-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-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)
ATLAS-993 If condition in DSL order by clause is not defined then dsl query fails (guptaneeru via shwethags)
...
...
webapp/src/main/java/org/apache/atlas/web/security/AtlasAuthenticationProvider.java
View file @
1ee2c1bc
...
@@ -35,10 +35,8 @@ public class AtlasAuthenticationProvider extends
...
@@ -35,10 +35,8 @@ public class AtlasAuthenticationProvider extends
.
getLogger
(
AtlasAuthenticationProvider
.
class
);
.
getLogger
(
AtlasAuthenticationProvider
.
class
);
private
boolean
fileAuthenticationMethodEnabled
=
true
;
private
boolean
fileAuthenticationMethodEnabled
=
true
;
private
boolean
ldapAuthenticationMethodEnabled
=
false
;
private
String
ldapType
=
"NONE"
;
private
String
ldapType
=
"UNKNOWN"
;
public
static
final
String
FILE_AUTH_METHOD
=
"atlas.authentication.method.file"
;
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"
;
public
static
final
String
LDAP_TYPE
=
"atlas.authentication.method.ldap.type"
;
@Autowired
@Autowired
...
@@ -57,9 +55,7 @@ public class AtlasAuthenticationProvider extends
...
@@ -57,9 +55,7 @@ public class AtlasAuthenticationProvider extends
this
.
fileAuthenticationMethodEnabled
=
configuration
.
getBoolean
(
this
.
fileAuthenticationMethodEnabled
=
configuration
.
getBoolean
(
FILE_AUTH_METHOD
,
true
);
FILE_AUTH_METHOD
,
true
);
this
.
ldapAuthenticationMethodEnabled
=
configuration
.
getBoolean
(
this
.
ldapType
=
configuration
.
getString
(
LDAP_TYPE
,
"NONE"
);
LDAP_AUTH_METHOD
,
false
);
this
.
ldapType
=
configuration
.
getString
(
LDAP_TYPE
,
"UNKNOWN"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOG
.
error
(
LOG
.
error
(
"Error while getting atlas.login.method application properties"
,
"Error while getting atlas.login.method application properties"
,
...
@@ -71,22 +67,19 @@ public class AtlasAuthenticationProvider extends
...
@@ -71,22 +67,19 @@ public class AtlasAuthenticationProvider extends
public
Authentication
authenticate
(
Authentication
authentication
)
public
Authentication
authenticate
(
Authentication
authentication
)
throws
AuthenticationException
{
throws
AuthenticationException
{
if
(
ldapAuthenticationMethodEnabled
)
{
if
(
ldapType
.
equalsIgnoreCase
(
"LDAP"
))
{
try
{
if
(
ldapType
.
equalsIgnoreCase
(
"LDAP"
))
{
authentication
=
ldapAuthenticationProvider
try
{
.
authenticate
(
authentication
);
authentication
=
ldapAuthenticationProvider
}
catch
(
Exception
ex
)
{
.
authenticate
(
authentication
);
LOG
.
error
(
"Error while LDAP authentication"
,
ex
);
}
catch
(
Exception
ex
)
{
}
LOG
.
error
(
"Error while LDAP authentication"
,
ex
);
}
else
if
(
ldapType
.
equalsIgnoreCase
(
"AD"
))
{
}
try
{
}
else
if
(
ldapType
.
equalsIgnoreCase
(
"AD"
))
{
authentication
=
adAuthenticationProvider
try
{
.
authenticate
(
authentication
);
authentication
=
adAuthenticationProvider
}
catch
(
Exception
ex
)
{
.
authenticate
(
authentication
);
LOG
.
error
(
"Error while AD authentication"
,
ex
);
}
catch
(
Exception
ex
)
{
LOG
.
error
(
"Error while AD authentication"
,
ex
);
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment