Skip to content

Commit 0770b4d

Browse files
configure role permissions
1 parent c44d4e8 commit 0770b4d

File tree

1 file changed

+85
-3
lines changed

1 file changed

+85
-3
lines changed

content/operate/kubernetes/active-active/global-config.md

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ The [REAADB API reference]({{<relref "/operate/kubernetes/reference/redis_enterp
4848

4949
This section edits the secrets under the REAADB `.spec.globalConfigurations` section. For more information and all available fields, see the [REAADB API reference]({{<relref "/operate/kubernetes/reference/redis_enterprise_active_active_database_api">}}).
5050

51-
5251
1. On an existing participating cluster, generate a YAML file containing the database secret with the relevant data.
5352

5453
This example shoes a secret named `my-db-secret` with the password `my-password` encoded in base 64.
@@ -87,7 +86,7 @@ This section edits the secrets under the REAADB `.spec.globalConfigurations` sec
8786

8887
1. On each other participating cluster, check the secret status.
8988

90-
``sh
89+
```sh
9190
kubectl get reaadb <reaadb-name> -o=jsonpath='{.status.secretsStatus}'
9291
```
9392

@@ -103,4 +102,87 @@ This section edits the secrets under the REAADB `.spec.globalConfigurations` sec
103102
kubectl apply -f <db-secret-file>
104103
```
105104

106-
1. Repeat the previous two steps on every participating cluster.
105+
1. Repeat the previous two steps on every participating cluster.
106+
107+
## Configure role permissions
108+
109+
You can configure role-based access control (RBAC) permissions for Active-Active databases using the `rolesPermissions` field in the REAADB `.spec.globalConfigurations` section. The role permissions configuration is propagated across all participating clusters, but the underlying roles and Redis ACLs must be manually created on each cluster.
110+
111+
{{<note>}}You must manually create the specified roles and Redis ACLs on all participating clusters before configuring role permissions. The operator only propagates the role permissions configuration—it does not create the underlying roles and ACLs. If roles or ACLs are missing on any cluster, the operator will log errors until they are manually created.{{</note>}}
112+
113+
### Prerequisites
114+
115+
Before configuring role permissions:
116+
117+
1. Manually create the required roles and Redis ACLs on all participating clusters using the Redis Enterprise admin console or REST API.
118+
2. Ensure role and ACL names match exactly across all clusters (names are case-sensitive).
119+
3. Verify that roles and ACLs are properly configured on each cluster.
120+
121+
{{<warning>}}The operator does not automatically create or synchronize roles and ACLs across clusters. You are responsible for manually creating identical roles and ACLs on each participating cluster.{{</warning>}}
122+
123+
### Add role permissions to REAADB
124+
125+
1. Create or update your REAADB custom resource to include `rolesPermissions` in the global configurations.
126+
127+
Example REAADB with role permissions:
128+
129+
```yaml
130+
apiVersion: app.redislabs.com/v1alpha1
131+
kind: RedisEnterpriseActiveActiveDatabase
132+
metadata:
133+
name: reaadb-boeing
134+
spec:
135+
globalConfigurations:
136+
databaseSecretName: <my-secret>
137+
memorySize: 200MB
138+
shardCount: 3
139+
rolesPermissions:
140+
- role: <role-name>
141+
acl: <acl-name>
142+
type: redis-acl
143+
participatingClusters:
144+
- name: rerc-ohare
145+
- name: rerc-reagan
146+
```
147+
148+
Replace `<role-name>` and `<acl-name>` with the exact names of your Redis Enterprise role and ACL.
149+
150+
2. Apply the REAADB custom resource:
151+
152+
```sh
153+
kubectl apply -f <reaadb-file>
154+
```
155+
156+
Alternatively, patch an existing REAADB to add role permissions:
157+
158+
```sh
159+
kubectl patch reaadb <reaadb-name> --type merge --patch \
160+
'{"spec": {"globalConfigurations": {"rolesPermissions": [{"role": "<role-name>", "acl": "<acl-name>", "type": "redis-acl"}]}}}'
161+
```
162+
163+
3. Verify the REAADB status shows `active` and `Valid`:
164+
165+
```sh
166+
kubectl get reaadb <reaadb-name>
167+
168+
NAME STATUS SPEC STATUS GLOBAL CONFIGURATIONS REDB LINKED REDBS
169+
reaadb-boeing active Valid
170+
```
171+
172+
4. Check the operator logs to confirm role permissions are applied:
173+
174+
```sh
175+
kubectl logs -l name=redis-enterprise-operator
176+
```
177+
178+
Look for log messages indicating "patching local BDB roles permissions" on each participating cluster.
179+
180+
### Troubleshooting role permissions
181+
182+
If you encounter issues with role permissions:
183+
184+
- **Missing role or ACL errors**: Manually create the specified roles and ACLs on all participating clusters with exact name matches. The operator cannot create these automatically.
185+
- **Permission propagation failures**: Verify that the roles and ACLs are properly configured and accessible on each cluster. Remember that you must manually create identical roles and ACLs on every participating cluster.
186+
- **Case sensitivity issues**: Verify that role and ACL names match exactly, including capitalization, across all clusters.
187+
188+
For more details on the `rolesPermissions` field structure, see the [REAADB API reference]({{<relref "/operate/kubernetes/reference/redis_enterprise_active_active_database_api#specglobalconfigurationsrolespermissions">}}).

0 commit comments

Comments
 (0)