How to add context_extensions for ext-auth grpc
I use the ext-auth grpc to auth + authz for my service. But it need to some custom data. How can I push that data into ext-auth via header or context_extensions
Example.
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
name: ext-auth-example
spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: myapp
extAuth:
grpc:
backendRef:
name: grpc-ext-auth
port: 9002
headersForAuth:
- x-user: abc
- x-product-id: 123
- x-provider: um
or
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
name: ext-auth-example
spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: myapp
extAuth:
grpc:
backendRef:
name: grpc-ext-auth
port: 9002
contextExtensions:
- x-user: abc
- x-product-id: 123
- x-provider: um
in the above example is x-user part of the request header ?
in the above example is
x-userpart of the request header ? @arkodg It is not part of the header. It's just a custom field that I want the envoy to send to the ext-auth as additional information.
This issue has been automatically marked as stale because it has not had activity in the last 30 days.
@quyenhoang96 this should be possible with earlyRequestHeaders https://gateway.envoyproxy.io/latest/tasks/traffic/http-request-headers/#early-header-modification dup of https://github.com/envoyproxy/gateway/issues/4267