Skip to content

Support header-based rule matching in APIRule v2 #2412

@kubicar

Description

@kubicar

Description

Currently, APIRule v2 allows rule matching based on path and HTTP methods. This feature request proposes adding support for defining rule matches based on HTTP headers as well. This enables advanced routing, more granular API management, and alignment with Istio’s capabilities for header-based routing via its VirtualService CR.

Customer Value:

  • Enhanced flexibility in traffic routing and policy definition.
  • Supports scenarios where API consumers require certain headers for routing/authentication.
  • Aligns Kyma API Gateway with enterprise API gateway feature sets.
  • Ensures seamless integration with Istio-based patterns and future compatibility.

TODOs

  • Extend APIRule v2 API to allow header-based match specifications.
  • Update validation logic for APIRule v2 to support header matching.
  • Propagate new match config to generated Istio VirtualService CRs.
  • Update documentation for APIRule v2.
  • Add tests: unit, integration and e2e scenarios.

Acceptance Criteria

  • Users can specify HTTP headers as matchers in APIRule v2 CRs.
  • Generated VirtualService CRs reflect header-based matching correctly.
  • Changes are backwards compatible - existing APIRule v2 CRs work as before.
  • Documentation covers usage and limitations of header matching.

References

Related PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions