Repository navigation
fix(kernel): require verified caller identity for the Secret Service bridge - #598
Antriksh1984 wants to merge 1 commit into
Conversation
…bridge SecretServiceBridge proxies the password vault - plaintext credentials, TOTP recovery codes, and sharing grants - to any process that can open a connection to the kernel IPC server, not only the plugins the host itself loaded. Unlike the bridges already fixed under BossConsole#53, none of its nine RPCs checked who was calling before this. Gate every RPC behind authenticatedCallerOrRefuse(), the same PERMISSION_DENIED-on-no-identity pattern PluginUIServiceBridge established, and add a real gRPC-server test proving an unauthenticated caller is refused and never reaches the vault provider, while an authenticated one can still read, create, share, unshare and delete secrets normally.
|
@Antriksh1984 Thank you for the Secret Service caller-identity fix. I compared the actual production and test diffs with your earlier #505 at #505 already covers all nine RPCs in #598: list, list-with-sharing, search, create, update, delete, get shares, share and unshare. Each gate uses the same interceptor-verified identity and refuses before provider access. #505 also preserves mutation attribution and RBAC gates, with explicit anonymous refusal tests for every vault method plus revoked-token and late-registration coverage. The additional positive workflow assertions in #598 exercise unchanged provider mapping; there is no additional production fix to port. Both heads have green CI; #505's prior focused tests and quality checks are recorded in its review thread. Closing #598 as fully superseded by #505, keeping the older and more complete implementation. The surviving description explicitly credits you, Antriksh (@Antriksh1984), for both submissions and distinguishes previous reviewer repairs. #505 remains open against dev; neither PR is being merged or auto-merged. #550's Supabase/download guards and #575's transport/ownership changes are distinct and are not included in this closure. |
Summary
SecretServiceBridgeproxies the password vault to out-of-process plugins over the kernel's gRPC IPC server -getUserSecrets/getUserSecretsWithSharingInforeturn plaintext passwords and TOTP recovery codes, andshareSecret/unshareSecretgrant or revoke another user's or role's access to a secret. Continuing the BossConsole#53 caller-identity work, none of this bridge's nine RPCs checked who was calling before this: any process able to open a connection to the kernel IPC server - not only the plugins the host itself loaded - could read or reshare every secret the signed-in user owns.GetUserSecrets,GetUserSecretsWithSharingInfo,SearchSecrets,CreateSecret,UpdateSecret,DeleteSecret,GetSecretShares,ShareSecret,UnshareSecret) behindauthenticatedCallerOrRefuse(), the samePERMISSION_DENIED-on-no-verified-identity patternPluginUIServiceBridgeestablished for Remote UI: StreamUI has no plugin identity check — one plugin can bind another's surface #53.ProcessIdentityInterceptor-verified identity is refused before it ever reachesSecretDataProvider, so a refusal can't leak timing/existence information either.Test plan
SecretServiceBridgeTestruns a real gRPC server behindProcessIdentityInterceptorwith a real client stub (no mocking of the transport): asserts every RPC is refused withPERMISSION_DENIEDfor an anonymous caller and that the fake vault provider is never invoked, and that an authenticated caller can still read, create, share, unshare and delete secrets normally../gradlew :composeApp:compileKotlinDesktop :composeApp:compileTestKotlinDesktop./gradlew :composeApp:desktopTest --tests "ai.rever.boss.kernel.services.SecretServiceBridgeTest"./gradlew :composeApp:ktlintDesktopTestSourceSetCheck./gradlew :composeApp:detektDesktopMain :composeApp:detektDesktopTest