Skip to content

Mutual authentication between gateway and backend #4322

@jimmyjones2

Description

@jimmyjones2

What would you like to be added:

In some modes, such as client certificate validation by the gateway (GEP-91), or Gateway/HTTPRoute level authentication (GEP-1494), the backend service would benefit from a cryptographic method of validating the assertions made by the gateway through trusted headers - for example the identity of the authenticated user.

This method could be a projected Kubernetes service account sent by the gateway in an additional HTTP header, or using a mTLS certificate (added manually, or more simply using the upcoming pod certificates upstream feature which could be sent automatically for backends that advertise support).

Why this is needed:

Currently backend services have to be carefully protected by layer 3 NetworkPolicy to ensure only the gateway can initiate connections to the backend and assert the trusted headers. If another pod is able to send traffic to the backend pod, due to a misconfigured or missing NetworkPolicy, it can assert the trusted headers and potentially result in some kind of compromise (e.g. if it can freely assert the identity of any user). For example, allow-same-namespace NetworkPolicy is commonly used in OpenShift, which would allow pods in the same namespace to call the backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions