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
466372ef
Commit
466372ef
authored
8 years ago
by
nixonrodrigues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1752:- Fix for Atlas group for kerberos authentication
parent
bcc89f3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
AtlasAuthenticationFilter.java
...g/apache/atlas/web/filters/AtlasAuthenticationFilter.java
+2
-6
No files found.
webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java
View file @
466372ef
...
...
@@ -22,6 +22,7 @@ import org.apache.atlas.ApplicationProperties;
import
org.apache.atlas.RequestContext
;
import
org.apache.atlas.security.SecurityProperties
;
import
org.apache.atlas.utils.AuthenticationUtil
;
import
org.apache.atlas.web.security.AtlasAuthenticationProvider
;
import
org.apache.atlas.web.util.Servlets
;
import
org.apache.commons.collections.iterators.IteratorEnumeration
;
import
org.apache.commons.configuration.Configuration
;
...
...
@@ -266,13 +267,8 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
}
if
((
existingAuth
==
null
||
!
existingAuth
.
isAuthenticated
())
&&
(!
StringUtils
.
isEmpty
(
userName
)))
{
UserGroupInformation
ugi
=
UserGroupInformation
.
getLoginUser
();
String
[]
groupsName
=
ugi
.
getGroupNames
();
final
List
<
GrantedAuthority
>
grantedAuths
=
new
ArrayList
<>();
for
(
String
group
:
groupsName
)
{
grantedAuths
.
add
(
new
SimpleGrantedAuthority
(
group
));
}
List
<
GrantedAuthority
>
grantedAuths
=
AtlasAuthenticationProvider
.
getAuthoritiesFromUGI
(
userName
);
final
UserDetails
principal
=
new
User
(
userName
,
""
,
grantedAuths
);
final
Authentication
finalAuthentication
=
new
UsernamePasswordAuthenticationToken
(
principal
,
""
,
grantedAuths
);
...
...
This diff is collapsed.
Click to expand it.
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