Repository navigation
fix(connection): report each connection's access from the key's rules on One (v2.4.0) - #205
Closed
krish221997 wants to merge 1 commit into
Closed
krish221997 wants to merge 1 commit into
krish221997 wants to merge 1 commit into
Conversation
… on One (v2.4.0) `one list` read access only from local config, so every connection showed `full` even when the key's dashboard rules restricted it. It now reads the calling key's enforced rules live from `GET /v1/access/self` and matches them the way One enforces them, narrowed by any local `one config` restriction. When the rules can't be read, access is reported as `unknown`, never `full`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
one listbuilt each connection'saccessonly from localone configsettings. The per-app access set on the consent page or dashboard lives on One, so every connection showed{"policy":"full"}even when the key was read-only or limited to specific actions. Agents then planned writes that failed with 403.Fix
one listreads the calling key's enforced rules live on every call fromGET /v1/access/self(withoneai/pica-v2#903), so dashboard edits show up immediately.EventAccessConnection::is_allowed): no rules means globalmethodsonly; with rules, a connection no rule names reaches nothing; a rule'smethodsoverride the global ones;actionIdsnarrow to those actions; methods are judged by the action's CRUD verb (envelopeMethod), so a POST-sent read counts as GET. A method list covering every CRUD verb (the dashboard's "Full access") reads asfull.one configsettings still apply, only ever narrowing./v1/access/self, network error, malformed body), every connection reports the new{"policy":"unknown"}with anaccessErrorexplaining why. It never falls back tofull.skills/one/SKILL.md,one guide, andone list --help. Version bumped to 2.4.0 (minor), sincepolicy: "unknown"andaccessErrorare new output.Verified
Against production, with the access response for a real key that has read/write Google Calendar, read-only Gmail and one Stripe action:
Notes
one listreportsunknown(with the reason) rather thanfull.resolveConfigtests insrc/lib/config.test.tsfail locally on unmodifiedmaintoo. They're unrelated to this change.🤖 Generated with Claude Code