2019-02-25 11:46:21 UTC - Jianfeng Qiao: Hi @Matteo Merli, I have a question 
about token based authentication. Per the 
documenation(<https://pulsar.apache.org/docs/en/security-token-client/>),  the 
token is provided when the PulsarClient is created. So the token will be 
verified by broker the first time here? If I use the client to create a 
consumer, I'm wondering if the token will be verified again?
----
2019-02-25 12:02:49 UTC - jia zhai: @Jianfeng Qiao token will be verified when 
connection is established between client and broker. When you create a 
consumer, there will be a new connection, and it will be verified.
----
2019-02-25 12:06:12 UTC - Jianfeng Qiao: @jia zhai It'll use the one that is 
used to create the PulsarClient?
----
2019-02-25 12:07:24 UTC - jia zhai: right. the same one.
----
2019-02-25 12:09:11 UTC - Jianfeng Qiao: Also, I do not see there is an 
interface to renew the token if the token can expire.
----
2019-02-25 12:18:40 UTC - jia zhai: @Jianfeng Qiao Yes, seems no interface 
currently.
----
2019-02-25 12:48:40 UTC - Jianfeng Qiao: @jia zhai Ok, thanks.
----
2019-02-25 14:50:09 UTC - Matteo Merli: @Jianfeng Qiao in the client, you can 
pass a supplier of the token instead of the token itself. 
----
2019-02-25 15:05:43 UTC - Jianfeng Qiao: @Matteo Merli So, what's the 
difference between them?
----
2019-02-25 15:33:52 UTC - Matteo Merli: If you pass a string it’s fixed. If you 
pass a supplier it gets invoked (to get a token string) each time the client 
needs to authenticate with broker
----
2019-02-26 02:49:56 UTC - jia zhai: @Matteo Merli a “supplier” way here, Do you 
mean in client config, use “file:xxx” instead of 
“token:xxx”?:slightly_smiling_face:
----
2019-02-26 02:50:42 UTC - Matteo Merli: 2nd example here: 
<http://pulsar.apache.org/docs/en/security-token-client/#java-client>
----
2019-02-26 02:51:13 UTC - jia zhai: :+1:
----
2019-02-26 02:51:15 UTC - jia zhai: Thanks
----
2019-02-26 02:57:37 UTC - Matteo Merli: But yes, even specifying file: will 
read the file each time we use the credentials, to allow for updating it
----
2019-02-26 03:21:00 UTC - jia zhai: :+1:
----
2019-02-26 06:12:08 UTC - Jianfeng Qiao: @Matteo Merli OK,Thanks.
----

Reply via email to