zilliztech / milvus-helm

Apache License 2.0
58 stars 43 forks source link

Why did externalPulsar authParmas make this mistake? #102

Closed 1191510903 closed 4 months ago

1191510903 commented 4 months ago

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 commented 4 months ago

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