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
This will extract value from the SAML attribute `memberhip` into the Omni user's identity resource label with the
18
+
prefix `saml.omni.sidero.dev/groups`
19
+
Restart Omni, and log in using SAML. If you navigate to <b>Settings > Users</b>, you will now see your groups in a label.
20
+
If your SAML attribute memberships contains the values `group1` and `group2` you will see the following two labels (the interface omits the prefix `saml.omni.sidero.dev`)
21
+
22
+
```yaml
23
+
groups/group1
24
+
groups/group2
25
+
```
26
+
27
+
You can now create an ACL that will create an impersonation in Kubernetes using this group information:
28
+
29
+
```yaml
30
+
31
+
metadata:
32
+
namespace: default
33
+
type: AccessPolicies.omni.sidero.dev
34
+
id: access-policy
35
+
spec:
36
+
usergroups:
37
+
group1:
38
+
users:
39
+
- labelselectors:
40
+
- "saml.omni.sidero.dev/groups/group1="--< Do not forget the `=` sign postfix
41
+
clustergroups:
42
+
staging:
43
+
clusters:
44
+
- match: staging-*
45
+
production:
46
+
clusters:
47
+
- match: prod-*
48
+
rules:
49
+
- users:
50
+
- groups/group1
51
+
clusters:
52
+
- group/staging
53
+
- group/production
54
+
kubernetes:
55
+
impersonate:
56
+
groups:
57
+
- group1
58
+
```
59
+
60
+
The impersonate rule will make sure that you will have the right group assigned in kubernetes.
61
+
You can then use that information in a RoleBinding:
62
+
63
+
```yaml
64
+
apiVersion: rbac.authorization.k8s.io/v1
65
+
kind: RoleBinding
66
+
metadata:
67
+
name: group1-access
68
+
namespace: group1
69
+
roleRef:
70
+
apiGroup: rbac.authorization.k8s.io
71
+
kind: ClusterRole
72
+
name: admin <--- or any other ClusterRole of course.
0 commit comments