Skip to content

OAuth access token is not refreshed during long-running commands #258

Description

@nicolastakashi

OAuth access tokens are valid for 15 minutes. The CLI resolves the token once at
startup and reuses it for the rest of the command, so any command that runs longer
than the token's remaining validity fails partway through:

authentication failed; check your auth token (status: 401)

Most visible on large exports (dash0 logs query --from now-7d), but also affects
bulk dash0 apply -f and list over many assets. Output is left incomplete.

Separately, --profile <name> / DASH0_PROFILE never refreshes the token at all —
it uses whatever is stored on disk, so it fails as soon as that token is more than
15 minutes old.

Static auth_* tokens are unaffected and work as a workaround:
DASH0_AUTH_TOKEN=auth_… dash0 logs query --from now-7d

Reported by a customer.

Expected: the token is refreshed as needed for the whole duration of a command.

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