Skip to content

Commit

Permalink
[#75] Re-organize configuration properties
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeli authored Jul 13, 2018
1 parent 32ca1c9 commit d25e598
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
16 changes: 11 additions & 5 deletions src/main/resources/config/security.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ nna.port=8080
# Whether NNA should manage embedded DB for /history.
nna.historical=false

# How long to sleep in-between NNA reports in milliseconds.
nna.suggestions.reload.sleep.ms=900000

# Turn on / off LDAP authentication.
ldap.enable=false
authorization.enable=false

# Standard LDAP connection properties.
## BaseDn's %u will be replaced with username.
Expand All @@ -49,10 +51,14 @@ ssl.keystore.password=password
jwt.signature.secret=11111111111111111111111111111111
jwt.encryption.secret=0000000000000000

# LDAP Whitelist (This is refresh-able).
## Admin users can make changes to NNA.
## Write users can issues commands that modify the actual HDFS namespace.
## Read-only users can only run queries via NNA.
# Turn on / off NNA authorization and ACLs.
authorization.enable=false

# NNA Authorization ACLs (This is refresh-able during runtime).
## Admin users can make changes to NNA like fetching, saving, and reloading namespace.
## Write users can issues commands that modify the live HDFS cluster.
## Read-only users can run read-only queries via NNA.
## Cache users only have access to cached NNA reports.
## Any user outside these lists cannot use any function of NNA.
## An * will mean all users have this access.
nna.localonly.users=hdfs:hdfs
Expand Down
24 changes: 15 additions & 9 deletions src/test/resources/security.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ nna.port=4567
# Whether NNA should manage embedded DB for /history.
nna.historical=false

# Turn on / off LDAP authentication and authorization.
# How long to sleep in-between NNA reports in milliseconds.
nna.suggestions.reload.sleep.ms=30000

# Turn on / off LDAP authentication.
ldap.enable=true
authorization.enable=true

# Standard LDAP connection properties.
## BaseDn's %u will be replaced with username.
Expand All @@ -41,23 +43,27 @@ ldap.connection.pool.min.size=1
ldap.connection.pool.max.size=2

# Standard SSL properties.
#ssl.keystore.path=
#ssl.keystore.password=
#ssl.keystore.path=file:/tmp/keystore
#ssl.keystore.password=password

# Standard JWT properties.
## Signature defaults to JWSAlgorithm.HS256.
## Encryption defaults to JWEAlgorithm.DIR, EncryptionMethod.A128GCM.
jwt.signature.secret=11111111111111111111111111111111
jwt.encryption.secret=0000000000000000

# LDAP Whitelist (This is refresh-able).
## Admin users can make changes to NNA.
## Write users can issues commands that modify the actual HDFS namespace.
## Read-only users can only run queries via NNA.
# Turn on / off NNA authorization and ACLs.
authorization.enable=true

# NNA Authorization ACLs (This is refresh-able during runtime).
## Admin users can make changes to NNA like fetching, saving, and reloading namespace.
## Write users can issues commands that modify the live HDFS cluster.
## Read-only users can run read-only queries via NNA.
## Cache users only have access to cached NNA reports.
## Any user outside these lists cannot use any function of NNA.
## An * will mean all users have this access.
nna.localonly.users=hdfs:hdfs,hdfsW:hdfsW,hdfsR:hdfsR
nna.admin.users=hdfs
nna.write.users=hdfsW
nna.readonly.users=hdfsR
nna.cache.users=hdfsR,hdfs
nna.suggestions.reload.sleep.ms=30000

0 comments on commit d25e598

Please sign in to comment.