feat(account): require native consent for proxy callers - #641
Open
ODevStudio wants to merge 4 commits into
Open
Conversation
Member
|
fyi: will need rebase due to #650 |
Rotate the skin token and browser origin for each served generation so stale pages cannot inherit another skin's consent. Remove timed-out consent dialogs by exact route and keep the port 3000 entry URL as a no-store redirect.
ODevStudio
force-pushed
the
odev/issue-300-account-proxy-consent
branch
from
August 21, 2026 08:19
1903cd5 to
24b76ef
Compare
ODevStudio
marked this pull request as ready for review
August 22, 2026 14:07
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.
Summary
What changed, and why?
linked Decent account through the shared proxy service.
SHA-256 path key, concurrent requests from one caller share a prompt, and a
30-second timeout fails closed without storing a denial.
and browser origin for every generation, and revoke the token on stop. Port
3000 remains a no-store entry redirect.
cannot dismiss one another.
403behavior, and add an account-consent smoke scenario.
Change Type (select all)
Scope (select all touched areas)
Linked Issues
Fixes #300
Root Cause (if bug fix)
N/A - this adds a missing native consent boundary around linked-account proxy
access.
Regression Test Plan (if bug fix or refactor)
N/A - security coverage spans account consent, REST proxy, plugin callers,
immutable custom-skin identity, token and origin rotation, CLI trust,
concurrent prompts, timeout, and storage failure.
Documentation Obligations (required)
assets/api/rest_v1.ymlorassets/api/websocket_v1.yml(if REST/WebSocket changed)doc/Api.md(if user-facing endpoint changed)doc/Plugins.md(if events/API changed)doc/Skins.md(if skin behavior changed)doc/Profiles.md(if profile handling changed)doc/DeviceManagement.md(if device flows changed)The Decent app verification skill also documents the consent smoke scenario.
Security Impact (required)
Yes; account-proxy requests can now return403before any upstream request.No.Nooutbound calls; the local skin server nowkeeps port 3000 as an entry redirect and serves each generation on a fresh
local port.
No.No; decisions use the existing credential store.Yes; linked-account access now requires atrusted native consent decision per caller.
and skin-server startup failure all fail closed. Skin tokens carry immutable
caller identities, old tokens and origins are retired, each timeout removes
its own route, and headless trust is explicit and process-only.
User-Visible Changes
pauses for a native allow/deny dialog.
403before Decaid sends credentials orcontacts the upstream service.
http://<host>:3000skin links continue to work through a no-storeredirect to the active per-generation origin.
Verification
Local gates (run before pushing)
dart format lib test- no remaining candidate changesflutter analyze- cleanflutter test- 3,239 passed, 1 skipped./scripts/fetch_dye2_plugin.sh- not rerun for this local draftManual verification (if applicable)
simulate=1):Yes.Samsung tablet over USB; no espresso hardware, not applicable.24b76ef7built and installed on the tablet. A temporary launch harness invoked the productionAccountConsentPrompter. The user confirmed the native dialog rendered on the tablet and personally selected Allow. The focused consent suite passed 5/5, covering Allow, Deny, timeout, concurrent route removal, and unavailable UI.Evidence
Detailed evidence:
dart format lib test, followed bydart format --output=none --set-exit-if-changedon all review-changed Dartfiles (12 checked, 0 changed)
QuickJS DLL on
PATH(84 passed)timeout regressions (52 passed)
flutter analyze(no issues)flutter testwith the package-matched QuickJS DLL onPATH(3,239passed, 1 skipped)
source built with installed CMake 3.28 and Visual Studio 2022.
commit built and installed; the production consent dialog was invoked through
a temporary local harness, and the user personally selected Allow.
flutter test test/account/account_consent_prompter_test.darton the reviewcommit: 5 passed.
Compatibility & Migration
No; unapproved account-proxy callers now receive403instead of silently using the linked account. Browser clients must alsofollow the port 3000 redirect to the active high-numbered skin port.
Yesfor headless deployments, which must pass--trust-consent=<caller-key>or--trust-all-consentfor that process.No; the existing credential store persistsaccount_proxy_consentdecisions.explicitly select the narrow caller trust flag where possible.
Risks & Mitigations
trust flags, and cover UI-unavailable and storage failures.
decisions per caller.
together, revoke on stop, and never reuse an origin within the process.
ShadDialogRoute.Contributor Responsibility
AI-assisted development is allowed. The submitter remains responsible for the submitted work.