mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2025-09-12 13:39:10 +08:00
[ISSUE-205|247] Support SSL + Login: Polish with testcase, doc, session over cookie
This commit is contained in:
@@ -62,4 +62,57 @@
|
||||
* Only Return 64 Messages
|
||||
* Query By Topic And MessageId
|
||||
* look over this message's detail info.you can see the message's consume state(each group has one line),show the exception message if has exception.
|
||||
you can send this message to the group you selected
|
||||
you can send this message to the group you selected
|
||||
|
||||
|
||||
## Access Console with HTTPS
|
||||
* SpringBoot itself has provided the SSL configuration. You can use the project test Keystore:resources/rmqcngkeystore.jks. The store is generated with the following unix keytool commands:
|
||||
```
|
||||
#Generate Keystore and add alias rmqcngKey
|
||||
keytool -genkeypair -alias rmqcngKey -keyalg RSA -validity 3650 -keystore rmqcngkeystore.jks
|
||||
#View keystore content
|
||||
keytool -list -v -keystore rmqcngkeystore.jks
|
||||
#Transfer type as official
|
||||
keytool -importkeystore -srckeystore rmqcngkeystore.jks -destkeystore rmqcngkeystore.jks -deststoretype pkcs12
|
||||
```
|
||||
|
||||
* Uncomment the following SSL properties in resources/application.properties. restart Console then access with HTTPS.
|
||||
|
||||
```
|
||||
#Set https port
|
||||
server.port=8443
|
||||
|
||||
### SSL setting
|
||||
server.ssl.key-store=classpath:rmqcngkeystore.jks
|
||||
server.ssl.key-store-password=rocketmq
|
||||
server.ssl.keyStoreType=PKCS12
|
||||
server.ssl.keyAlias=rmqcngkey
|
||||
```
|
||||
|
||||
## Login/Logout on Console
|
||||
Access Console with username and password and logout to leave the console。To stage the function on, we need the steps below:
|
||||
|
||||
* 1.Turn on the property in resources/application.properties.
|
||||
```$xslt
|
||||
# open the login func
|
||||
rocketmq.config.loginRequired=true
|
||||
|
||||
# Directory of ashboard & login user configure file
|
||||
rocketmq.config.dataPath=/tmp/rocketmq-console/data
|
||||
```
|
||||
* 2.Make sure the directory defined in property ${rocketmq.config.dataPath} exists and the file "users.properties" is created under it.
|
||||
The console system will use the resources/users.properties by default if a customized file is not found。
|
||||
|
||||
The format in the content of users.properties:
|
||||
```$xslt
|
||||
# This file supports hot change, any change will be auto-reloaded without Console restarting.
|
||||
# Format: a user per line, username=password[,N] #N is optional, 0 (Normal User); 1 (Admin)
|
||||
|
||||
# Define Admin
|
||||
admin=admin,1
|
||||
|
||||
# Define Normal users
|
||||
user1=user1
|
||||
user2=user2
|
||||
```
|
||||
* 3. Restart Console Application after above configuration setting well.
|
Reference in New Issue
Block a user