Skip to content

Core API: RequestHeaderModifier #480

Closed
@kate-osborn

Description

@kate-osborn

User stories

  • As an App Dev I will want to manipulate headers at ingress. Either to add correlation IDs, provenance data, strip unnecessary headers, or yet another use case not foreseen or delineated here.

Background

Header manipulation is supported through the HTTPRouteFilterType == RequestHeaderModifier. The RequestHeaderModifier is declared as Core support for HTTPRouteRule objects, and Extended for HTTPBackendRef objects.
This story requires Core API support, i.e., HTTPBackendRef IS NOT required to complete this task.

See https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1beta1.HTTPHeaderFilter for further clarification.

Functional requirements

Normal functioning:

  • Support set semantics:
    • Add if not exists
    • Overwrite if exists
  • Support add semantics:
    • Add if not exists
    • Append value if exists
  • Support remove semantics:
    • Nothing if not exists
    • Remove if exists

Edge cases

  • Ensure that the NKG runs the webhook validaton code and reject HTTPRoutes with invalid values (see the Webhook validation cases below).
  • Ensure that NGK further validates the value and reject any values that might cause NGINX to fail to reload or any malicious value.

Webhook validation cases:

Acceptance criteria:

Aha! Link: https://nginx.aha.io/features/NKG-64

Metadata

Metadata

Assignees

Labels

area/httproute/coreRelates to all Core features of HTTPRouteenhancementNew feature or requestrefinedRequirements are refined and the issue is ready to be implemented.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions