apisix icon indicating copy to clipboard operation
apisix copied to clipboard

request help: 请问当创建了一个grpc的路由,auth-key这种插件还可以用吗,apisix支持http2的头的读写吗

Open StretchV opened this issue 5 years ago • 15 comments

StretchV avatar Jul 18 '21 02:07 StretchV

@StretchV Sure, HTTP/2 was supported by APISIX.

tokers avatar Jul 18 '21 12:07 tokers

@tokers proxy-mirror这个插件我加到代理grpc的路由上,但是我没有在收集端获取到镜像流量,但是普通的路由是可以收集到的,请问proxy-mirror这个插件不支持grpc路由的镜像拷贝吗

StretchV avatar Jul 19 '21 02:07 StretchV

如果在grpc路由开启auth-key插件,客户端发送的时候是往metadata中加信息就可以了吗

StretchV avatar Jul 19 '21 02:07 StretchV

@tokers proxy-mirror这个插件我加到代理grpc的路由上,但是我没有在收集端获取到镜像流量,但是普通的路由是可以收集到的,请问proxy-mirror这个插件不支持grpc路由的镜像拷贝吗

Sorry for my carelessness, proxy-mirror currently cannot be used in route which upstream scheme is grpc.

tokers avatar Jul 19 '21 11:07 tokers

metadata

如果在grpc路由开启auth-key插件,客户端发送的时候是往metadata中加信息就可以了吗

Not sure which gRPC SDK you are using, for grpc-go, you can use SetHeader.

tokers avatar Jul 19 '21 11:07 tokers

@tokers 请问,这个函数貌似只能服务端调用吧,客户端调用的话会报 failed to fetch the stream from the context context.Background

StretchV avatar Jul 19 '21 14:07 StretchV

另外请问grpc的流量镜像目前apisix有实现的方法插件吗,如果没有的话之后是否会考虑制作呢

StretchV avatar Jul 19 '21 14:07 StretchV

@tokers 请问,这个函数貌似只能服务端调用吧,客户端调用的话会报 failed to fetch the stream from the context context.Background

There are some other similar methods, you may try to check out the corresponding documents.

tokers avatar Jul 20 '21 00:07 tokers

@StretchV By the way, please use English in public channels.

tokers avatar Jul 20 '21 00:07 tokers

Excuse me,is there a plug-in for apisix to implement the traffic image of grpc? If not, will it be considered later?

StretchV avatar Jul 20 '21 03:07 StretchV

Excuse me,is there a plug-in for apisix to implement the traffic image of grpc? If not, will it be considered later?

please submit another issue, example of title: feature: support for grpc traffic mirroring

tzssangglass avatar Jul 20 '21 09:07 tzssangglass

Excuse me,is there a plug-in for apisix to implement the traffic image of grpc? If not, will it be considered later?

please submit another issue, example of title: feature: support for grpc traffic mirroring

ok

StretchV avatar Jul 20 '21 09:07 StretchV

@StretchV By the way, please use English in public channels.

I try to use the 'metadata.AppendToOutgoingContext' method on the client side,eg: "metadata.AppendToOutgoingContext(ctx,"apikey","auth-one")" and I can get the value in metadata through the metadata.FromIncomingContext method on the server side. However, after the "auth-key" plug-in is opened on this grpc route, I will still report a 401 error.I want to know how to do authentication through gateway on grpc route

StretchV avatar Jul 20 '21 10:07 StretchV

metadata

如果在grpc路由开启auth-key插件,客户端发送的时候是往metadata中加信息就可以了吗

Not sure which gRPC SDK you are using, for grpc-go, you can use SetHeader.

I have never figured out how to use this method on the client side

StretchV avatar Jul 20 '21 10:07 StretchV

哦,问题解决了,是因为我的消费者是在apisix-dashboad中创建的,但是不知道为什么看着是有数据的但是没有生效,我通过adminapi重新生成了一个消费者后来重试就可以了,

StretchV avatar Jul 20 '21 11:07 StretchV