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

Core API: RequestHeaderModifier #480

Closed
Tracked by #608
kate-osborn opened this issue Mar 17, 2023 · 0 comments · Fixed by #717
Closed
Tracked by #608

Core API: RequestHeaderModifier #480

kate-osborn opened this issue Mar 17, 2023 · 0 comments · Fixed by #717
Assignees
Labels
area/httproute/core Relates to all Core features of HTTPRoute enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented.
Milestone

Comments

@kate-osborn
Copy link
Contributor

kate-osborn commented Mar 17, 2023

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

@kate-osborn kate-osborn added proposal enhancement New feature or request area/httproute/core Relates to all Core features of HTTPRoute and removed proposal labels Mar 17, 2023
@kate-osborn kate-osborn added this to the v1.0.0 milestone Mar 21, 2023
@kate-osborn kate-osborn added the refined Requirements are refined and the issue is ready to be implemented. label Mar 24, 2023
@mpstefan mpstefan modified the milestones: v1.0.0, v0.5.0 May 17, 2023
@ciarams87 ciarams87 self-assigned this May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/httproute/core Relates to all Core features of HTTPRoute enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants