Skip to main content
This is a per-Kafka-cluster step. Do it after the Confluent Cloud Kafka cluster exists, either because it already existed or because Terraform created it.
ⓘINFO
This is not a first-install prerequisite. Before installing Sariva, you only need the Confluent Cloud org-level Cloud API key and metrics key from Confluent Cloud prerequisites. Per-cluster Kafka credentials are created after each Kafka cluster exists.

On the VM path

There is no Terraform and no GitHub Actions on the VM path, so the GitOps flow on this page does not apply. For each cluster, create a read-only Kafka API key yourself — it needs exactly four describe-only ACLs: Cluster:DESCRIBE, Topic:DESCRIBE, Topic:DESCRIBE_CONFIGS, Group:DESCRIBE — save it as a JSON file in ./secrets, and reference it as file:///app/secrets/<name>.json. See file:// and env:// references.

The identities involved

Admin key vs observability key

Do not conflate these Kafka credentials.
⚠WARNING
The Sariva platform pod should read only the observability credential. The admin credential is for GitHub Actions / Terraform and must not be granted to the pod.

Secret naming convention

Use the generated GitOps matrix path:
Examples:
AWS Secrets Manager appends a random suffix to the ARN. Look up secrets by name when operating manually, and use an IAM resource pattern with a trailing wildcard when granting access, for example:

Correct order

Use this sequence for a newly provisioned Confluent Cloud Kafka cluster:
  1. Environment layer apply creates the Confluent Cloud Kafka cluster.
  2. Customer creates the admin Kafka key and stores it at <stage>/<env>/clusters/<cluster>/kafka-admin.
  3. Cluster layer apply reads the admin key from AWS Secrets Manager or SSM, configures topics/ACLs, and creates the observability credential.
  4. Observability credential output points to <stage>/<env>/clusters/<cluster>/observability-reader.
  5. GitOps workflow watcher updates Sariva with the credentials_ref.
  6. Sariva moves the Kafka cluster from awaiting_credentials to resolved.

1. Create the admin Kafka key manually

Today, the customer/operator creates the admin Kafka credential manually after the Kafka cluster exists. A later Sariva phase may automate this through a bootstrap Terraform layer, but do not assume that path today. Create or select a customer-owned Confluent Cloud service account for Terraform, for example:
Grant that service account CloudClusterAdmin on the Kafka cluster:
Create a Kafka API key scoped to the Kafka cluster for that service account:
Store the admin Kafka key/secret in your selected customer-owned credential store.

AWS Secrets Manager admin key

AWS SSM admin key

ⓘINFO
For the AWS-native path, do not store this admin Kafka key as a GitHub repository secret. GitHub Actions reads it from AWS Secrets Manager or SSM through its OIDC role. The Sariva platform pod does not need this admin credential.

2. Let Sariva create the observability key

After the admin key exists and GitHub Actions can read it, ask Sariva to create the runtime observability credential. For example:
Sariva opens a GitOps pull request. After approval and apply, Terraform:
  • uses the org Cloud API key for Confluent Cloud service-account/API-key/RBAC operations;
  • uses the admin Kafka key where Kafka ACL/topic work is required;
  • creates a Kafka API key under the single Sariva service account used for Sariva platform access;
  • applies the required RBAC or ACL authorization for observability;
  • writes the observability credential to <stage>/<env>/clusters/<cluster>/observability-reader;
  • emits the credentials_ref consumed by the workflow watcher.
ⓘINFO
The exact authorization can vary by Confluent Cloud cluster tier. Basic clusters may require Kafka ACLs where resource-scoped RBAC roles are not supported. Standard, Dedicated, and Enterprise clusters can use RBAC where supported. The customer-facing invariant is the same: Sariva creates a least-privilege observability credential and stores only a reference in Sariva.

3. Permissions required for AWS-backed credential stores

When AWS Secrets Manager or SSM is used, two AWS identities are involved.
!DANGER
Do not grant the pod AWS identity access to <stage>/<env>/clusters/<cluster>/kafka-admin. If the pod can read the admin key, the runtime has more Kafka privilege than it needs.
Set the GitHub Actions permissions on AWS S3/DynamoDB state with GitHub Actions and the runtime read permissions on Wire the pod’s AWS identity.

4. Confirm Sariva sees the credential reference

After the workflow applies, check the Kafka cluster lifecycle from your laptop:
Expected lifecycle after the observability credential is available:
If the Kafka cluster is still awaiting_credentials, attach or update the reference explicitly:

Manual read-only fallback

If you are not using the GitOps observability credential module, create a read-only Kafka API key manually, store it in the selected credential store, grant the pod read access to that credential, and patch the Kafka cluster with the credential reference. On the VM path, store it as a JSON file in ./secrets and use a file:// reference — see file:// and env:// references. The general flow is documented in Overview — connecting a Kafka cluster.