Skip to content

Implement async OAuth token handling #3

Description

@woksin

User need

A Python client must authenticate to an authentication-enabled Chronicle kernel without making callers manage bearer-token refresh for each call.

Desired behavior

Provide an async token provider for Chronicle's OAuth client-credentials endpoint and an internal gRPC metadata path that obtains the current token for each new call.

Acceptance evidence

  • Sends application/x-www-form-urlencoded fields grant_type=client_credentials, client_id, and client_secret to /connect/token.
  • Parses access_token and handles an absent expires_in conservatively.
  • Caches and refreshes tokens before expiry without duplicate concurrent refreshes.
  • Adds authorization: Bearer <token> to each new gRPC call.
  • Never logs or includes secrets or tokens in exceptions and representations.
  • Separates development self-signed-certificate handling from production certificate validation.
  • Tests cover success, malformed responses, authorization failure, expiry, refresh, cancellation, and concurrent callers.

Non-goals

  • Defining deployment-specific scopes, audiences, authorities, or credentials.
  • Disabling production certificate or hostname validation by default.

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

    authenticationAuthentication and token lifecycleblockedWaiting on a named dependency or gatekind/featureNew client capability

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions