You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Saving an API key from Settings fails: secret grant denied without a WebChat origin #8596
In a product build, saving an API key from Settings fails with Failed to encrypt api_key, and the user is never asked to approve it.
To reproduce, run openhuman-core serve with the file keyring and call config_update_model_settings with an api_key, without the test keyring responder. The call fails in about a second. The gate logs forced approval denied: no routable WebChat origin on this task tool=native_secret_grant origin=Unknown.
Why it fails:
Sealing a secret needs a one-time native_secret_grant (modules/security/secret_cipher.rs).
ApprovalGate::intercept_forced denies any forced approval that isn't from a WebChat turn with a thread and client id. A Settings RPC has neither.
The grant never parks, so nothing reaches the UI. The RPC returns only the outer error context.
The unit and integration tests miss this because they run a test responder that answers the approval.
Saving an API key from Settings fails with Failed to encrypt api_key because ApprovalGate::intercept_forced denies the one-time native_secret_grant when the request has no routable WebChat origin. A Settings RPC never has a WebChat thread/client id, so the grant never parks, nothing reaches the UI for approval, and the RPC returns only the outer error — tests miss it due to a test responder that auto-approves.
Reopening: this was closed automatically when #8607 merged, because #8607's checklist line said "This doesn't fix #8596" and GitHub reads "fix #8596" as a closing keyword even after "doesn't". #8607 only made the skipped browser test cite this issue. The bug is still open; #8597 is the fix in review.
Activity
tinysweeper commentedon Nov 7, 2026
Saving an API key from Settings fails with
Failed to encrypt api_keybecauseApprovalGate::intercept_forceddenies the one-timenative_secret_grantwhen the request has no routable WebChat origin. A Settings RPC never has a WebChat thread/client id, so the grant never parks, nothing reaches the UI for approval, and the RPC returns only the outer error — tests miss it due to a test responder that auto-approves.Labelled
priority: p1.M3gA-Mind commentedon Nov 9, 2026
Reopening: this was closed automatically when #8607 merged, because #8607's checklist line said "This doesn't fix #8596" and GitHub reads "fix #8596" as a closing keyword even after "doesn't". #8607 only made the skipped browser test cite this issue. The bug is still open; #8597 is the fix in review.