feat: enhance log message for certificate parsing errors#8801
Merged
mnencia merged 4 commits intocloudnative-pg:mainfrom Oct 9, 2025
Merged
feat: enhance log message for certificate parsing errors#8801mnencia merged 4 commits intocloudnative-pg:mainfrom
mnencia merged 4 commits intocloudnative-pg:mainfrom
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
Member
|
/test |
Contributor
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18375598110 |
mnencia
approved these changes
Oct 9, 2025
gabriele-wolfox
approved these changes
Oct 9, 2025
148293d to
47e84a1
Compare
652fc4d to
3888381
Compare
armru
approved these changes
Oct 9, 2025
armru
approved these changes
Oct 9, 2025
3888381 to
d6a9fa5
Compare
d6a9fa5 to
adc4b44
Compare
9b6bdb6 to
3d53741
Compare
Member
|
/ok-to-merge E2E failed for a known glitch in csi-hostpath driver |
gbartolini
approved these changes
Oct 9, 2025
When the certificate parser failed, a generic error message was raised in the log, without actually specifying what went wrong. This makes really complex understanding and ultimately fixing the issue. This patch improves the log message by having a separate parsing step and recording the actual error. Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
3d53741 to
14ca13d
Compare
cnpg-bot
pushed a commit
that referenced
this pull request
Oct 9, 2025
When the certificate parser failed, the log only contained a generic error message, making it difficult to diagnose the underlying problem. This patch introduces a dedicated parsing step that captures and logs the specific parsing error, improving observability and troubleshooting. This change is especially relevant after the fix for `CVE-2025-58187` included in Go 1.25.2 and 1.24.8, which increases the likelihood of parsing failures if a DNS Subject Alternative Name in the certificate is invalid. Closes: #8800 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit 3a1423e)
cnpg-bot
pushed a commit
that referenced
this pull request
Oct 9, 2025
When the certificate parser failed, the log only contained a generic error message, making it difficult to diagnose the underlying problem. This patch introduces a dedicated parsing step that captures and logs the specific parsing error, improving observability and troubleshooting. This change is especially relevant after the fix for `CVE-2025-58187` included in Go 1.25.2 and 1.24.8, which increases the likelihood of parsing failures if a DNS Subject Alternative Name in the certificate is invalid. Closes: #8800 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit 3a1423e)
cnpg-bot
pushed a commit
that referenced
this pull request
Oct 9, 2025
When the certificate parser failed, the log only contained a generic error message, making it difficult to diagnose the underlying problem. This patch introduces a dedicated parsing step that captures and logs the specific parsing error, improving observability and troubleshooting. This change is especially relevant after the fix for `CVE-2025-58187` included in Go 1.25.2 and 1.24.8, which increases the likelihood of parsing failures if a DNS Subject Alternative Name in the certificate is invalid. Closes: #8800 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit 3a1423e)
THE-BRAHMA
pushed a commit
to THE-BRAHMA/cloudnative-pg
that referenced
this pull request
Oct 30, 2025
…-pg#8801) When the certificate parser failed, the log only contained a generic error message, making it difficult to diagnose the underlying problem. This patch introduces a dedicated parsing step that captures and logs the specific parsing error, improving observability and troubleshooting. This change is especially relevant after the fix for `CVE-2025-58187` included in Go 1.25.2 and 1.24.8, which increases the likelihood of parsing failures if a DNS Subject Alternative Name in the certificate is invalid. Closes: cloudnative-pg#8800 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: theBrahma <office.utpal.brahma@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the certificate parser failed, the log only contained a generic error message, making it difficult to diagnose the underlying problem.
This patch introduces a dedicated parsing step that captures and logs the specific parsing error, improving observability and troubleshooting.
This change is especially relevant after the fix for
CVE-2025-58187included in Go 1.25.2 and 1.24.8, which increases the likelihood of parsing failures if a DNS Subject Alternative Name in the certificate is invalid.Closes: #8800