google / google/chrome-ssh-agent
Feature Request: Confirm constraint
- Dominant language
- Go
- Stars
- 289
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
It would be great to support the confirm mechanism that exists in the [SSH agent protocol](https://tools.ietf.org/html/draft-miller-ssh-agent-02#section-4.2.6.2).
Currently when loading a key through `ssh-add` with the [`-c` option](https://www.ssh.com/ssh/add#sec-code-ssh-add-code-Command-Line-Options), the key will actually be used silently without any prompt.
I looked through the golang crypto source code, and it looks like the agent server parses the constraint and sets a [`ConfirmBeforeUse` flag](https://github.com/golang/crypto/blob/7f87c0fbb88b590338857bcb720678c2583d4dea/ssh/agent/server.go#L235) on the key, but the [`keyring.add` method simply ignores it](https://github.com/golang/crypto/blob/dab2b1051b5dd33a57e97c4774ed152e6a6c9a13/ssh/agent/keyring.go#L149).
From a UI persepective, I'd want the options page to set the constraint when adding a key and / or when loading it.
For the prompt, the extension could show a notification (with require interaction set), to ask to either confirm or deny.
Contributor guide
Assessment
This issue has not been assessed yet.