Skip to content

OIDC: discovery metadata and handler maps are accessed without full locking #284

Backlog

Description

@jrosskopf

Found while fixing #273 (PR #283). OIDCAuthHandler::cached_metadata_ is read and written without a lock, and the oidc_handlers maps of the REST and MCP handlers are only partly protected, so concurrent first requests (before discovery is cached) race. Fix direction: guard the metadata with a mutex or a once-flag for the first fetch, protect the handler maps consistently, and add a concurrent-first-request test. Related: #281 (unbounded JWKS refetch on an unknown kid).

Activity

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