You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/book/src/topics/multitenancy.md
+36-8Lines changed: 36 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ For details, see the [multi-tenancy proposal](https://github.com/kubernetes-sigs
6
6
7
7
For multi-tenancy support, a reference field (`identityRef`) is added to `AWSCluster`, which informs the controller of which identity to be used when reconciling the cluster.
8
8
If the identity provided exists in a different AWS account, this is the mechanism which informs the controller to provision a cluster in a different account.
9
+
Identities should have adequate permissions for CAPA to reconcile clusters.
9
10
10
11
11
12
```yaml
@@ -179,6 +180,41 @@ spec:
179
180
name: multi-tenancy-role
180
181
```
181
182
183
+
184
+
### Necessary permissions for assuming a role:
185
+
186
+
There are multiple AWS assume role permissions that need to be configured in order for the assume role to work:
187
+
- The source identity (user/role specified in the source identity field) should have IAM policy permissions that enable it to perform sts:AssumeRole operation.
188
+
```json
189
+
{
190
+
"Version": "2012-10-17",
191
+
"Statement": [
192
+
{
193
+
"Effect": "Allow",
194
+
"Action": "sts:AssumeRole",
195
+
"Resource": "*"
196
+
}
197
+
]
198
+
}
199
+
```
200
+
201
+
- The target role (can be in a different AWS account) must be configured to allow the source user/role (or all users in an AWS account) to assume into it by setting a trust policy:
This is a deployable example which uses the `AWSClusterRoleIdentity` "test-account-role" to assume into the `arn:aws:iam::123456789:role/CAPARole` role in the target account.
@@ -239,14 +275,6 @@ In order to use the [EC2 template](../../../../templates/cluster-template.yaml)
239
275
240
276
Similarly, to use the [EKS template](../../../../templates/cluster-template-eks.yaml) with identity type, you can add the `identityRef` section to `kind: AWSManagedControlPlane` spec section in the template. If you do not, CAPA will automatically add the default identity provider (which is usually your local account credentials).
241
277
242
-
#### Permissions
243
-
244
-
There are multiple AWS assume role permissions that need to be configured in order for the assume role to work
245
-
- The Primary role in the management account must be allowed to assume role into the target role account
246
-
- This is traditionally the controller role, but the operator can configure it to be any role
247
-
- The target account role must be configured to allow the management role to assume into it
248
-
- The target account role must have adequate permissions for cluster-api to build both EC2 and EKS based clusters
249
-
250
278
## Secure Access to Identities
251
279
`allowedNamespaces`field is used to grant access to the namespaces to use Identities.
252
280
Only AWSClusters that are created in one of the Identity's allowed namespaces can use that Identity.
0 commit comments