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
ebeb0c98
Commit
ebeb0c98
authored
May 29, 2019
by
nixonrodrigues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3243 : Fix to support Atlas UI to be access via Knox Trusted Proxy.
Change-Id: I1612c402729c50145b8c7f8f5a57f959b0bd4ba2
parent
17803eed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
AtlasAuthenticationFilter.java
...g/apache/atlas/web/filters/AtlasAuthenticationFilter.java
+4
-2
No files found.
webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java
View file @
ebeb0c98
...
@@ -389,6 +389,7 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
...
@@ -389,6 +389,7 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
HttpServletResponse
httpResponse
=
(
HttpServletResponse
)
response
;
HttpServletResponse
httpResponse
=
(
HttpServletResponse
)
response
;
boolean
isHttps
=
"https"
.
equals
(
httpRequest
.
getScheme
());
boolean
isHttps
=
"https"
.
equals
(
httpRequest
.
getScheme
());
AuthenticationHandler
authHandler
=
getAuthenticationHandler
();
AuthenticationHandler
authHandler
=
getAuthenticationHandler
();
String
doAsUser
=
supportTrustedProxy
?
Servlets
.
getDoAsUser
(
httpRequest
)
:
null
;
try
{
try
{
boolean
newToken
=
false
;
boolean
newToken
=
false
;
...
@@ -445,7 +446,6 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
...
@@ -445,7 +446,6 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
};
};
// Create the proxy user if doAsUser exists
// Create the proxy user if doAsUser exists
String
doAsUser
=
supportTrustedProxy
?
Servlets
.
getDoAsUser
(
httpRequest
)
:
null
;
if
(
supportTrustedProxy
&&
doAsUser
!=
null
&&
!
doAsUser
.
equals
(
httpRequest
.
getRemoteUser
()))
{
if
(
supportTrustedProxy
&&
doAsUser
!=
null
&&
!
doAsUser
.
equals
(
httpRequest
.
getRemoteUser
()))
{
LOG
.
debug
(
"doAsUser is {}"
,
doAsUser
);
LOG
.
debug
(
"doAsUser is {}"
,
doAsUser
);
...
@@ -507,8 +507,10 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
...
@@ -507,8 +507,10 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
errCode
=
HttpServletResponse
.
SC_FORBIDDEN
;
errCode
=
HttpServletResponse
.
SC_FORBIDDEN
;
}
}
boolean
isKerberosOnBrowser
=
supportKeyTabBrowserLogin
||
doAsUser
!=
null
;
if
(
authenticationEx
==
null
)
{
// added this code for atlas error handling and fallback
if
(
authenticationEx
==
null
)
{
// added this code for atlas error handling and fallback
if
(!
supportKeyTabBrowserLogin
&&
isBrowser
(
httpRequest
.
getHeader
(
"User-Agent"
)))
{
if
(!
isKerberosOnBrowser
&&
isBrowser
(
httpRequest
.
getHeader
(
"User-Agent"
)))
{
filterChain
.
doFilter
(
request
,
response
);
filterChain
.
doFilter
(
request
,
response
);
}
else
{
}
else
{
boolean
chk
=
true
;
boolean
chk
=
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