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
82b6f727
Commit
82b6f727
authored
Jun 12, 2017
by
apoorvnaik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1872: Spring fix for Kerberos and bean ordering/default
parent
6b9399e0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
7 deletions
+36
-7
HBaseBasedAuditRepository.java
...che/atlas/repository/audit/HBaseBasedAuditRepository.java
+1
-1
NoopEntityAuditRepository.java
...che/atlas/repository/audit/NoopEntityAuditRepository.java
+1
-1
LoginProcessor.java
...n/java/org/apache/atlas/web/listeners/LoginProcessor.java
+0
-4
KerberosAwareListener.java
...ava/org/apache/atlas/web/setup/KerberosAwareListener.java
+33
-0
web.xml
webapp/src/main/webapp/WEB-INF/web.xml
+1
-1
No files found.
repository/src/main/java/org/apache/atlas/repository/audit/HBaseBasedAuditRepository.java
View file @
82b6f727
...
...
@@ -73,7 +73,7 @@ import java.util.Map;
*/
@Singleton
@Component
@ConditionalOnAtlasProperty
(
property
=
"atlas.EntityAuditRepository.impl"
)
@ConditionalOnAtlasProperty
(
property
=
"atlas.EntityAuditRepository.impl"
,
isDefault
=
true
)
public
class
HBaseBasedAuditRepository
implements
Service
,
EntityAuditRepository
,
ActiveStateChangeHandler
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
HBaseBasedAuditRepository
.
class
);
...
...
repository/src/main/java/org/apache/atlas/repository/audit/NoopEntityAuditRepository.java
View file @
82b6f727
...
...
@@ -32,7 +32,7 @@ import java.util.List;
*/
@Singleton
@Component
@ConditionalOnAtlasProperty
(
property
=
"atlas.EntityAuditRepository.impl"
,
isDefault
=
true
)
@ConditionalOnAtlasProperty
(
property
=
"atlas.EntityAuditRepository.impl"
)
public
class
NoopEntityAuditRepository
implements
EntityAuditRepository
{
@Override
...
...
webapp/src/main/java/org/apache/atlas/web/listeners/LoginProcessor.java
View file @
82b6f727
...
...
@@ -26,9 +26,7 @@ import org.apache.hadoop.security.UserGroupInformation;
import
org.apache.hadoop.util.Shell
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
...
...
@@ -36,7 +34,6 @@ import java.net.UnknownHostException;
/**
* A class capable of performing a simple or kerberos login.
*/
@Component
public
class
LoginProcessor
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
LoginProcessor
.
class
);
...
...
@@ -49,7 +46,6 @@ public class LoginProcessor {
* Perform a SIMPLE login based on established OS identity or a kerberos based login using the configured
* principal and keytab (via atlas-application.properties).
*/
@PostConstruct
public
void
login
()
{
// first, let's see if we're running in a hadoop cluster and have the env configured
boolean
isHadoopCluster
=
isHadoopCluster
();
...
...
webapp/src/main/java/org/apache/atlas/web/setup/KerberosAwareListener.java
0 → 100644
View file @
82b6f727
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
apache
.
atlas
.
web
.
setup
;
import
org.apache.atlas.web.listeners.LoginProcessor
;
import
org.springframework.web.context.ContextLoaderListener
;
import
javax.servlet.ServletContextEvent
;
public
class
KerberosAwareListener
extends
ContextLoaderListener
{
@Override
public
void
contextInitialized
(
ServletContextEvent
event
)
{
LoginProcessor
loginProcessor
=
new
LoginProcessor
();
loginProcessor
.
login
();
super
.
contextInitialized
(
event
);
}
}
webapp/src/main/webapp/WEB-INF/web.xml
View file @
82b6f727
...
...
@@ -70,7 +70,7 @@
</listener>
<listener>
<listener-class>
org.
springframework.web.context.ContextLoader
Listener
</listener-class>
<listener-class>
org.
apache.atlas.web.setup.KerberosAware
Listener
</listener-class>
</listener>
...
...
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