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

ext_proc does not honour HeaderAppendAction #36982

Open
davidjumani opened this issue Nov 4, 2024 · 3 comments
Open

ext_proc does not honour HeaderAppendAction #36982

davidjumani opened this issue Nov 4, 2024 · 3 comments

Comments

@davidjumani
Copy link

Title: ext_proc does not honour HeaderAppendAction

Description:

What issue is being seen? Describe what should be happening instead of

When running envoy with the ext_proc filter and pointing to a server that returns header mutation, envoy does not honour the AppendAction field but only the deprecated Append field as mentioned in the HeaderValueOption docs.
Despite setting AppendAction to any supported value, envoy only overwrites the existing header or appends to it if append is true.

This is because the relevant code change is yet to be made in ext_proc despite the updated API
Link to the code that only checks the value of append

ext_proc server snippet :

func returnResponse(key string, value string, appendAction HeaderValueOption_HeaderAppendAction) *service_ext_proc_v3.HeadersResponse {
	return &service_ext_proc_v3.HeadersResponse{
		Response: &service_ext_proc_v3.CommonResponse{
			HeaderMutation:  &service_ext_proc_v3.HeaderMutation{
				SetHeaders: []*core_v3.HeaderValueOption{
					{
						Header: &core_v3.HeaderValue{
							Key: key, 
							RawValue: []byte(value)
						},
						AppendAction: appendAction,	
	                                        // Append: &wrapperspb.BoolValue{Value: true},
					},
				},	
			},
		},
	}
}
@KBaichoo
Copy link
Contributor

KBaichoo commented Nov 5, 2024

cc @tyxia @yanjunxiang-google

@jewertow
Copy link
Contributor

jewertow commented Nov 7, 2024

I fixed the same issue in ext_authz some time ago, so I could take it if no one is working on it yet.

@tyxia
Copy link
Member

tyxia commented Nov 7, 2024

@jewertow sure please go ahead thanks

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

No branches or pull requests

4 participants