shasank112001 opened a new issue, #25062:
URL: https://github.com/apache/pulsar/issues/25062

   ### Search before reporting
   
   - [x] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Read release policy
   
   - [x] I understand that [unsupported 
versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions)
 don't get bug fixes. I will attempt to reproduce the issue on a supported 
version of Pulsar client and Pulsar broker.
   
   
   ### User environment
   
   Broker Version 4.1.0
   Broker Java Version 17
   Client Library Type: Java
   Client Library Version: 4.1.0
   Client Java Version: 17
   
   ### Issue Description
   
   I have the following cluster setup running locally:
   1. Pulsar Proxy: 
          1. AuthenticationProviders: AuthenticationKeyStoreTLS, and JWT 
Authentication. 
          2. AuthenticationEnabled: true
          3. BrokerClientParams: AuthenticationKeyStoreTLS
          4. forwardAuthorizationCredentials: true
          5. authenticationRefreshCheckSeconds: 5 seconds
   2. Pulsar Broker:
          1. AuthenticationProviders: AuthenticationKeyStoreTLS
          2. AuthenticationEnabled: true
          3. BrokerClientParams: AuthenticationKeyStoreTLS
          5. authenticateOriginalAuthData: false
   3. Pulsar Client:
          1. Authentication class: JWT
   
   
   Test case:
   1. Client connects with a JWT token expiring in the next minute
   2. Client produces messages at 1 msg/sec
   
   Expected Result:
   1. Client should produce for the first minute, and then stop with a 
PulsarClientException when Proxy reauthenticates the token
   
   Observation:
   1. Proxy runs r-authentication, prints that the token has expired. Prints 
disconnect message
   2. Client prints the following messages:
   ```
   [pulsar-client-io-18-3] WARN org.apache.pulsar.client.impl.ClientCnx - [id: 
0x9ed69246, L:/127.0.0.1:62086 - R:localhost/127.0.0.1:62066] Received error 
from server: Failed to authenticate
   [pulsar-client-io-18-3] ERROR org.apache.pulsar.client.impl.ClientCnx - [id: 
0x9ed69246, L:/127.0.0.1:62086 - R:localhost/127.0.0.1:62066] Failed to 
authenticate the client
   [pulsar-client-io-18-3] WARN org.apache.pulsar.client.impl.ClientCnx - [id: 
0x9ed69246, L:/127.0.0.1:62086 - R:localhost/127.0.0.1:62066] Received unknown 
request id from server: -1
   [pulsar-client-io-18-3] INFO org.apache.pulsar.client.impl.ClientCnx - [id: 
0x9ed69246, L:/127.0.0.1:62086 ! R:localhost/127.0.0.1:62066] Disconnected
   [pulsar-timer-62-1] INFO 
org.apache.pulsar.client.impl.ProducerStatsRecorderImpl - 
[persistent://security-test/security-namespace/security] [test-container-1-0-1] 
--- Publish throughput: 1.00 msg/s --- 0.00 Mbit/s --- Latency: med: 6.000 ms - 
95pct: 20.000 ms - 99pct: 25.000 ms - 99.9pct: 25.000 ms - max: 25.000 ms --- 
BatchSize: med: 1.000 - 95pct: 1.000 - 99pct: 1.000 - 99.9pct: 1.000 - max: 
1.000 --- MsgSize: med: 36.000 bytes - 95pct: 36.000 bytes - 99pct: 36.000 
bytes - 99.9pct: 36.000 bytes - max: 36.000 bytes --- Ack received rate: 1.00 
ack/s --- Failed messages: 0 --- Pending messages: 0
   ```
   
   However, the producer.send and consumer message listener are still able to 
send and receive messages:
   
   ```
   Produced message with ID 2:60:-1
   [pulsar-external-listener-33-1] INFO xxxx - Received message with 2:60:-1
   [main] INFO xxxx  - Produced message with ID 2:61:-1
   [main] INFO xxxxx - Produced message with ID 2:62:-1
   [pulsar-external-listener-33-1] INFO xxxx - Received message with 2:61:-1
   [pulsar-external-listener-33-1] INFO xxxx - Received message with 2:62:-1
   ```
   
   ### Error messages
   
   ```text
   
   ```
   
   ### Reproducing the issue
   
   Run the cluster with the above mentioned configuration, with a docker 
compose and not pulsar standalone.
   
   Add the same configuration as mentioned above and try to run a producer and 
consumer with a near-expiry JWT token.
   
   ### Additional information
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


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