When you automate Confluent Cloud, create the right key for the surface: a Kafka cluster key for produce/consume and the data plane, a Schema Registry key for schemas, and a Cloud API key only for management calls. A cluster call with a Cloud API key fails auth. Prefer service-account-owned keys in production, and rotate by creating the new key, switching apps over, verifying via audit logs, then deleting the old one.

Context: Confluent Cloud API reference (docs.confluent.io/cloud/current/api.html): Confluent Cloud uses three API key categories. A Cloud API key grants access to the Cloud Management APIs such as provisioning and metrics. A resource-specific API key grants access to a single resource such as a Kafka cluster or a Schema Registry. A global API key spans services. Each key inherits the permissions of its owning principal, and keys are deleted automatically when the owner user or service account is deleted.