When installing on Linux using our deployment scripts, all of the ports required by Cassandra for inter-node communication, as well as for the Teamwork Cloud Magic Collaboration Studio nodes to communicate with Cassandra nodes are opened globally. This configuration is deployed mostly to facilitate testing of the environment upon installation, prior to taking any measures to harden the installation. If we check the firewall upon installation, we will see an output similar to the one below:
Code Block
# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: cassandra lmadmin ssh twcloud
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
In our deployment, we create a firewall service definition to facilitate the management of the rules. This file is located in /etc/firewalld/services/cassandra.xml, and contains the following:
The first step in securing Cassandra is to limit traffic only to Cassandra and Teamwork Cloud Magic Collaboration Studio Nodes. In the example below, we have a single node Cassandra/Teamwork Cloud Magic Collaboration Studio installation, with its IP address set to 10.254.254.56.
As can be seen below, the firewall configuration has been modified to only allow access from itself.
Code Block
# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: lmadmin ssh twcloud
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
rule family="ipv4" source address="10.254.254.56" service name="cassandra" accept
The process to follow is to remove the general firewall allowance to the Cassandra service. After that, we want to ensure that if direct port rule assignments were made, they are removed. Finally, we want to create a set of rich rules which will allow access only to the required nodes.
If your deployment consists of a single-node or multi-node cluster where both Teamwork Cloud Magic Collaboration Studio and Cassandra reside on the same nodes, automate this process by downloading and using the harden_cassandra_ports.sh script. The script is structured in such a way that it will output the rich rule commands to the screen to facilitate copying and modifying to add nodes, which is needed if you have Teamwork Cloud Magic Collaboration Studio nodes that are not part of the Cassandra cluster.
Note
The harden_cassandra_ports.sh script should be executed on all nodes of a multi-node Cassandra cluster, with all nodes being in an operational state.
Warning
For Windows users: Create firewall rules restricting access on the aforementioned ports only to authorized nodes - Cassandra nodes and Teamwork Cloud Magic Collaboration Studio Nodes.
Replication Strategy
Teamwork Cloud Magic Collaboration Studio presently does not support Multi-DC replication strategies. As such, the environment must be configured with SimpleStrategy.
Cassandra Authentication
By default, Cassandra is deployed with the AllowAllAuthenticator. This authenticator, as the name implies, is an anonymous authenticator which performs no checks.
If you require authenticated connections, you will need to make changes to your cassandra.yaml and change the authenticator to PasswordAuthenticator. If you are running a multi-node Cassandra cluster, you need to change the replication factor of the system_auth keyspace.
Where newcassandrauser and newcassandrapassword correspond to the user and credentials which you configured in Cassandra.
Cassandra Encrypted Connections
Starting from Teamwork Cloud Magic Collaboration Studio Version 2021x and onwards, encrypted communication with Cassandra is supported. To achieve this, the configuration of secure SSL communication is needed.
Data Encryption at Rest
Open source Cassandra does not support encryption at rest. If you require encryption at rest, you need to use a disk encryption layer.