Skip to content

Access keys created with "No Expiration" produce a token that expires after 1 hour #1124

Closed

Description

@tiwillia

Selecting "No expiration" when creating an access key via the UI produces a token that expires after 1 hour.

The root cause appears to be that the Kubernetes TokenRequest API defaults to 1h expiration when ExpirationSeconds is omitted from the TokenRequestSpec. It seems the ServiceAccountToken would have to be used instead as the TokenRequest API inherently (and purposefully) does not allow tokens that aren't time-bound.

Activity

  1. Gkrumbach07 commented on Apr 2, 2026

    @Gkrumbach07
    Contributor

    AI triage: Created session triage-gh-1124-token-expiration to investigate and fix this issue.

  2. Gkrumbach07 commented on Apr 7, 2026

    @Gkrumbach07
    Contributor

    This might be fixed (i.e. we removed no expire option). The issue is the no expire option does not actually set it correctly for no expire, if that is even possible. we should verify and fix if not there. dont create a PR if no action is needed, just close this

  3. added
    ambient-code:auto-fix
    on Apr 7, 2026
  4. ambient-code commented on Apr 7, 2026

    @ambient-code
    Contributor

    This was already fixed in #1141 (commit f50505a). The "No Expiration" option has been removed from the UI, and the backend now requires expirationSeconds to be a positive value capped at 1 year (31536000s). Kubernetes TokenRequest does not support non-expiring tokens, so this is the correct behavior.

    Closing as resolved per maintainer request.

  5. github-actions commented on Apr 7, 2026

    @github-actions
    Contributor

    Session session-8dc0b970-0a95-4116-ba74-0176b0449ad2 created (phase: Running). PR will have the ambient-code:managed label.

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

    ambient-code:auto-fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions