You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,12 +39,46 @@ Change the following settings of application-home.yml in src/main/resources to v
38
39
kafka.brokers
39
40
zookeeper.uris
40
41
42
+
Change security related parameters in application config file:
43
+
See below: <<_security,'How to config security'>>
44
+
45
+
server.security.check
46
+
server.security.checkInitDelay
47
+
server.security.checkSecurityInterval
48
+
49
+
If you want to use JMX Query Filter function, you can add your own custom filter files to JMXFilterTemplate directory in project root folder.
50
+
More details refer to https://github.com/gnuhpc/Kafka-zk-restapi/blob/master/docs/JMXCollector.adoc[JMXCollector API Specification]
51
+
41
52
#mvn clean package -Dmaven.test.skip=true+
42
53
43
54
You will find zip/tar under directory: Kafka-zk-restapi/target
44
55
45
56
You can get it running by unzip/untaring the distribution package and run bin/start.sh
46
57
58
+
[[_security]]
59
+
=== Security
60
+
Public REST services without access control make the sensitive data under risk.Then we provide a simple authentication mechanism using Spring Security.
61
+
In order to make the project lighter, we use yml file to store user information, not using database.
62
+
63
+
Follow the steps to enable security feature:
64
+
65
+
Step 1:Modify the application config file and set server.security.check to true. +
66
+
67
+
* server.security.check:
68
+
** True: Add security for the API. Clients can access the API with valid username and password stored in security.yml, or the Swagger UI(http://127.0.0.1:8121/api) is only
69
+
allowed to access.
70
+
** False: All the endpoints can be accessed without authentication.
71
+
* server.security.checkInitDelay: The number of seconds of init delay for the timing thread to check the security file.
72
+
* server.security.checkSecurityInterval: The number of seconds of check interval for the timing thread to check the security file.
73
+
74
+
Step 2: Make sure security/security.yml exist in application root folder.
75
+
76
+
Step 3: Use user controller API to add user to security file security/security.yml. +
77
+
**Notice**:
78
+
79
+
* The first user should be added manually. Password need to be encoded using bcrypt before saving to the yml file.For convenience, we provide CommonUtils to encode the password.
80
+
* No need to restart server after adding new user or update user info. Timing thread introduced in Step 1 will refresh the user list according to your settings.
81
+
47
82
=== Support Kafka Version Information
48
83
Currently, this rest api (master branch) supports Kafka 0.10.x brokers. The master branch is the most active branch.
49
84
@@ -66,6 +101,7 @@ You can access Swagger-UI by accessing http://127.0.0.1:8121/api
66
101
* kafka-controller : Kafka Api
67
102
* zookeeper-controller : Zookeeper Api
68
103
* collector-controller : JMX Metric Collector Api
104
+
* user-controller : User management Api
69
105
70
106
71
107
=== https://github.com/gnuhpc/Kafka-zk-restapi/blob/master/docs/definitions.adoc[Data Model Definitions for 0.10]
Copy file name to clipboardExpand all lines: docs/JMXCollector.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -302,7 +302,7 @@ The response is as follows:
302
302
----
303
303
304
304
==== How to add filter template
305
-
You can add filter template yml file in the resources/JMXFilterTempalte directory. The fields of the file are the same with the query filter that noticed above.
305
+
You can add filter template yml files to JMXFilterTemplate directory in project root folder. The fields of the file are the same with the query filter that noticed above.
0 commit comments