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

Bug: extAuth.headersToExtAuth does not forward headers #4975

Open
TobiasGleiter opened this issue Dec 25, 2024 · 3 comments
Open

Bug: extAuth.headersToExtAuth does not forward headers #4975

TobiasGleiter opened this issue Dec 25, 2024 · 3 comments
Labels

Comments

@TobiasGleiter
Copy link

TobiasGleiter commented Dec 25, 2024

Description:

Envoy should forward headers to the ext auth service but the headers e.g. Cookies are not returned.

Environment:
Using:
extAuth.http

SecurityPolicy Version:
gateway.envoyproxy.io/v1alpha1

Images:
image: envoyproxy/gateway:v1.2.3
image: docker.io/envoyproxy/gateway:v1.2.3
image: envoyproxy/envoy:distroless-v1.32.1
image: envoyproxy/gateway:v1.2.3
image: docker.io/envoyproxy/envoy:distroless-v1.32.1
image: docker.io/envoyproxy/gateway:v1.2.3

@zhaohuabing
Copy link
Member

zhaohuabing commented Dec 30, 2024

@TobiasGleiter Did you configure the headersToExtAuth field in the SecurityPolicy? By default, only the following headers will be included in the check request to an HTTP authorization server: Host, Method, Path, Content-Length, and Authorization.

See: https://gateway.envoyproxy.io/docs/api/extension_types/#extauth

@TobiasGleiter
Copy link
Author

@zhaohuabing Yes, I did. See attached:

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
...
spec:
  extAuth:
    http:
      backendRefs:
        - name: kern-authorization
          namespace: kern
          port: 9002
    headersToExtAuth:
      - "Cookie"
      - "Authorization"

The default header authorization works well. Am I missing something?

@arkodg
Copy link
Contributor

arkodg commented Jan 3, 2025

@TobiasGleiter you may need to explictly also configure the http subsection
https://gateway.envoyproxy.io/docs/api/extension_types/#httpextauthservice

http:
   headersToBackend:
   - "Cookie"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants