Prerequisites
- A Cassandra cluster reachable from CloudThinker on its CQL native transport port,
9042by default. - Permission to create a login role, or a role someone created for you.
- Two or three node addresses from the same datacenter. The driver discovers the rest of the ring from them.
This connection speaks CQL only.
nodetool runs over JMX on a different port, so repair status, compaction backlog, and disk usage stay outside what an agent can read here.Setup
1
Create a login role
Connect as an existing superuser and create a dedicated role:Do not reuse the default
cassandra superuser.2
Grant read access
Reading
system and system_schema needs no grant, so keyspace inventory, schema audits, and ring health work as soon as the role can log in. Add row reads on only the keyspaces the agent should reach:3
Grant change access (optional)
Skip this step for a read-only connection. Grant it per keyspace when you want the agent to propose changes:
4
Open network access
Allow inbound
9042 from CloudThinker to the contact points you plan to enter. Amazon Keyspaces uses 9142 with TLS required.5
Add the connection in CloudThinker
Go to Connections → Cassandra and enter:
- Contact points: comma-separated hostnames or IPs, no port, for example
10.0.1.10,10.0.1.11 - Native transport port:
9042for most clusters,9142for Amazon Keyspaces - Role name:
cloudthinker - Password: the password you set above
- Local datacenter: optional; set it to keep reads inside one datacenter on a multi-DC ring
- Use TLS: leave on
Yesunless your cluster hasclient_encryption_optionsdisabled - Verify the TLS certificate: leave on
Yes; turn it off only for a self-signed or internal-CA certificate
Connection details
Required permissions
Minimum
No grant at all. A role that can log in readssystem and system_schema, which covers keyspace inventory, replication factor, TTL, compaction, indexes, primary-key shape, and driver-visible node state.
Row reads
Changes
Agent capabilities
Once connected, Tony can:Verify the connection
Example prompts
Approved changes
Changes are not arbitrary CQL. The connection carries a fixed set of operations, and everything outside it is refused rather than approved.
Four things to know before you approve one:
- Every change reports what it measured. The agent shows the value it read before the change, the outcome, and the exact command that reverses it. Running that reversal is a second change and needs its own approval.
TRUNCATE,DROP TABLE,DROP KEYSPACE,ALTER KEYSPACE,GRANT, andALTER ROLEare absent. They are refusals, not approvals waiting to be granted. Ask the agent and it names the operation and what an operator would run instead.- A table setting change cannot be made conditional. Cassandra has no conditional
ALTER TABLE, so the agent reads the current value, changes it, then re-reads it and reports whether its own value survived. A writer inside that gap is overwritten without detection, and the output says so. - Nothing rolls back. Cassandra has no transaction. A delete writes a tombstone, so the row reads as absent at once and the space returns only after
gc_grace_secondsand compaction. A new TTL applies to rows written after the change, never to rows already stored.
Troubleshooting
Connection fails immediately
Connection fails immediately
- Check that Contact points carry no port and no scheme. The port belongs in its own field.
- Confirm Native transport port is the CQL port.
7199is JMX and7000is internode; neither answers here.
Authentication failed
Authentication failed
- Confirm the role exists and can log in:
LIST ROLES; - A role created without
WITH LOGIN = trueauthenticates nowhere. Recreate it orALTER ROLE cloudthinker WITH LOGIN = true;
Connected, but a keyspace looks empty
Connected, but a keyspace looks empty
Not necessarily an error. Keyspace and table metadata come from
system_schema and need no grant, so an empty table list means the keyspace holds no tables. An empty row read means the role lacks SELECT on that keyspace, or the partition genuinely holds nothing.TLS handshake fails
TLS handshake fails
- Amazon Keyspaces requires TLS on port
9142. Set both together. - For a self-signed or internal-CA certificate, keep Use TLS on
Yesand set Verify the TLS certificate toNo. The session stays encrypted; it no longer proves which server answered.
A change timed out
A change timed out
Cassandra returns a timeout both before and after a write commits, so the outcome is genuinely unknown and nothing is retried automatically. Ask the agent to re-read the row or setting, then decide from what that read reports. Never re-run the change to find out whether it applied.
An index was created but queries still fail
An index was created but queries still fail
A new secondary index answers queries only after its build finishes on every node. Give the build time, then ask again.
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- TLS carries the password — this connection sends the role name and password over the same socket as the query. Keep Use TLS on for anything outside a private network.
- Least-privilege role — a login role with no grant already answers inventory, schema, and health questions. Add
SELECT,MODIFY, andALTERper keyspace only when you need them, and never on the defaultcassandrasuperuser.
Related
Tony Agent
Database-focused optimization agent
Approval
How CloudThinker asks before a change