Authorizing Using RBAC and ACLs
Your identities will need access to Confluent Cloud, whether it is to create applications or send and receive data. Allowing them to access your cluster as easily as possible is important to how well your business runs. At the same time, your access model needs to be structured in a way where you can easily add, remove, change, and verify permissions.
Authorization is where you will make sure that your authenticated users have the access they should have, and no more or no less. It is not unheard of to have to authorize hundreds, thousands, or even tens of thousands of identities. If you’ve ever used the open source implementation of Kafka, you may be familiar with the burdensome process of having to create an LDAP store to configure your group, role, and user hierarchies, then applying ACL based on the group and role hierarchies, and finally implementing a custom authorizer that pairs the groups and users in LDAP with those in Kafka.
None of that extra effort is necessary with Confluent Cloud. Instead, there are two methods for authorizing your identities: access control lists (ACLs), and role-based access control (RBAC).
ACLs
ACLs are tables that store identities and what they can do or see (the resources they can access and permissions they have) within Confluent Cloud. The important thing to remember is that permissions are tied to each identity and linked to the access they have been given for each resource. If an identity changes teams or scope, you will have to make sure to address things at an individual level. If at any point even one of these changes is missed, or configured incorrectly, you now have identities that have access to more than what they should.
This problem is only made worse as the number of identities in your organization increases. Verifying permissions for compliance with laws and regulations can become quite a labor-intensive and time-consuming process, not to mention a potential security risk.
ACLs are specific to Kafka resources and don’t extend to other Confluent Cloud concepts, such as environments and organizations. Managing ACLs for a small number of identities likely isn’t a big deal. However, if you are working with a large organization with hundreds or thousands of identities, using ACLs doesn’t scale. You’re left with the second option for organizing identities, role-based access control.
Note that because ACLs are stored in the Kafka controllers and propagated to the brokers, there may be a delay before the change takes effect, even after the command returns.
RBACs
RBACs allow you to configure predefined roles within your organization. Identities are assigned to a role and gain access to an organization, environment, cluster, or specific Kafka resources like topics, consumer groups, and transactional IDs based on that role.
For example, imagine a user, Milton, who is part of a group of users that require access to read data from your Purchases topic. Using ACLs, Milton’s identity is granted permission to access the read data. If tomorrow Milton also requires access to the read data from a topic called Returns, that permission must be added to Milton’s user identity (and the identity of everyone else who also now needs access).
Using RBACs, Milton is assigned to the DeveloperRead role. Each identity assigned to the DeveloperRead role has access to read data from the Purchase topic. Adding access to the Returns topic can be achieved by changing the DeveloperRead role scope to now include access to the Returns topic. Every identity within that role gains the correct access.
As opposed to ACLs, RBAC integrates with a centralized identity management system and allows much simpler scaling for large organizations. From a compliance perspective, it’s safer and simpler to verify your RBAC roles to prove compliance than to attempt to confirm each individual ACL identity.
RBAC roles
Confluent Cloud has the following roles preconfigured. You may want to reference the documentation for more in-depth details on each of these roles.
| Predefined RBAC role | Manage API keys resource-scoped to |
|---|---|
| OrganizationAdmin | Clusters (Kafka, ksqlDB, and Schema Registry) and Flink in the organization and resource management APIs. |
| EnvironmentAdmin | Clusters (Kafka, Schema Registry and ksqlDB) and Flink regions owned by the principal. |
| CloudClusterAdmin | Kafka clusters owned by the principal. |
| Operator | Clusters (Kafka, Schema Registry, Flink, and ksqlDB) owned by the principal. |
| NetworkAdmin | |
| MetricsViewer | |
| ResourceOwner | Clusters (Kafka, ksqlDB, and Schema Registry) owned by the principal. |
| DeveloperManage | Clusters (Kafka, ksqlDB, and Schema Registry) owned by the principal. |
| DeveloperRead | Clusters (Kafka, ksqlDB, and Schema Registry) owned by the principal. |
| DeveloperWrite | Clusters (Kafka, ksqlDB, and Schema Registry) owned by the principal. |
| DataDiscovery | Schema Registry clusters owned by the principal. |
| KsqlAdmin | ksqlDB clusters that the principal has access to. |
| ResourceKeyAdmin | Clusters (Kafka, ksqlDB, and Schema Registry) and Flink regions the principal has access to, but cannot create API keys for itself. |
Administration roles
- AccountAdmin
- BillingAdmin
- CloudClusterAdmin
- ConnectManager
- DataSteward
- EnvironmentAdmin
- FlinkAdmin
- KsqlAdmin
- NetworkAdmin
- OrganizationAdmin
- ResourceKeyAdmin
- ResourceOwner
Application development roles
Predefined RBAC roles in Confluent Cloud | Confluent Documentation
RBAC Considerations
Also, there are a couple of things to keep in mind as you use RBAC in Confluent Cloud:
- RBAC permissions for operations on granular Kafka resources (topics, consumer groups, and transactional IDs) are supported only on Standard, Enterprise, Dedicated, and Freight clusters.
- To create service accounts, you must be granted the OrganizationAdmin role. All the other cluster administration roles (EnvironmentAdmin, CloudClusterAdmin, and ResourceOwner) can grant or revoke permissions for existing service accounts on the resources that they control.
- Role bindings are limited like every other resource on Confluent Cloud. You will want to check the official documentation to see the current guidance.
- You must use version 2.8.1 or later of the Confluent CLI to manage RBAC roles.
- When SSO is enabled for an organization, a default group mapping (
all-sso-users) is applied to all SSO user accounts and binds them to two predefined RBAC roles (FlinkDeveloper and DataDiscovery) that provide default user permissions to access Confluent Cloud resources in an SSO-enabled organization. These default user permissions can be customized by administrators. For more information, see Default user permissions. - To use the Confluent Cloud Console or Confluent CLI, a user must be assigned at least one role.
- To allow a principal to inspect topics and view messages using the Confluent Cloud Console, you must minimally grant that account the DeveloperRead role.
- If a user or service account is deleted, all API keys and role bindings associated with that user or service account are also deleted.
Considerations
- If you use OAuth for authentication you will be creating identity pools for your principals. There are two parts to every identity pool: who can use the pool, and what the pool can access. The “who” is a set of conditions that the identity needs to satisfy in order to use the pool. The “what” is defined by ACLs and RBAC roles.
- You can use a mix of ACLs and RBACs. This may be helpful if you need to provide a small set of identities with access to a resource in your Confluent Cloud cluster. However, as an investment in the future, we recommend going with RBACs over ACLs.
ACLs and RBAC Order of Precedence
As both ACLs and RBAC provide authorization, there is an order of precedence in granting access:
- ACL DENY rules are applied first. If an ACL DENY is applied, then access is denied regardless of any ACL ALLOW rules and RBAC role bindings.
- ACL ALLOW and RBAC roles are applied. All RBAC roles are ALLOW.
When there are no ACL DENY rules that apply: