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

can't propogate header across grpc protocol in wasm plugin #977

Closed
1 task done
JhouXerox opened this issue May 20, 2024 · 0 comments
Closed
1 task done

can't propogate header across grpc protocol in wasm plugin #977

JhouXerox opened this issue May 20, 2024 · 0 comments

Comments

@JhouXerox
Copy link

If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

can't add/replace header across grpc protocol in wasm plugin.

grpc代理的流量无法新增/覆盖header,无法传播新增的头

Ⅱ. Describe what happened

I need to replace or add some header in wasm plugin, currently I use golang to build wasm plugin,in plugin I try to add some header like 'x-custom-user-id' , 'x-custom-permission' ...
but in my grpc service side, when request come in, I can't see any new header added in wasm on my request metadata

我需要再wasm插件中覆盖或新增一些头,当前我使用golang语言来构建wasm插件,在插件中我尝试添加一些自定义的头,例如'x-custom-user-id', 'x-custom-permission'. 这些头我增加来是为了后续的金丝雀能力
但是在我的grpc服务端侧,当请求进来的时候,我在metadata中看不到我在插件中新增的头.

Ⅲ. Describe what you expected to happen

headers added or replaced in my wasm plugin should as metadata to grpc request, and recognize by canary policy.
插件中新增的头应该能够作为metadata继续传播下去,并且可以被金丝雀策略识别

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. make sure there's an grpc route 确保有一个grpc的路由策略
  2. make a golang wasm plugin, and try add a head in onRequestHeader 搞一个go的wasm插件,在插件里onRequestHeader添加一个头
  3. see if there has the new head in matadata on grpc server side. 看grpc服务端有没有插件中新加的头

Ⅴ. Anything else we need to know?

image
image
image

Ⅵ. Environment:

  • Higress version: 1.3.5
  • OS : k8s
  • Others:
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

1 participant