Skip to content

Supports reading password from external sources#190

Merged
wyhaya merged 3 commits into
mainfrom
password-script
Jun 4, 2026
Merged

Supports reading password from external sources#190
wyhaya merged 3 commits into
mainfrom
password-script

Conversation

@wyhaya
Copy link
Copy Markdown
Member

@wyhaya wyhaya commented Jun 4, 2026

Close #187

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 from env:, file:, exec: prefixes (or passes through plain text).
  • Resolves secrets in ConnectionConfig (and SSH proxy auth) before test/connect in 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.

Comment thread src-crates/secret-resolve/secret_resolve.rs
Comment thread src-crates/secret-resolve/secret_resolve.rs
Comment thread src-crates/secret-resolve/secret_resolve.rs
fs::remove_file(&path).await.unwrap();
}

#[tokio::test]
Comment thread src-crates/secret-resolve/secret_resolve.rs
@wyhaya wyhaya merged commit 9f9dcea into main Jun 4, 2026
1 check passed
@wyhaya wyhaya deleted the password-script branch June 4, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Password from Script

2 participants