-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
[FAB-18188] Log orderer and peer cert expiration date upon startup #1804
Conversation
FAB-17000 added a warning if expiration is within a week. This change additionally info logs the future enrollment, tls server, and tls client cert expiration dates upon startup, regardless of whether they will expire within a week or not. Signed-off-by: David Enyeart <enyeart@us.ibm.com>
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.
I don't understand why modify the current code and make it even more complex.
Why not just export certExpirationTime and log it outside?
@yacovm Because each of the three certs have checks against them in TrackExpiration, as does certExpirationTime(). Why duplicate all those checks and add complexity to the peer and orderer mains, when it can be done together with the existing logging in the dedicated expiration tracking function where people would expect it. At the end of the day, I don't think it matters much either way, but mostly I'd prefer to keep the mains nice and clean. |
I think that if you make a single function that accepts all 3 as inputs (similar to track expiration) then it won't pollute the main, and will be much easier to understand the code. |
@yacovm But all three cert expiration dates are not available for logging, it depends on which are configured on the node. By the time we duplicate that logic, might as well just log it alongside the expiration Warning where I have it. I'm not seeing the complexity of keeping the expiration warning and expiration logging co-located in trackCertExpiration(), on the contrary it seems that a trackCertExpiration() function is the most straightforward place to both log the date and provide a warning if the date is coming soon. |
@Mergifyio backport release-2.2 |
@Mergifyio backport release-2.1 |
@Mergifyio backport release-2.0 |
…1804) FAB-17000 added a warning if expiration is within a week. This change additionally info logs the future enrollment, tls server, and tls client cert expiration dates upon startup, regardless of whether they will expire within a week or not. Signed-off-by: David Enyeart <enyeart@us.ibm.com> (cherry picked from commit bd7180c)
Command
|
…1804) FAB-17000 added a warning if expiration is within a week. This change additionally info logs the future enrollment, tls server, and tls client cert expiration dates upon startup, regardless of whether they will expire within a week or not. Signed-off-by: David Enyeart <enyeart@us.ibm.com> (cherry picked from commit bd7180c)
Command
|
…1804) FAB-17000 added a warning if expiration is within a week. This change additionally info logs the future enrollment, tls server, and tls client cert expiration dates upon startup, regardless of whether they will expire within a week or not. Signed-off-by: David Enyeart <enyeart@us.ibm.com> (cherry picked from commit bd7180c)
Command
|
…yperledger#1804) FAB-17000 added a warning if expiration is within a week. This change additionally info logs the future enrollment, tls server, and tls client cert expiration dates upon startup, regardless of whether they will expire within a week or not. Signed-off-by: David Enyeart <enyeart@us.ibm.com>
…yperledger#1804) FAB-17000 added a warning if expiration is within a week. This change additionally info logs the future enrollment, tls server, and tls client cert expiration dates upon startup, regardless of whether they will expire within a week or not. Signed-off-by: David Enyeart <enyeart@us.ibm.com>
…1804) FAB-17000 added a warning if expiration is within a week. This change additionally info logs the future enrollment, tls server, and tls client cert expiration dates upon startup, regardless of whether they will expire within a week or not. Signed-off-by: David Enyeart <enyeart@us.ibm.com> (cherry picked from commit bd7180c)
…1804) FAB-17000 added a warning if expiration is within a week. This change additionally info logs the future enrollment, tls server, and tls client cert expiration dates upon startup, regardless of whether they will expire within a week or not. Signed-off-by: David Enyeart <enyeart@us.ibm.com>
Type of change
Description
FAB-17000 added a warning if expiration is within a week.
This change additionally info logs the future enrollment, tls server, and tls client
cert expiration dates upon startup, regardless of whether they will expire within a week or not.
Signed-off-by: David Enyeart enyeart@us.ibm.com