-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH agent client support #32
Comments
I think it's a great idea and we should do that. A couple of notes before we start working on this:
As for async I don't have an opinion. We can keep it simple and sync for now (this could be useful for some people that don't want to bring tokio?). I agree with everything else you've said 👍 |
There might be a need for async later on, but we can always introduce that when it comes up. |
It’s probably worth noting too, I’ve been in touch with Damien Miller (the author of the agent protocol spec), and he’s been gracious enough to rework extension responses in the spec; there should be a new revision out soon. This will add an I think this addresses the concerns around trailing data in a Success message that @baloo alluded to in #16 as well! |
Oh, that's great! I think I should send a patch with the minor spec thing we've found when working on key extension constraints.
That's always very welcome 🙏
Hmm... Just for the record: IMO Success is actually pretty simple, even with added strings (just read strings until the reader is exhausted). The real problems appear when using nested structures (say, keys with unknown extension constraints, or new keytypes). That being said I'm very happy that there's this effort to fix outstanding issues with the spec and the implementation. I wonder if it would be beneficial to share some test vectors (serialized binary messages, like so: https://github.com/wiktor-k/ssh-agent-lib/tree/main/tests/messages) with the upstream? Thanks for following up with this thread @jcspencer 👍 |
🤔 I've refactored the and that got me thinking that actually That means one could implement Aaand... that's it! 👋 |
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Fixes: #32 Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
Given the work occurring in #26 (with encode/decode support now supported for the entire spec), the project is now relatively close to being able to implement support for acting as an SSH agent client.
I imagine this would entail:
MessageCodec
into it's ownpub(crate)
module, as it would be shared between theagent
andclient
.ClientSocket
trait to support Unix Sockets / TCP / Named Pipes as transports.Client
trait which provides helper methods for sending messages over the aClientSocket
.It's probably worth noting that from a client perspective, one connection == one session, so the Agent/Session-style split would not be required.
I'm also unsure whether the interface needs to be
async
, or whether a synchronous interface would be sufficient?Interested to hear your thoughts!
A sample trait for a client could look something like:
The text was updated successfully, but these errors were encountered: