-
Notifications
You must be signed in to change notification settings - Fork 117
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
Report error for unsupported PKCS #1 format for the private key #4114
Report error for unsupported PKCS #1 format for the private key #4114
Conversation
Java Kafka clients don't support PKCS #1 format for private keys. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4114 +/- ##
==========================================
+ Coverage 48.44% 48.47% +0.02%
==========================================
Files 244 244
Lines 14876 14888 +12
==========================================
+ Hits 7207 7217 +10
- Misses 6942 6943 +1
- Partials 727 728 +1 ☔ View full report in Codecov by Sentry. |
@@ -193,6 +195,10 @@ func sslConfig(protocol string, data map[string][]byte) kafka.ConfigOption { | |||
if err != nil { | |||
return fmt.Errorf("[protocol %s] failed to load x.509 key pair: %w", protocol, err) | |||
} | |||
// Java Kafka clients don't support PKCS #1 format for the private key | |||
if isPrivateKeyPKCS1Format(userKeyCert) { | |||
return fmt.Errorf("[protocol %s] unsupported user key format in %s, 'PKCS #1' format is not supported, convert private key to 'PKCS #8'", protocol, UserKey) |
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.
that is a good message!
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matzew, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test upgrade-tests |
/cherry-pick release-1.14 |
/cherry-pick release-1.15 |
@pierDipi: once the present PR merges, I will cherry-pick it on top of release-1.14 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@pierDipi: once the present PR merges, I will cherry-pick it on top of release-1.15 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/test upgrade-tests |
@pierDipi: new pull request created: #4116 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@pierDipi: new pull request created: #4117 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Java Kafka clients don't support
PKCS #1
format for private keys.Release Note