You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/14 03:11:04 UTC
[GitHub] [pulsar-manager] lvs071103 opened a new issue #301: broker enable authentication authorization, pulsar-manager no data
lvs071103 opened a new issue #301:
URL: https://github.com/apache/pulsar-manager/issues/301
broker settings:
```
authenticationEnabled=true
authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderToken
authorizationEnabled=true
authorizationProvider=org.apache.pulsar.broker.authorization.PulsarAuthorizationProvider
superUserRoles=zhoufr,admin,pulsar
brokerClientAuthenticationPlugin=org.apache.pulsar.client.impl.auth.AuthenticationToken
brokerClientAuthenticationParameters=token:eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.8Nv_-CV5Nt55PT6BElhIGryGD7IvMM1Mg6-V0RZgqBM
tokenSecretKey=file:///opt/Apps/pulsar/admin.key
```
start pular-manager:
```
$ export JWT_TOKEN="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.8Nv_-CV5Nt55PT6BElhIGryGD7IvMM1Mg6-V0RZgqBM"
$ export SECRET_KEY="file:///opt/Apps/pulsar/admin.key"
$ docker run -dit -p 9527:9527 -e REDIRECT_HOST=http://10.1.104.130 -e REDIRECT_PORT=9527 -e DRIVER_CLASS_NAME=org.postgresql.Driver -e URL='jdbc:postgresql://127.0.0.1:5432/pulsar_manager' -e USERNAME=pulsar -e PASSWORD=pulsar -e LOG_LEVEL=DEBUG -e JWT_TOKEN=$JWT_TOKEN -e PRIVATE_KEY=$PRIVATE_KEY -e PUBLIC_KEY=$PUBLIC_KEY -v $PWD:/data -v $PWD/secret-key-path:/pulsar-manager/secret-key-path apachepulsar/pulsar-manager:v0.1.0 /bin/sh
31c14661615f66a5240e67150cd4f3093ce9b88d38cf4c5a0c2a4df0cfcc6034
[root@pulsar-shanghai-node01 data]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
31c14661615f apachepulsar/pulsar-manager:v0.1.0 "/pulsar-manager/ent…" 6 seconds ago Up 5 seconds 0.0.0.0:9527->9527/tcp quizzical_chandrasekhar
```
![image](https://user-images.githubusercontent.com/5029708/84583802-7a7e1280-ae2f-11ea-9b92-526fe82aae2b.png)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-manager] lvs071103 closed issue #301: broker enable authentication and authorization, pulsar-manager no data
Posted by GitBox <gi...@apache.org>.
lvs071103 closed issue #301:
URL: https://github.com/apache/pulsar-manager/issues/301
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-manager] tuteng commented on issue #301: broker enable authentication and authorization, pulsar-manager no data
Posted by GitBox <gi...@apache.org>.
tuteng commented on issue #301:
URL: https://github.com/apache/pulsar-manager/issues/301#issuecomment-643772026
Have you tried to configure this token in the conf/client.conf file for the pulsar-admin tool? @lvs071103
Then run the command:
```
./bin/pulsar-admin tenants list
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-manager] lvs071103 edited a comment on issue #301: broker enable authentication and authorization, pulsar-manager no data
Posted by GitBox <gi...@apache.org>.
lvs071103 edited a comment on issue #301:
URL: https://github.com/apache/pulsar-manager/issues/301#issuecomment-647074040
rebuild docker image issue solved:
```
git clone https://github.com/apache/pulsar-manager
cd pulsar-manager
./gradlew build -x test
cd front-end
npm install --save
npm rebuild node-sass
npm run build:prod
cd ..
docker build -f docker/Dockerfile --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF='latest' --build-arg VERSION='latest' -t apachepulsar/pulsar-manager .
```
enter container and run command:
```
/pulsar-manager # apk add curl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/4) Installing nghttp2-libs (1.35.1-r2)
(2/4) Installing libssh2 (1.9.0-r1)
(3/4) Installing libcurl (7.64.0-r3)
(4/4) Installing curl (7.64.0-r3)
Executing busybox-1.29.3-r10.trigger
OK: 162 MiB in 78 packages
/pulsar-manager # curl -H "Content-Type: application/json" -X PUT http://172.17.0.2:7750/pulsar-manager/users/superuser -d '{"name": "pulsar", "password": "pulsar", "
description": "admin user", "email": "admin-user@dominos.com.cn"}'
{"message":"Add super user success, please login"}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-manager] lvs071103 commented on issue #301: broker enable authentication and authorization, pulsar-manager no data
Posted by GitBox <gi...@apache.org>.
lvs071103 commented on issue #301:
URL: https://github.com/apache/pulsar-manager/issues/301#issuecomment-647074040
rebuild docker image issue solved:
```
git clone https://github.com/apache/pulsar-manager
cd pulsar-manager
./gradlew build -x test
cd front-end
npm install --save
npm rebuild node-sass
npm run build:prod
cd ..
docker build -f docker/Dockerfile --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF='latest' --build-arg VERSION='latest' -t apachepulsar/pulsar-manager .
```
enter container and run command:
```
/pulsar-manager # apk add curl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/4) Installing nghttp2-libs (1.35.1-r2)
(2/4) Installing libssh2 (1.9.0-r1)
(3/4) Installing libcurl (7.64.0-r3)
(4/4) Installing curl (7.64.0-r3)
Executing busybox-1.29.3-r10.trigger
OK: 162 MiB in 78 packages
# curl -H "Content-Type: application/json" -X PUT http://172.17.0.2:7750/pulsar-manager/users/superuser -d '{"name": "pulsar", "password": "pulsar", "
description": "admin user", "email": "admin-user@dominos.com.cn"}'
{"message":"Add super user success, please login"}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-manager] lvs071103 commented on issue #301: broker enable authentication and authorization, pulsar-manager no data
Posted by GitBox <gi...@apache.org>.
lvs071103 commented on issue #301:
URL: https://github.com/apache/pulsar-manager/issues/301#issuecomment-643910543
@tuteng
client.conf settings:
```
[root@pulsar-shanghai-node01 pulsar]# grep "^[a-z]" conf/client.conf
webServiceUrl=http://localhost:8080/
brokerServiceUrl=pulsar://localhost:6650/
authPlugin=org.apache.pulsar.client.impl.auth.AuthenticationToken
authParams=token:eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.8Nv_-CV5Nt55PT6BElhIGryGD7IvMM1Mg6-V0RZgqBM
tlsAllowInsecureConnection=false
tlsEnableHostnameVerification=false
tlsTrustCertsFilePath=
useKeyStoreTls=false
tlsTrustStoreType=JKS
tlsTrustStorePath=
tlsTrustStorePassword=
```
```
[root@pulsar-shanghai-node01 pulsar]# bin/pulsar-admin tenants list
"dominos_dev"
"dominos_test"
"dominosplus"
"my-tenant"
"my-test"
"public"
"pulsar"
"zhoufr"
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org