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
fc0ae771
Commit
fc0ae771
authored
Mar 30, 2020
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3667: Option to store Ldap/AD bind password in jceks keystore file - #2 (fix for NPE)
parent
d727cef7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
ApplicationProperties.java
...src/main/java/org/apache/atlas/ApplicationProperties.java
+6
-2
No files found.
intg/src/main/java/org/apache/atlas/ApplicationProperties.java
View file @
fc0ae771
...
...
@@ -277,15 +277,18 @@ public final class ApplicationProperties extends PropertiesConfiguration {
}
private
static
void
setLdapPasswordFromKeystore
(
Configuration
configuration
)
{
String
ldapType
=
configuration
.
getString
(
LDAP_TYPE
);
if
(
StringUtils
.
isNotEmpty
(
ldapType
))
{
try
{
if
(
configuration
.
getString
(
LDAP_TYPE
)
.
equalsIgnoreCase
(
"ldap"
))
{
if
(
ldapType
.
equalsIgnoreCase
(
"ldap"
))
{
String
maskPasssword
=
configuration
.
getString
(
LDAP_BIND_PASSWORD
);
if
(
MASK_LDAP_PASSWORD
.
equals
(
maskPasssword
))
{
String
password
=
SecurityUtil
.
getPassword
(
configuration
,
LDAP_BIND_PASSWORD
);
configuration
.
clearProperty
(
LDAP_BIND_PASSWORD
);
configuration
.
addProperty
(
LDAP_BIND_PASSWORD
,
password
);
}
}
else
if
(
configuration
.
getString
(
LDAP_TYPE
)
.
equalsIgnoreCase
(
"ad"
))
{
}
else
if
(
ldapType
.
equalsIgnoreCase
(
"ad"
))
{
String
maskPasssword
=
configuration
.
getString
(
LDAP_AD_BIND_PASSWORD
);
if
(
MASK_LDAP_PASSWORD
.
equals
(
maskPasssword
))
{
String
password
=
SecurityUtil
.
getPassword
(
configuration
,
LDAP_AD_BIND_PASSWORD
);
...
...
@@ -297,6 +300,7 @@ public final class ApplicationProperties extends PropertiesConfiguration {
LOG
.
error
(
"Error in getting secure password "
,
e
);
}
}
}
private
void
setDefaults
()
{
AtlasRunMode
runMode
=
AtlasRunMode
.
valueOf
(
getString
(
ATLAS_RUN_MODE
,
DEFAULT_ATLAS_RUN_MODE
.
name
()));
...
...
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