Resolve RPC auth follow-up comments#2
Conversation
- Add initialization log in `src/core/jsonrpc.rs`. - Tighten `rpc_auth_middleware` method+path allowlist in `src/core/auth.rs`. - Update module-level documentation in `src/core/auth.rs` for accuracy. - Add retry mechanism to `getCoreRpcToken` in `coreRpcClient.ts`. - Fix thread-unsafe `std::env::set_var` in E2E tests with `unsafe` blocks and serialization. - Add explanatory comments for manual auth header construction. - Improve `init_rpc_token` idempotency and error handling. Co-authored-by: YellowSnnowmann <167776381+YellowSnnowmann@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Resolved the remaining follow-up comments from the PR review:
rpc_auth_middlewareto use an explicit (method, path) allowlist, ensuring onlyGETrequests to public paths andOPTIONSrequests are bypassed.src/core/auth.rsto accurately reflect how the Tauri shell and frontend handle the RPC token.coreRpcClient.tswhen fetching the token via thecore_rpc_tokenTauri command.std::env::set_varinto one-time initialization closures, wrapping them inunsafeblocks, and ensuring they are serialized by existing environment locks.init_rpc_token.All tests in
json_rpc_e2eand core auth unit tests passed.PR created automatically by Jules for task 15793745111021328236 started by @YellowSnnowmann