Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cassandra users when corresponding secrets are updated #577

Closed
2 tasks
adejanovski opened this issue Oct 4, 2023 · 3 comments
Closed
2 tasks

Update Cassandra users when corresponding secrets are updated #577

adejanovski opened this issue Oct 4, 2023 · 3 comments
Labels
done Issues in the state 'done'

Comments

@adejanovski
Copy link
Contributor

cass-operator manages the creation of users in Cassandra based on secrets that are referenced in the CassandraDatacenter spec:

  superuserSecretName: test-superuser
  users:
    - secretName: test-reaper
      superuser: true

In order to support credentials rotation, we need to monitor these secrets and update the credentials in Cassandra accordingly through the management api as part of the reconcile.
We also need to support recreating the credentials in case of a remote restore using Medusa. In this case we do not restore the system_auth keyspace, but since we're changing the token assignments the actual entries in the sstables may not end up on the nodes replicating the associated tokens. We need to force the recreation of the users through the same mechanism, by doing a bogus update on the user secrets in order to trigger the operation.

Definition of Done

Preview Give feedback
@burmanm
Copy link
Contributor

burmanm commented Oct 4, 2023

All of this should be implemented already in cass-operator. cass-operator watches secrets set in superUserSecretName and Users.

https://github.com/k8ssandra/cass-operator/blob/master/internal/controllers/cassandra/cassandradatacenter_controller.go#L231

@adejanovski
Copy link
Contributor Author

Dang! It's already handled indeed, and I only learn this now 😅
One less thing to implement, nice!

@github-project-automation github-project-automation bot moved this to Done in K8ssandra Oct 4, 2023
@adejanovski adejanovski added the done Issues in the state 'done' label Oct 4, 2023
@burmanm
Copy link
Contributor

burmanm commented Oct 4, 2023

I had planned to make some changes to the user process, through

https://github.com/k8ssandra/cass-operator/pull/358/files

Since k8ssandra-client has users modification features (just lacks TLS support).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Issues in the state 'done'
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants