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
aaeddd38
Commit
aaeddd38
authored
Sep 26, 2017
by
Péter Gergő Barna
Committed by
Madhan Neethiraj
Sep 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2172: Atlas AD search filter is not get honored when logging into Atlas UI
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
9e59fabe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
AtlasADAuthenticationProvider.java
...che/atlas/web/security/AtlasADAuthenticationProvider.java
+4
-3
applicationContext.xml
webapp/src/main/webapp/WEB-INF/applicationContext.xml
+1
-1
No files found.
webapp/src/main/java/org/apache/atlas/web/security/AtlasADAuthenticationProvider.java
View file @
aaeddd38
...
...
@@ -93,9 +93,6 @@ public class AtlasADAuthenticationProvider extends AtlasAbstractAuthenticationPr
ldapContextSource
.
setPooled
(
true
);
ldapContextSource
.
afterPropertiesSet
();
if
(
adUserSearchFilter
==
null
||
adUserSearchFilter
.
trim
().
isEmpty
())
{
adUserSearchFilter
=
"(sAMAccountName={0})"
;
}
FilterBasedLdapUserSearch
userSearch
=
new
FilterBasedLdapUserSearch
(
adBase
,
adUserSearchFilter
,
ldapContextSource
);
userSearch
.
setSearchSubtree
(
true
);
...
...
@@ -140,6 +137,7 @@ public class AtlasADAuthenticationProvider extends AtlasAbstractAuthenticationPr
new
ActiveDirectoryLdapAuthenticationProvider
(
adDomain
,
adURL
);
adAuthenticationProvider
.
setConvertSubErrorCodesToExceptions
(
true
);
adAuthenticationProvider
.
setUseAuthenticationRequestCredentials
(
true
);
adAuthenticationProvider
.
setSearchFilter
(
adUserSearchFilter
);
if
(
userName
!=
null
&&
userPassword
!=
null
&&
!
userName
.
trim
().
isEmpty
()
...
...
@@ -174,6 +172,9 @@ public class AtlasADAuthenticationProvider extends AtlasAbstractAuthenticationPr
this
.
adBindDN
=
properties
.
getProperty
(
"bind.dn"
);
this
.
adBindPassword
=
properties
.
getProperty
(
"bind.password"
);
this
.
adUserSearchFilter
=
properties
.
getProperty
(
"user.searchfilter"
);
if
(
adUserSearchFilter
==
null
||
adUserSearchFilter
.
trim
().
isEmpty
())
{
adUserSearchFilter
=
"(sAMAccountName={0})"
;
}
this
.
adBase
=
properties
.
getProperty
(
"base.dn"
);
this
.
adReferral
=
properties
.
getProperty
(
"referral"
);
this
.
adDefaultRole
=
properties
.
getProperty
(
"default.role"
);
...
...
webapp/src/main/webapp/WEB-INF/applicationContext.xml
View file @
aaeddd38
...
...
@@ -15,7 +15,7 @@
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans
-3.1
.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"
>
http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"
>
<context:annotation-config/>
<aop:config
proxy-target-class=
"true"
/>
...
...
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