Add certificate rotation to teleport openssh join oneshot command #24194
Add certificate rotation to teleport openssh join oneshot command #24194
Conversation
127886c to
c6bb6f5
Compare
r0mant
left a comment
There was a problem hiding this comment.
First pass, just comments about code organization for now, will do another pass to review the rotation logic in more detail.
2d0c8a3 to
c31c72d
Compare
|
@lxea Is this ready for another review? |
Yeah, I think i've gotten most of the comments |
45340c3 to
44d52f8
Compare
r0mant
left a comment
There was a problem hiding this comment.
lgtm
@lxea Can you please also write an integration test for this? Right now it's very lightly tested so I'm concerned there will be regressions.
We can do it in a follow-up PR. The test would configure/start this new openssh_service and make sure it fetches proper credentials from the cluster, places them where needed and calls the provided restart command.
There was a problem hiding this comment.
This tripped me up really badly, as it's a very common unsafe file manipulation pattern - writeTempAndRename creates files with restrictive 600 permissions already, so this is fine (if unnecessary), but it's not documented to do so. Add some docs to writeTempAndRename to clarify that this is the case.
8ca8905 to
c14d42a
Compare
espadolini
left a comment
There was a problem hiding this comment.
LGTM other than figuring out what's up with the shutdown.
Fix agentless test Resolve comments refactor to use existing rotation/backend resolve comments resolve comments Use a comma separated additional-principals resolve comments resolve some comments resolve comments resolve comments add sshd_test remove openssh from config.Configure just use current time for registerServer rotation resolve comments
Will have a follow up pr that updates the scripts and tries to execute certificate rotation