Skip to content

Conversation

@briandowns
Copy link
Contributor

Signed-off-by: Brian Downs [email protected]

@briandowns briandowns self-assigned this Oct 26, 2021
Signed-off-by: Brian Downs <[email protected]>
@briandowns briandowns changed the title [WIP] - add ability to force cert regeneration Add ability to force cert regeneration Oct 27, 2021
@briandowns briandowns requested a review from a team October 27, 2021 16:02
Copy link

@Oats87 Oats87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost wonder if there is merit in figuring out how to add logging here for the purposes of knowing when certs are getting regenerated; however, I'm not sure that putting log messages in NewX makes sense. Conundrum.

@brandond
Copy link
Member

brandond commented Oct 27, 2021

@Oats87 I believe that I added logging to all cert signing operations a while back, so the call to l.factory.Renew(secret) should trigger an Info-level log message.

logrus.Infof("certificate %s signed by %s: notBefore=%s notAfter=%s",
parsedCert.Subject, caCert.Subject, parsedCert.NotBefore, parsedCert.NotAfter)

Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
@brandond
Copy link
Member

brandond commented Nov 12, 2021

Just want to be clear in the terminology used here about regenerating certs vs renewing them. It is very important to Rancher that the cert is just renewed and not actually regenerated, as generating a new cert makes the browser suspicious and will break websockets.

@briandowns
Copy link
Contributor Author

This operation would generate a new certificate needed for the certificate rotation work.

@briandowns briandowns requested a review from brandond November 15, 2021 19:40
Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, my apologies. This is not intended to be used to force renewal; the expected behavior is to repopulate the secret with a completely new key and certificate, retaining only the CNs from the current certificate.

@briandowns briandowns merged commit 27f4642 into rancher:master Nov 15, 2021
briandowns added a commit to briandowns/dynamiclistener that referenced this pull request Nov 15, 2021
* add ability to force cert regeneration

Signed-off-by: Brian Downs <[email protected]>
briandowns added a commit that referenced this pull request Nov 15, 2021
* add ability to force cert regeneration
galal-hussein pushed a commit to galal-hussein/rancher-dynamiclistener that referenced this pull request Dec 3, 2021
* add ability to force cert regeneration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants