Using IBM Event Streams Version 10
You can use IBM® Event Streams Version 10 with SCRAM authentication or TLS authentication.
Procedure
- Setting up Event Streams with SCRAM authentication
Ask your IBM Event Streams administrator to provide:
- The bootstrap address of an external Kafka listener.
- Optional: The schema registry endpoint.
- The SCRAM user name and password
- Optional: The Java™ trust store file that contains the CA certificate (es-cert.p12).
- Optional: The Java trust store file password.
- Configure the Kafka producer and consumer properties by opening the
kafkaproducer.properties and kafkaconsumer.properties
files adding the following
lines:
bootstrap.servers=external_bootstrap_address:port security.protocol=SASL_SSL sasl.mechanism=SCRAM-SHA-512 sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="scram_username" password="scram_password ";If your Event Streams instance does not use a certificate that is signed by a public CA, add the following lines to the kafkaproducer.properties and kafkaconsumer.properties files:
ssl.truststore.location=/path/to/es-cert.p12 ssl.truststore.password=truststore_password ssl.truststore.type=PKCS12For KCOPs that do not connect to the schema registry, no additional steps are needed.
- If you want to serialize your messages by using a schema registry, follow
these steps:
- If your Event Streams instance does not use a certificate that is signed by a public CA, stop the CDC Replication instance and launch the configuration tool. Edit the encryption profile. When asked about a trust store, provide the path to the es-cert.p12 file, the trust store password, and the key store format PKCS12.
- Create a properties file with the following
lines:
schema.registry.url=https://schema_registry_endpoint serializer.property.basic.auth.credentials.source=USER_INFO serializer.property.schema.registry.basic.auth.user.info=scram_username:scram_password - When an endpoint is configured for SCRAM authentication, then clients are required to use basic
authentication when connecting to a schema registry. All KCOPs that are shipped with CDC Replication support basic
authentication. The list of KCOPs can be found in Kafka custom operation processor (KCOP) for the CDC Replication Engine for Kafka.
You need to select a KCOP from the list or create your own. Otherwise a subscription will fail when it serializes a message. If you want the default behavior, use this KCOP.
- Create the new subscription in Management Console and map your tables.
- Right click on the subscription and click Kafka Properties.
- Specify the following values in the Communication Details section:
- Host Name: localhost
- Port: 2181
The values are not used when connecting to IBM Event Streams but still are required by the UI.
- Configure a KCOP.
- Right click on a subscription and click User Exits.
- In the Class Name field, specify canonical name of your chosen KCOP (package plus class name).
- In the Parameter field, specify the path to the
KCOP.properties file, for example
-file:/path/to/KCOP.properties.Note: The CDC Replication Engine for Kafka can only replicate to IBM Event Stream with a KCOP. Familiarize yourself with available KCOPs and decide which one to use.
- Setting up Event Streams with TLS authentication
Ask your IBM Event Streams administrator to provide:
- The bootstrap address of an external Kafka listener.
- Optional: The schema registry endpoint.
- The Java key store file (user.p12).
- The Java key store file password.
- Optional: The Java trust store file that contains the CA certificate (es-cert.p12).
- Optional: The Java trust store file password.
- Configure the Kafka producer and consumer properties by opening the
kafkaproducer.properties and kafkaconsumer.properties
files adding the following
lines:
bootstrap.servers= external_bootstrap_address:port security.protocol= SSL ssl.keystore.location=/path/to/user.p12 ssl.keystore.password=keystore_password ssl.keystore.type=PKCS12If your Event Streams instance does not use a certificate that is signed by a public CA, add the following lines to the kafkaproducer.properties and kafkaconsumer.properties files:
ssl.truststore.location=/path/to/es-cert.p12 ssl.truststore.password=truststore_password ssl.truststore.type=PKCS12For KCOPs that do not connect to the schema registry, no additional steps are needed.
- If you want to serialize your messages by using a schema registry, follow
these steps:
- Stop the CDC Replication instance and launch the configuration tool. Edit the encryption profile. When asked about a trust store, provide the path to the user.p12 file, the key store password, and the key store format PKCS12.
- : If your Event Streams instance does not use a certificate signed by a public CA, then edit the encryption profile again. When asked about a trust store, provide the path to the es-cert.p12 file, the trust store password, and the key store format PKCS12.
- Create the new subscription in Management Console and map your tables.
- Right click on the subscription and click Kafka Properties.
- Specify the following values in the Communication Details section:
- Host Name: localhost
- Port: 2181
The values are not used when connecting to IBM Event Streams but still are required by the UI.
- Specify the following values in the Schema Registry section:
- Host Name: The schema registry endpoint
- Port: 443
- Check Encrypted