Skip to content

fix(connectors): isolate DingTalk CLI credential storage - #2309

Open
jiazi009 wants to merge 3 commits into
TencentCloud:developfrom
jiazi009:orca/dingtalk-cli-auth-isolation
Open

jiazi009 wants to merge 3 commits into
TencentCloud:developfrom
jiazi009:orca/dingtalk-cli-auth-isolation

Conversation

@jiazi009

Copy link
Copy Markdown

Summary

DingTalk CLI stores its OAuth credentials separately from DWS_CONFIG_DIR. On a shared host, a connector instance could therefore inherit another instance's login.

Bind configuration and file-backed credentials to the server-owned instance ID, override DWS_KEYCHAIN_DIR, and use a fresh directory namespace to avoid legacy token fallback. Restrict cleanup to the instance's own directory. Optional custom client credentials and intentional connector sharing keep their existing behavior.

Existing instances need reauthorization after upgrading; old credentials are left untouched. Native Windows authorization reports an unsupported backend because dws's HKCU storage cannot be isolated by its directory settings. Instance deletion remains possible without touching shared registry credentials; Windows users can run Octop in a Linux container.

Target branch

  • Base is develop

Type of change

  • Bug fix
  • Breaking change (reauthorization; native Windows requires a Linux container)
  • Documentation

Test plan

  • make all PYTEST_JOBS=4 against the current upstream base: 5113 passed, 35 skipped; Ruff and mypy passed
  • cd dashboard && npm run build
  • Regression tests cover isolated paths, inherited environment, caller-selected and legacy colliding keys, ownership, editing, cleanup, and Windows authorization/deletion
  • Real Linux dws v1.0.65: 9 checks passed in a network-disabled, read-only container using synthetic encrypted tokens and loopback refresh/revoke endpoints; A/B identities remain separate and B refresh/logout leaves A and legacy storage unchanged
  • Manual verification: the reporter confirmed authorization isolation after applying the fix

The binary test uses no real accounts or messages. Real-provider refresh/revocation and native macOS/Windows binary acceptance are outside that test.

Visual evidence

Screenshot of a local validation report rendered from saved execution results (not a product UI screenshot):

Real Linux dws synthetic-token validation: 9 of 9 recorded checks passed

Checklist

  • Updated CHANGELOG.md
  • Connector documentation updated
  • Screenshot and regression tests provided

This branch has not been deployed

No deployments
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.

2 participants