Skip to content

OIDC: Redirect loop of OIDC Authentication due to the cookie length limit #7315

Closed

Description

@sadovnikov

Description:

In the OIDC Authentication workflow, the access token is returned to Envoy Proxy through the callback URL. The response instructs the browser to store the tokens in cookies, which are used in subsequent requests.
However, if the length of the token exceeds 4096 characters, the browser does not set the cookie and the authentication workflow restarts, resulting in a loop and the "too many redirects" error. Envoy logs no errors. IDP logs multiple successful logins within a few seconds.

Envoy Proxy should check the length of the tokens. Tokens can be compressed or can be split among multiple cookies.

Repro steps:

Configure the application or user in IDP to return a long token, for example, by adding groups.

Environment:

Envoy Gateway 1.5.2, Kubernetes v1.33.4

Activity

  1. added
    kind/bug
    and removed on Oct 24, 2025
  2. self-assigned this
    on Oct 24, 2025
  3. changed the title [-]Redirect loop of OIDC Authentication due to the cookie length limit[/-] [+]OIDC: Redirect loop of OIDC Authentication due to the cookie length limit[/+] on Oct 28, 2025
  4. github-actions commented on Nov 27, 2025

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

  5. sadovnikov commented on Nov 27, 2025

    @sadovnikov
    ContributorAuthor

    Hi @zhaohuabing, could you please re-activate this issue? It's still actual

  6. github-actions commented on Dec 27, 2025

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

  7. Aditya7880900936 commented on Jan 20, 2026

    @Aditya7880900936
    Contributor

    Hi @zhaohuabing ,
    I would like to work on this issue ,
    Please assign it to me if it is still available,
    Regards.

  8. zhaohuabing commented on Jan 21, 2026

    @zhaohuabing
    Member

    Hi @Aditya7880900936 this needs to be handled in Envoy upstream.

  9. github-actions commented on Feb 20, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

  10. 17 remaining items

  11. github-actions commented on Aug 14, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

  12. jemag commented on Aug 14, 2026

    @jemag

    /not-stale

  13. github-actions commented on Sep 14, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

  14. github-actions commented on Oct 14, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

  15. jemag commented on Oct 14, 2026

    @jemag

    /not-stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions