-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Implement RFD 18: Agent Loading #5825
Conversation
bc0fc7b
to
be43d80
Compare
42a0c1a
to
201f01d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add test coverage for LocalKeyAgent
changes
Added tests for my reworked non-leaky implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just to confirm: did you test the different options against both gpg-agent
and regular ssh-agent
, and without a local agent at all?
Further testing is on my TO-DO today. I've only performed some light testing. |
3dc1b84
to
11f12a0
Compare
Tested now, run into one error and pushed a small patch to fix it. Requested a re-review. Could you also take a look @webvictim ? |
I've manually tested all combinations of agents and flag values and everything seems to work according to RFD specifications now. |
hmm, still some profile loading peculiaries with the -i flag, will investigate. |
d147f5e
to
f9997ab
Compare
f9997ab
to
b4ccec7
Compare
52aa03b
to
b8a77f9
Compare
b8a77f9
to
df63f42
Compare
@xacrimon I tested this on Windows both with I did notice that even when we use |
Yep, that certs.pem is needed. Contains CA certificates so we can verify certs it has issued. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found two mistakes in my patch.
|
||
// DeleteKey removes a specific session key from a proxy. | ||
func (s *MemLocalKeyStore) DeleteKey(proxyHost, username string, opts ...KeyOption) error { | ||
delete(s.inMem, keyIndex{proxyHost: proxyHost, username: username}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this also delete any keys where clusterName
is set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the opts
handling is added here (see my comment below) leaving some clusterName
leftovers shouldn't break anything as the only way to get a key with a clusterName
is to go via an opt
.
Alternatively the map's key could be just changed from [proxyHost, username, clusterName]
to [proxyHost, username][clusterName]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be resolved now with the opts handling.
2b49140
to
83e3a81
Compare
83e3a81
to
9bdf421
Compare
9bdf421
to
69efa50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bot.
This PR implements RFD 18: Agent Loading.
This fixes #3169 and #4863.