Skip to content

feat(auth): reject invalid optional tokens #607

Closed

Description

@uniqueg

Problem

On operations with optional authentication, a request with an invalid or expired token is treated as anonymous. The client isn't told that its token failed and sees a public view that looks like missing data. cloud-registry works around this with its own check_read_token; trs-filer needs the same.

Proposal

An option under security.auth that answers 401 with the RFC 6750 challenge when a token is present but invalid, also on optional-auth operations. Requests without a token stay anonymous. Decide in the PR whether the default changes; if so, it has to land by 1.0.0-rc1 and goes into the migration guide.

Acceptance criteria

  • Tests: no token, valid, expired, wrong audience and untrusted issuer, each with the option on and off; 100% coverage.
  • Docs: authentication page; migration guide if the default changes.

Activity

  1. added this to the v0.21.0 milestone on Nov 3, 2026
  2. added
    priority: high
    status: triage
    type: feature
    workload: hours
    status: in progress
    and removed
    status: triage
    on Nov 3, 2026
  3. removed
    status: in progress
    on Nov 4, 2026
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

    priority: hightype: featureworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions