Securing Kafka and Cassandra JMX
Pega Platform uses JMX to communicate to the Kafka and Casandra processes. This communication can be secured by enabling certain settings in prconfig file.
The process can be differentiate between:
Kafka and Cassandra JMX for non-Windows OS
Cassandra JMX authentication settings
- Open the
prconfig.xml
file. - Add the following values:
<!-- Please provide username and password to enable jmx authentication for cassandra. To disable authentication, use blank values(""). --> <env name="dnode/cassandra_jmx_username" value="c_jmx_user"/> <env name="dnode/cassandra_jmx_password" value="c_jmx_password"/> <!-- This setting should be set to true (enabled) on first launch after hotfix installed and platform is restared. --> <env name="dnode/overwrite_cassandra_distribution" value="true"/>
- Save the changes.
Kafka JMX authentication settings
- Open the
prconfig.xml
file. - Add the following values:
<!-- Please provide username and password to enable jmx authentication for kafka. To disable authentication, use blank values(""). --> <env name="dsm/services/stream/pyJmxUser" value="k_jmx_user"/> <env name="dsm/services/stream/pyJmxPassword" value="k_jmx_password"/>
- Save the changes.
Kafka and Cassandra JMX for Windows OS
Cassandra JMX authentication settings
Create a password file:
- Create a password file with an extension .password. Example: cassandra_jmx_auth.password.
- Add usernamepassword to the file (c_jmx_user c_jmx_password)
- Save the contents.
- Follow instructions from this Oracle document to set file permissions to make sure only the owner has access the file.
Add settings to prconfig
file:
- Open the
prconfig.xml
file. - Add the following values:
<!-- Please provide username and password to enable jmx authentication for cassandra. To disable authentication, use blank values(""). --> <env name="dnode/cassandra_jmx_username" value="c_jmx_user"/> <env name="dnode/cassandra_jmx_password" value="c_jmx_password"/> <env name="dnode/cassandra_jmx_passwordfile" value=" <Cassandra_Password_File_Path>"/> <!-- This setting should be set to true (enabled) on first launch after hotfix installed and platform ins restared. --> <env name="dnode/overwrite_cassandra_distribution" value="true"/>
- Save the changes.
Kafka JMX authentication settings
Create a password file:
- Create a password file with an extension .password. Example: kafka_jmx_auth.password.
- Add usernamepassword to the file (k_jmx_user k_jmx_password )
- Save the contents.
- Follow instructions from this Oracle document to set file permissions to make sure only the owner has access the file.
Add settings to prconfig
file:
- Open the
prconfig.xml
file. - Add the following values:
<!-- Please provide username and password to enable jmx authentication for kafka. To disable authentication, use blank values. --> <env name="dsm/services/stream/pyJmxUser" value="k_jmx_user"/> <env name="dsm/services/stream/pyJmxPassword" value="k_jmx_password"/> <env name="dsm/services/stream/pyJmxremotePasswordFile" value=" <Kafka_Password_File_Path>">
- Save the changes.
Previous topic Configuring External Kafka as a Stream service Next topic Configuration settings for nodes