youg9203 edited a comment on issue #14191:
URL: https://github.com/apache/pulsar/issues/14191#issuecomment-1033777619


   I have retested from the beginning, create tenant with `admin` roles then 
create a namespace, and then using `admin` or `superadmin` role create token 
and called pulsar admin to list the topic of the new tenant and namespace but 
still same error, admin client shows the below error:
   ```
   HTTP 500 Server Error
   
   Reason: HTTP 500 Server Error
   ```
   
   Steps:
   ```bash
   $ pulsar-admin --admin-url https://dev.pulsar.xyz.com:8081 --auth-plugin 
"org.apache.pulsar.client.impl.auth.AuthenticationToken" --auth-params 
"token:<token>" tenants create mytenant --admin-roles my-admin-role
   $ pulsar-admin --admin-url https://dev.pulsar.xyz.com:8081 --auth-plugin 
"org.apache.pulsar.client.impl.auth.AuthenticationToken" --auth-params 
"token:<token>" namespaces create mytenant/np1 
   $ pulsar tokens create --private-key file:///path/to/private/key --subject 
my-admin-role --expiry-time 60m
   $ pulsar-admin --admin-url https://dev.pulsar.xyz.com:8081 --auth-plugin 
"org.apache.pulsar.client.impl.auth.AuthenticationToken" --auth-params 
"token:<token>" topics list mytenant/np1 
   HTTP 500 Server Error
   
   Reason: HTTP 500 Server Error
   ```
   
   Pulsar broker log:
   ```
   Caused by: 
org.apache.pulsar.client.admin.PulsarAdminException$NotAuthorizedException: 
Unauthorized to validateNamespaceOperation for operation [GET_BUNDLE] on 
namespace [mytenant/np1]
   Feb 09 13:36:47 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at 
org.apache.pulsar.client.admin.internal.BaseResource.getApiException(BaseResource.java:228)
 ~[org.apache.pulsar-pulsar-client-admin-original-2.9.1.jar:2.9.1]
   Feb 09 13:36:47 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: ... 
56 more
   Feb 09 13:36:47 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: 
Caused by: javax.ws.rs.ForbiddenException: HTTP 403 Forbidden
   Feb 09 13:36:47 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at 
org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:945)
 ~[org.glassfish.jersey.core-jersey-client-2.34.jar:?]
   Feb 09 13:36:47 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at 
org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:82)
 ~[org.glassfish.jersey.core-jersey-client-2.34.jar:?]
   Feb 09 13:36:47 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: ... 
54 more
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to