VadimMolodyh opened a new issue #12115: URL: https://github.com/apache/pulsar/issues/12115
**Describe the bug** I’m trying to set-up authentication via JWT tokens in a standalone pulsar container, but I keep getting “HTTP 412 Precondition Failed Clusters can not be empty” error when try to create a tenant via pulsar-admin command, although it works correctly with disabled authentication. According to pulsar logs it “Successfully authorized admin1 as super-user" but then “[admin1] Failed to validate due to clusters are empty”. I do have a default “clusterName=standalone” in standalone.conf but it does not help. **To Reproduce** Steps to reproduce the behavior: 1. I use apachepulsar/pulsar:2.7.2 docker container with "bin/pulsar standalone -nfw -nss" command (function worker is disabled to avoid auth issues). 2. I followed instructions on https://pulsar.apache.org/docs/en/security-jwt documentation page to enable authentication via symmetric secret key: 2.1. I created a symmetric secret key to /pulsar/conf/my-secret.key. 2.2. I generated a JWT token for admin1 role. 2.3. client.conf channges: authPlugin=org.apache.pulsar.client.impl.auth.AuthenticationToken authParams=token:eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbjEifQ.M5THXy95jofensE7egEqwRtUGyQ1f6HtpU_si4cH_7c 2.4 standalone.conf changes: authenticationEnabled=true authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderToken authorizationEnabled=true tokenSecretKey=file:///pulsar/conf/my-secret.key superUserRoles=admin1 3. Container successfully starts. 4. Execute "bin/pulsar-admin tenants create trade_routing_sf" 5. Get error "Failed to validate due to clusters are empty”. **Expected behavior** Tenant is successfully created. **Desktop (please complete the following information):** - OS: apachepulsar/pulsar:2.7.2 docker container -- 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]
