forked from artemiscloud/activemq-artemis-jolokia-api-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[artemiscloud#16] Implementing security for api-server
- Loading branch information
Showing
26 changed files
with
2,728 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"endpoints": [ | ||
{ | ||
"name": "broker1", | ||
"roles": ["role1", "manager"] | ||
}, | ||
{ | ||
"name": "broker2", | ||
"roles": ["role2", "manager"] | ||
}, | ||
{ | ||
"name": "broker3", | ||
"roles": ["manager"] | ||
}, | ||
{ | ||
"name": "broker4", | ||
"roles": ["manager"] | ||
} | ||
], | ||
"admin": { | ||
"roles": ["manager"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"endpoints": [ | ||
{ | ||
"name": "broker1", | ||
"url": "http://127.0.0.1:8161", | ||
"auth": [ | ||
{ | ||
"scheme": "basic", | ||
"data": { | ||
"username": "guest", | ||
"password": "guest" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "broker2", | ||
"url": "http://127.0.0.2:8161", | ||
"auth": [ | ||
{ | ||
"scheme": "basic", | ||
"data": { | ||
"username": "guest", | ||
"password": "guest" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "broker3", | ||
"url": "http://127.0.0.3:8161", | ||
"auth": [ | ||
{ | ||
"scheme": "basic", | ||
"data": { | ||
"username": "guest", | ||
"password": "guest" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "broker4", | ||
"url": "https://artemis-broker-jolokia-0-svc-ing-default.artemiscloud.io:443", | ||
"jolokiaPrefix": "/jolokia/", | ||
"auth": [ | ||
{ | ||
"scheme": "cert", | ||
"data": { | ||
"certpath": "test-api-server.crt", | ||
"keypath": "test-api-server.key" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
PLUGIN_VERSION=1.0.0 | ||
PLUGIN_NAME='ActiveMQ Artemis Jolokia api-server' | ||
|
||
# dev cert | ||
SERVER_CERT=/var/serving-cert/tls.crt | ||
SERVER_KEY=/var/serving-cert/tls.key | ||
|
||
# replace the token in production deployment | ||
SECRET_ACCESS_TOKEN=1e13d44f998dee277deae621a9012cf300b94c91 | ||
|
||
# to trust jolokia certs | ||
NODE_TLS_REJECT_UNAUTHORIZED='0' | ||
|
||
# logging | ||
LOG_LEVEL='debug' | ||
ENABLE_REQUEST_LOG=false | ||
|
||
# security | ||
API_SERVER_SECURITY_ENABLED=true | ||
USERS_FILE_URL=.test.users.json | ||
ROLES_FILE_URL=.test.roles.json | ||
ENDPOINTS_FILE_URL=.test.endpoints.json | ||
ACCESS_CONTROL_FILE_URL=.test.access.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"roles": [ | ||
{ | ||
"name": "role1", | ||
"uids": ["user1"] | ||
}, | ||
{ | ||
"name": "role2", | ||
"uids": ["user1", "user2"] | ||
}, | ||
{ | ||
"name": "manager", | ||
"uids": ["root"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"users": [ | ||
{ | ||
"id": "user1", | ||
"email": "user1@example.com", | ||
"hash": "$2a$12$nv9iV5/UNuV4Mdj1Jf8zfuUraqboSRtSQqCmtOc4F7rdwmOb9IzNu" | ||
}, | ||
{ | ||
"id": "user2", | ||
"hash": "$2a$12$VHZ9aJ5A87YeFop4xVW.aOMm95ClU.EviyT9o0i8HYLdG6w6ctMfW" | ||
}, | ||
{ | ||
"id": "root", | ||
"email": "user3@example.com", | ||
"hash": "$2a$12$VHZ9aJ5A87YeFop4xVW.aOMm95ClU.EviyT9o0i8HYLdG6w6ctMfW" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.