Implement SSH identity authentication
This commit is contained in:
@@ -70,16 +70,35 @@ The HTTPS account name is stored inside the protected credential record, not in
|
||||
TOML. OpenPGP passphrases are addressed by the resolved primary fingerprint.
|
||||
|
||||
SSH remotes use either `ssh://[user@]host[:port]/path` or scp-like
|
||||
`[user@]host:path` syntax and omit the HTTPS credential fields:
|
||||
`[user@]host:path` syntax and omit the HTTPS credential fields. They select
|
||||
exactly one private-key file or one already-running SSH-agent identity:
|
||||
|
||||
```toml
|
||||
[[git.remotes]]
|
||||
name = "origin"
|
||||
url = "git@git.example.test:alice/password-store.git"
|
||||
ssh_identity_file = "keys/id_ed25519"
|
||||
ssh_known_hosts_file = "known_hosts"
|
||||
```
|
||||
|
||||
Relative paths are resolved against `config.toml`. If
|
||||
`ssh_known_hosts_file` is omitted, `~/.ssh/known_hosts` is used. Agent
|
||||
authentication replaces `ssh_identity_file` with an exact SHA-256 fingerprint
|
||||
and may name a socket explicitly:
|
||||
|
||||
```toml
|
||||
ssh_agent_fingerprint = "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU"
|
||||
ssh_agent_socket = "/run/user/1000/ssh-agent.socket"
|
||||
```
|
||||
|
||||
Private-key passphrases are stored by fingerprint in the operating-system
|
||||
secret store and never appear in TOML. IronStorage does not read OpenSSH
|
||||
configuration, try additional keys, prompt for passwords or
|
||||
keyboard-interactive authentication, launch an agent, or invoke proxy/helper
|
||||
commands.
|
||||
|
||||
The typed endpoint model is always available so an SSH remote remains readable
|
||||
in configuration even when the binary was built without SSH. Such a build
|
||||
through the Rust API even when the binary was built without SSH. Such a build
|
||||
returns a typed unsupported-transport error before connection or repository
|
||||
mutation. The optional storage `ssh` feature contains `russh` 0.63.1 and Tokio;
|
||||
`russh` default features are disabled and the Ring backend plus RSA key support
|
||||
@@ -94,6 +113,12 @@ bytes, credentials, queries, fragments, ambiguous unbracketed IPv6 or colon
|
||||
paths, leading-option paths, local paths, URL rewrites, separate push URLs,
|
||||
helper transports, and unknown schemes fail closed.
|
||||
|
||||
Server identity is checked before authentication against the configured
|
||||
known-hosts file. Exact, hashed, and non-default-port host entries are
|
||||
supported. Unknown keys return their host, algorithm, and SHA-256 fingerprint
|
||||
for explicit confirmation; confirming appends the key atomically. A changed
|
||||
key is a hard failure and is never replaced by that confirmation API.
|
||||
|
||||
`clipboard_timeout_seconds` controls the native clipboard presentation lease.
|
||||
It defaults to 45 seconds for upstream `pass` compatibility and must be between
|
||||
1 and 300 seconds. The CLI remains alive for the lease so Linux can serve its
|
||||
|
||||
Reference in New Issue
Block a user