Supports reading password from external sources#190
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds “secret resolving” support so connection passwords/credentials can be supplied via external sources (env vars, env files, files, or command output) and resolved before testing/connecting, with a small UI affordance explaining the supported formats.
Changes:
- Introduces a new Rust crate (
secret-resolve) that resolves secrets fromenv:,file:,exec:prefixes (or passes through plain text). - Resolves secrets in
ConnectionConfig(and SSH proxy auth) beforetest/connectin the Tauri backend. - Updates the password input UI to optionally show an inline help hover card describing supported secret formats, plus adds an i18n string.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src-web/ui/input.tsx | Adds optional password “secret resolve” help UI via HoverCard. |
| src-web/pages/connections/from.tsx | Enables the new password help UI for connection password fields. |
| src-web/i18n/translation.ts | Adds translated copy for the secret-resolve help message. |
| src-tauri/database.rs | Resolves secrets before connection test/connect; adds error wiring for resolver failures. |
| src-crates/secret-resolve/secret_resolve.rs | New secret resolution implementation + unit tests. |
| src-crates/secret-resolve/Cargo.toml | Defines the new secret-resolve crate and dependencies. |
| src-crates/proxy/src/lib.rs | Adds secret resolution for SSH proxy auth secrets. |
| src-crates/proxy/Cargo.toml | Adds dependency on secret-resolve. |
| src-crates/connection-config/connection_config.rs | Adds async secret_resolve() to resolve credentials across connection types. |
| src-crates/connection-config/Cargo.toml | Adds dependency on secret-resolve. |
| Cargo.toml | Adds secret-resolve dependency at the app/workspace level. |
| Cargo.lock | Locks new dependencies (secret-resolve, dotenvy). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fs::remove_file(&path).await.unwrap(); | ||
| } | ||
|
|
||
| #[tokio::test] |
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.
Close #187