我的任务是使用ssl使kafka安全,并且微服务之间也要进行通信。问题是,尽管在微服务配置文件中,我仍然像下面这样对生产者和消费者进行了配置,但仍然无法获得信任库和密钥库位置以及密钥本身。请建议
configuration:
security.protocol: "SSL"
ssl.keystore.location: /certs/kafka.client.keystore.jks
ssl.keystore.password: kafkadocker
ssl.keystore.type: JKS
ssl.truststore.location: /certs/kafka.client.truststore.jks
ssl.truststore.password: kafkadocker
ssl.truststore.type: JKS
consumer:
configuration:
security.protocol: "SSL"
ssl.keystore.location: /certs/kafka.client.keystore.jks
ssl.keystore.password: kafkadocker
ssl.keystore.type: JKS
ssl.truststore.location: /certs/kafka.client.truststore.jks
ssl.truststore.password: kafkadocker
ssl.truststore.type: JKS
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
value-deserializer: it.sisal.nlp.sip.core.service.kafka.CustomDeserializer
auto-offset-reset: latest
group-id: mock-group
producer:
configuration:
security.protocol: "SSL"
ssl.keystore.location: /certs/kafka.client.keystore.jks
ssl.keystore.password: kafkadocker
ssl.keystore.type: JKS
ssl.truststore.location: /certs/kafka.client.truststore.jks
ssl.truststore.password: kafkadocker
ssl.truststore.type: JKS
acks = 1
batch.size = 16384
bootstrap.servers = [localhost:9092]
buffer.memory = 33554432
client.id =
compression.type = none
connections.max.idle.ms = 540000
enable.idempotence = false
interceptor.classes = null
key.serializer = class org.apache.kafka.common.serialization.StringSerializer
linger.ms = 0
max.block.ms = 60000
max.in.flight.requests.per.connection = 5
max.request.size = 1048576
metadata.max.age.ms = 300000
metric.reporters = []
metrics.num.samples = 2
metrics.recording.level = INFO
metrics.sample.window.ms = 30000
partitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner
receive.buffer.bytes = 32768
reconnect.backoff.max.ms = 1000
reconnect.backoff.ms = 50
request.timeout.ms = 30000
retries = 0
retry.backoff.ms = 100
sasl.jaas.config = null
sasl.kerberos.kinit.cmd = /usr/bin/kinit
sasl.kerberos.min.time.before.relogin = 60000
sasl.kerberos.service.name = null
sasl.kerberos.ticket.renew.jitter = 0.05
sasl.kerberos.ticket.renew.window.factor = 0.8
sasl.mechanism = GSSAPI
security.protocol = PLAINTEXT
send.buffer.bytes = 131072
ssl.cipher.suites = null
ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
ssl.endpoint.identification.algorithm = null
ssl.key.password = null
ssl.keymanager.algorithm = SunX509
ssl.keystore.location = null
ssl.keystore.password = null
ssl.keystore.type = JKS
ssl.protocol = TLS
ssl.provider = null
ssl.secure.random.implementation = null
ssl.trustmanager.algorithm = PKIX
ssl.truststore.location = null
ssl.truststore.password = null
ssl.truststore.type = JKS
transaction.timeout.ms = 60000
transactional.id = null
value.serializer = class org.apache.kafka.common.serialization.StringSerializer