Skip to content

docs: document the Windows limits of the OAuth token cache - #439

Merged
emilyoram merged 3 commits into
mainfrom
claude/436-document-windows-token-cache
Nov 20, 2026
Merged

emilyoram merged 3 commits into
mainfrom
claude/436-document-windows-token-cache

Conversation

@claude

@claude claude Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Before: The README did not say that the OAuth token disk cache is only restricted by POSIX permission modes, and that those do not become access-control lists on Windows. A Windows user who pointed CAMUNDA_TOKEN_CACHE_DIR at a shared location had no way to know the cached token was readable by anyone with access to that directory.

After: A new "OAuth Token Cache" README section states that the cache is off unless CAMUNDA_TOKEN_CACHE_DIR is set, that the files are owner-only on POSIX, that on Windows the SDK sets no ACL so protection comes from the location, and what to do about it: use a per-user directory such as one under %LOCALAPPDATA%, never a shared location, or disable the disk cache.

How: Documentation only; no code, generated or config-reference changes. This records the decision on #436 to document the limitation and rely on a per-user location rather than add a Windows-specific ACL call or dependency. One correction to the premise: in this SDK the cache has no default location (it is opt-in), so the guidance is "choose a per-user location" rather than "rely on the default"; adding a default would be a behaviour change and is left out. The issue stays open for a decision on code-level ACL support.

Refs #436


Generated by Claude Code

POSIX modes do not become ACLs on Windows, so the cache is only as private as the directory it lives in. State that, and recommend a per-user location under %LOCALAPPDATA%; the cache is off unless CAMUNDA_TOKEN_CACHE_DIR is set.

Refs #436

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RcVhnekJQeXnMfPhs9pYda
@claude
claude Bot requested a review from a team as a code owner November 13, 2026 07:52
Copilot AI balanced review requested due to automatic review settings November 13, 2026 07:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The README overstates token-file protection because files can be readable by other users before the best-effort chmod or remain readable if it fails.

1 open issue
What changed in this PR

Documents OAuth token disk-cache security guidance for SDK users, addressing the Windows limitation raised in #436 without changing runtime behavior.

Changes:

  • Clarifies that disk caching is opt-in and has no default location.
  • Explains platform permission behavior and recommends a private per-user location on Windows.
  • Describes how to disable disk caching when a suitable location is unavailable.
File Description
README.md Adds an OAuth Token Cache section covering permissions, location selection, and disabling the cache.

Review effort: Balanced

Comment thread README.md Resolved
…best effort

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RcVhnekJQeXnMfPhs9pYda

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The README incorrectly describes token-request cost as once per process start rather than on each new OAuth provider’s first use when disk caching is disabled.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Low severity Clarify token requests occur once per provider, not per process

README.md:982

The token-request cost is per OAuth provider, not per process start. Each CamundaClient/CamundaAsyncClient creates its own provider by default, and both providers keep their in-memory token on the instance (runtime/auth.py). With disk caching disabled, two clients in the same process therefore make two initial token requests; repeatedly creating clients adds more. Please describe the cost as a token request on each new provider's first use rather than one per process start.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for this documentation-only update clarifying OAuth token disk-cache security limitations and safe configuration.

No open issues 🎉

Review effort: Balanced

@emilyoram
emilyoram merged commit 14daa5f into main Nov 20, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants