You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Wang1rrr (via GitHub)" <gi...@apache.org> on 2026/10/19 03:34:22 UTC
[I] [Bug] Certificate import rejects PEM chains with padded leaf certificates [rocketmq-dashboard]
Wang1rrr opened a new issue, #6988:
URL: https://github.com/apache/rocketmq-dashboard/issues/6988
### Problem
K8sCertService.parseCertificate removes every PEM marker and decodes all remaining text as one Base64 string. A certificate bundle containing a padded first certificate (`=` or `==`) followed by another certificate is rejected as invalid content. The same first certificate works on its own. This affects ordinary PEM chains supplied as TLS certificate material.
### Reproduction
Create a TLS certificate with two valid PEM certificate blocks. Use a first certificate whose Base64 ends in `==`. The create call throws BusinessException 400 before saving. A focused regression using a generated self-signed fixture reproduces the failure on rocketmq-studio c34535d.
### Expected
Read the first certificate for metadata while retaining the full supplied PEM bundle. Preserve existing single-certificate and bare-Base64 support, and continue rejecting malformed certificates.
The fix lets the JDK X.509 reader handle PEM boundaries. All 35 service/controller tests pass, covering LF/CRLF bundles, retained content, first-certificate metadata, bare Base64 and malformed content.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org