youg9203 opened a new issue #14191:
URL: https://github.com/apache/pulsar/issues/14191
**Describe the bug**
Unable to list the non-persistent topics using the command line, what other
permission is required for the role?
My subject is `myuser` and authorized by the below command using superuser
role:
```
$ pulsar-admin namespaces grant-permission public/default --role myuser
--actions produce,consume,sources,sinks,functions,packages
```
Topics list command:
```
$ 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 public/default
```
Error:
```
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]:
2022-02-09T12:38:16,128+0000 [AsyncHttpClient-48-1] ERROR
org.apache.pulsar.broker.admin.v2.NonPersistentTopics - [myuser] Failed to get
list of topics under namespace public/default
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]:
java.util.concurrent.ExecutionException:
org.apache.pulsar.client.admin.PulsarAdminException$NotAuthorizedException:
Unauthorized to validateNamespaceOperation for operation [GET_BUNDLE] on
namespace [public/default]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.apache.pulsar.broker.admin.v2.NonPersistentTopics.lambda$getList$4(NonPersistentTopics.java:410)
~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:836)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:811)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.apache.pulsar.client.admin.internal.TopicsImpl$5.failed(TopicsImpl.java:287)
~[org.apache.pulsar-pulsar-client-admin-original-2.9.1.jar:2.9.1]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.client.JerseyInvocation$1.failed(JerseyInvocation.java:882)
~[org.glassfish.jersey.core-jersey-client-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.client.JerseyInvocation$1.completed(JerseyInvocation.java:863)
~[org.glassfish.jersey.core-jersey-client-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:229)
~[org.glassfish.jersey.core-jersey-client-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.client.ClientRuntime.access$200(ClientRuntime.java:62)
~[org.glassfish.jersey.core-jersey-client-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.client.ClientRuntime$2.lambda$response$0(ClientRuntime.java:173)
~[org.glassfish.jersey.core-jersey-client-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
~[org.glassfish.jersey.core-jersey-common-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
~[org.glassfish.jersey.core-jersey-common-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.internal.Errors.process(Errors.java:292)
~[org.glassfish.jersey.core-jersey-common-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.internal.Errors.process(Errors.java:274)
~[org.glassfish.jersey.core-jersey-common-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.internal.Errors.process(Errors.java:244)
~[org.glassfish.jersey.core-jersey-common-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288)
~[org.glassfish.jersey.core-jersey-common-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.glassfish.jersey.client.ClientRuntime$2.response(ClientRuntime.java:173)
~[org.glassfish.jersey.core-jersey-client-2.34.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector.lambda$apply$1(AsyncHttpConnector.java:228)~[org.apache.pulsar-pulsar-client-admin-original-2.9.1.jar:2.9.1]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975)
~[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector.lambda$retryOperation$4(AsyncHttpConnector.java:270)
~[org.apache.pulsar-pulsar-client-admin-original-2.9.1.jar:2.9.1]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975)
[?:1.8.0_312]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.asynchttpclient.netty.NettyResponseFuture.loadContent(NettyResponseFuture.java:222)
[org.asynchttpclient-async-http-client-2.12.1.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.asynchttpclient.netty.NettyResponseFuture.done(NettyResponseFuture.java:257)
[org.asynchttpclient-async-http-client-2.12.1.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.asynchttpclient.netty.handler.AsyncHttpClientHandler.finishUpdate(AsyncHttpClientHandler.java:241)
[org.asynchttpclient-async-http-client-2.12.1.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.asynchttpclient.netty.handler.HttpHandler.handleChunk(HttpHandler.java:114)
[org.asynchttpclient-async-http-client-2.12.1.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.asynchttpclient.netty.handler.HttpHandler.handleRead(HttpHandler.java:143)
[org.asynchttpclient-async-http-client-2.12.1.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78)
[org.asynchttpclient-async-http-client-2.12.1.jar:?]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
[io.netty-netty-codec-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
[io.netty-netty-codec-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
[io.netty-netty-codec-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
[io.netty-netty-transport-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
[io.netty-netty-common-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[io.netty-netty-common-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
[io.netty-netty-common-4.1.72.Final.jar:4.1.72.Final]
Feb 09 12:38:16 ip-10-11-2-26.eu-north-1.compute.internal pulsar[31737]: at
java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
```
**Expected behavior**
Should list the topics
**Desktop (please complete the following information):**
```
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.7 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.7
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.7"
```
--
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]