Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Bearer auth accepts tokens with no expiry, and a test pins that acceptance — typescript-sdk rejects the same case; which behaviour does the spec intend? #3955

Backlog

Description

@reservoir-cmyk

Hi — a cross-SDK consistency observation from a survey of deprecation/expiry-related test coverage. This is a question about intended behaviour, not a vulnerability report: I have not established what the specification requires here.

In this SDK, the server-side bearer auth middleware passes tokens whose expires_at is None, and the test test_token_without_expiry pins that acceptance as the expected behaviour.

In the sibling typescript-sdk, both generations explicitly reject tokens with no expiration time ("Token has no expiration time") and have tests for the rejection.

So under the same conditions, the two SDKs have opposite expectations fixed in their test suites. One of them presumably diverges from the intended reading of the spec — or the difference is deliberate (for example, expiry enforcement being the resource server's / provider's responsibility in one design).

Could you clarify which behaviour is intended? If rejection is intended, the fix on this side would be small and I can help with the test updates; if acceptance is intended, it may be worth aligning the typescript-sdk side or documenting the asymmetry.

— Tomoki Murota, CISSP

Activity

  1. techaurah commented on Dec 1, 2026

    @techaurah

    I would like to take this on, starting with the behaviour question. The core issue is the divergence: this SDK accepts a bearer token with no exp and a test pins that acceptance, while the typescript-sdk rejects the same token, so the two SDKs disagree on the same credential. My plan is to reproduce the case in both SDKs first, then apply whichever direction you confirm as intended, either rejecting expiry-less tokens here and updating the pinning test, or documenting the asymmetry. Could you confirm which behaviour the spec intends and assign the issue to me? I will not open a PR until that is settled.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions