-
Notifications
You must be signed in to change notification settings - Fork 16
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
enable to specify agent connection to insert cert to #231
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #231 +/- ##
==========================================
- Coverage 32.39% 32.13% -0.26%
==========================================
Files 75 75
Lines 9718 9730 +12
==========================================
- Hits 3148 3127 -21
- Misses 5929 5962 +33
Partials 641 641 ☔ View full report in Codecov by Sentry. |
0b5a325
to
7a76147
Compare
lib/client/sshagent/agent.go
Outdated
var err error = nil | ||
if conn == nil { | ||
conn, err = connectToDefaultSSHAgentLocation() | ||
if err != nil { | ||
return err |
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.
Put the connectToDefaultSSHAgentLocation inside withAddedKeyUpsertCertIntoAgent. In general if we need an input parameter we dont change its lifetime within a function (as written sometimes the a connection is closed and sometimes is not).
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.
done, pls check now
@@ -50,12 +50,13 @@ func deleteDuplicateEntries(comment string, agentClient agent.ExtendedAgent, log | |||
return deletedCount, nil | |||
} | |||
|
|||
func upsertCertIntoAgent( | |||
func upsertCertIntoAgentConnection( |
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.
None of the api (public calls are being modified here). What calls do you actually need? Looking a the keymaster code, it seems like The public side of this call is not needed.
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.
Purelogin calls UpsertCertIntoAgent
from [email protected]/lib/client/sshagent/api.go
, I need to be able to specify connection there
comment string, | ||
lifeTimeSecs uint32, | ||
confirmBeforeUse bool, | ||
logger log.DebugLogger) error { |
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.
creation of the new agent connection should also go here
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.
done, pls check now
I've surfaced new methods to API, pls check it out :) |
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.
There is an unnecesary api and we should have more tests. But will approve.
* add flavour, version command, fix version source (Cloud-Foundations#229) - make makefile single source of truth for version - trigger the flow in the tests * minor tests enhancements (Cloud-Foundations#232) * Docker cleanup (Cloud-Foundations#233) * Removed unnecessary `start.sh` * Updated Dockerfile to newer OS * Cleaned up Dockerfile dirty hack for RSA keys Co-authored-by: Espinoza, Erik <[email protected]> * enable to specify agent connection to insert cert to (Cloud-Foundations#231) * enable to specify agent connection to insert cert to * add api * bump version --------- Co-authored-by: Dušan Klinec <[email protected]> --------- Co-authored-by: Dušan Klinec <[email protected]> Co-authored-by: cviecco <[email protected]> Co-authored-by: Erik Espinoza <[email protected]> Co-authored-by: Espinoza, Erik <[email protected]>
Required for PS to create ephemeral agents to work around limitation on number of auth attempts. For each session we will create a new agent so users can have multiple simultaneous sessions.