You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grpcurl -H "aa:bb" -d '{"greeting":"KONG"}' -insecure grpcbin-test.dev.com:443 hello.HelloService.SayHello
Error invoking method "hello.HelloService.SayHello": rpc error: code = Unauthenticated desc = failed to query for service descriptor "hello.HelloService": unexpected HTTP status code received from server: 401 (Unauthorized); malformed header: missing HTTP content-type
grpcurl -H "apikey: consumer-2-password" -d '{"greeting":"KONG"}' -insecure grpcbin-test.dev.com:443 hello.HelloService.SayHello
{
"reply": "hello KONG"
}
The effect I want to get is that if I access hello.HelloService.SayHello with header aa:bb then no authentication is required, otherwise authentication is required.
But after testing, But after testing, I found that even with header aa:bb, it returns 401.
I have read gateway-api.sigs.k8s.io about matches, But my test results don't feel very common sense.
So I would like to ask what is the route matching rule here and what should I do if I want to achieve the above?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Kong was deployed through
kubernetes-ingress-controller
, and thegrpcbin
service was deployed. I did the following operationsgrpcbin
, namelygrpcbin-auth
andgrpcbin-noauth
konghq.com/protocol: grpcs
to these two k8s servicesgrpcbin-auth
k8s service.Finally, the yaml of the
grpcbin-auth
service is as follows.The effect I want to get is that if I access
hello.HelloService.SayHello
with headeraa:bb
then no authentication is required, otherwise authentication is required.But after testing, But after testing, I found that even with header aa:bb, it returns 401.
I have read gateway-api.sigs.k8s.io about matches, But my test results don't feel very common sense.
So I would like to ask what is the route matching rule here and what should I do if I want to achieve the above?
Thanks to the kong community.
Beta Was this translation helpful? Give feedback.
All reactions