Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why did externalPulsar authParmas make this mistake? #102

Closed
1191510903 opened this issue Jul 4, 2024 · 1 comment
Closed

Why did externalPulsar authParmas make this mistake? #102

1191510903 opened this issue Jul 4, 2024 · 1 comment

Comments

@1191510903
Copy link

externalPulsar:
enabled: true
host: "xxxx"
port: 30012
maxMessageSize: "5242880" # 5 * 1024 * 1024 Bytes, Maximum size of each message in pulsar.
tenant: "xxxx"
namespace: "xxx"
authPlugin: "org.apache.pulsar.client.impl.auth.AuthenticationToken"
authParams: {"token": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJsbG0tcGxhdGZvcm0tdG9rZW4ifQ.g4cejYFJtfUlPHbeOdmNRjMlNWImhvLkcF-YR71YpPjiXihqCTOM4vghlRIDYECR4Oc7xxxxxx"}
看源码发现是go解析jwt没有解析出来,是否有解决方案呢?
image

@haorenfsa
Copy link
Collaborator

JSON format is also supported in yaml,@1191510903
When you write

authParams: {"token": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJsbG0tcGxhdGZvcm0tdG9rZW4ifQ.g4cejYFJtfUlPHbeOdmNRjMlNWImhvLkcF-YR71YpPjiXihqCTOM4vghlRIDYECR4Oc7xxxxxx"}

it's same as

authParams:
  token: eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJsbG0tcGxhdGZvcm0tdG9rZW4ifQ.g4cejYFJtfUlPHbeOdmNRjMlNWImhvLkcF-YR71YpPjiXihqCTOM4vghlRIDYECR4Oc7xxxxxx

So instead you should write, that's what milvus is expecting

authParams: '{"token":"eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJsbG0tcGxhdGZvcm0tdG9rZW4ifQ.g4cejYFJtfUlPHbeOdmNRjMlNWImhvLkcF-YR71YpPjiXihqCTOM4vghlRIDYECR4Oc7xxxxxx"}'

You can verify the result in any online formatter, like https://jsonformatter.org/yaml-to-json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants