Skip to content

ExternalAuth Policy with oauth2-proxy returns 401 + Location header instead of HTTP 302 redirect when authSigninURI is configured #10504

Description

@Sumit31

Version

5.5.1

What Kubernetes platforms are you running on?

AKS Azure

Steps to reproduce

We are testing ExternalAuth Policy with oauth2-proxy as the authentication service.

Authentication succeeds and protected applications are accessible after login.

However, unauthenticated requests to a protected route receive an HTTP 401 response containing a Location header instead of an HTTP 302 redirect.

As a result, browsers display an intermediate "Found" page before redirecting users to the identity provider.

According to the ExternalAuth Policy documentation, when the auth service returns 401 and authSigninURI is configured, the client should be redirected into the OAuth flow.

Observed behavior appears different from that expectation.

Metadata

Metadata

Assignees

Labels

bugAn issue reporting a potential bugcommunityIssues or PRs opened by an external contributor

Type

No type

Projects

Status
In Review 👀

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions