Skip to content

Commit fc89745

Browse files
authored
[HWORKS-2243] add more detail (#494)
1 parent 30421dd commit fc89745

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/setup_installation/admin/roleChaining.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In this document we will see how to configure AWS and Hopsworks to use Role chai
1010
Before you begin this guide you'll need the following:
1111

1212
- A Hopsworks cluster running on EKS.
13-
- Enabled IAM OpenID Connect (OIDC) provider for your cluster.
13+
- Enabled IAM [OpenID Connect (OIDC) provider](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html) for your cluster.
1414
- Administrator account on the Hopsworks cluster.
1515

1616
### Step 1: Create an IAM role and associate it with a Kubernetes service account
@@ -21,6 +21,18 @@ For more details on how to create an IAM roles for Kubernetes service accounts s
2121
!!!note
2222
To ensure that users can't use the service account role and impersonate the roles by their own means, you need to ensure that the service account is only attached to the hopsworks instance pods.
2323

24+
```sh
25+
account_id=$(aws sts get-caller-identity --query "Account" --output text)
26+
oidc_provider=$(aws eks describe-cluster --name my-cluster --region $AWS_REGION --query "cluster.identity.oidc.issuer" --output text | sed -e "s/^https:\/\///")
27+
28+
```
29+
30+
31+
```sh
32+
export namespace=hopsworks
33+
export service_account=my-service-account
34+
35+
```
2436

2537
```json
2638
{
@@ -89,7 +101,7 @@ For the service account role to be able to impersonate the roles you also need t
89101
]
90102
}
91103
```
92-
<figcaption>Example trust-policy document.</figcaption>
104+
<figcaption>Example resource roles.</figcaption>
93105

94106
### Step 3: Create mappings
95107
Now that the service account IAM role can assume the roles we need to configure Hopsworks to delegate access to the roles on a project base.

0 commit comments

Comments
 (0)