-
Notifications
You must be signed in to change notification settings - Fork 198
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
Listeners config doesn't accept passwords with special characters #905
Comments
Thank you for the report @p53! |
@bartam1 i changed config-map manually to this: |
@bartam1 i just tested it, had this password |
@bartam1 you can reproduce it like this:
---
apiVersion: v1
kind: Secret
metadata:
name: some-secret
stringData:
password: e1ztoimKhBWS6IyO\{AlEV3xkuHMs.vr
---
apiVersion: v1
kind: Secret
metadata:
name: some-secret-ca
Data:
tls.key: ""
tls.crt: ""
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-cluster-issuer
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: my-selfsigned-ca
spec:
isCA: true
commonName: my-selfsigned-ca
secretName: some-secret-ca
privateKey:
algorithm: ECDSA
size: 256
issuerRef:
name: selfsigned-cluster-issuer
kind: ClusterIssuer
group: cert-manager.io
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: my-issuer
spec:
ca:
secretName: some-secret-ca
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: kafka-all-broker.kafka.svc.cluster.local
spec:
secretName: some-secret
commonName: kafka-all-broker.kafka.svc.cluster.local
usages:
- server auth
- client auth
dnsNames:
- '*.kafka-all-broker.kafka.svc.cluster.local'
issuerRef:
name: my-issuer
kind: Issuer
group: cert-manager.io
keystores:
jks:
create: true
passwordSecretRef:
key: password
name: some-secret
privateKey:
encoding: PKCS8
clientSSLCertSecret:
name: some-secret
listenersConfig:
internalListeners:
- type: "ssl"
serverSSLCertSecret:
name: some-secret
name: "internal"
containerPort: 9092
usedForInnerBrokerCommunication: true
- type: "ssl"
serverSSLCertSecret:
name: some-secret
name: "controller"
containerPort: 9093
usedForInnerBrokerCommunication: false
usedForControllerCommunication: true |
checked this even deeper and problem seems to be in java Properties.load function https://stackoverflow.com/a/5785128 |
i think it should be either sanitized somehow or at least made some warning in docu |
Describe the bug
When using password with special chars for truststore/keystore, kafka startup fails, problem is here:
https://github.com/banzaicloud/koperator/blob/master/pkg/resources/kafka/configmap.go#L331
example of non-working password:
listener.name.internal.ssl.truststore.password=e1ztoimKhBWS6IyO\{AlEV3xkuHMs.vr
Steps to reproduce the issue:
in secret used for truststore/keystore use special characters
Expected behavior
using special characters should result in successfull kafka startup
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem like release numberm version, branch, etc.
The text was updated successfully, but these errors were encountered: