Access Policies (ACLs)
Reference documentation for ACLs.
ACLs are used to control fine-grained access policies of users to resources; and are validated, stored, and evaluated as an AccessPolicy
resource in Omni.
At the moment, only Kubernetes cluster access (group impersonation) is supported.
Structure
AccessPolicy
AccessPolicy
The AccessPolicy
is a single resource containing a set of user groups, a set of cluster groups, a list of matching rules and a list of tests.
metadata.namespace
string
Always set to default
.
metadata.type
string
AccessPolicies.omni.sidero.dev
.
metadata.id
string
Always set to access-policy
.
spec.usergroups
Map of user group names to user group definitions.
spec.clustergroups
Map of cluster group names to cluster group definitions.
spec.rules
array
spec.tests
array
UserGroup
UserGroup
A UserGroup
is a group of users.
users
array
User
User
A User
is a single user.
name
string
User identity used to authenticate to Omni.
match
string
labelselectors
array
List of label selector strings.
Note: name
, match
and labelselectors
are mutually exclusive. Only one of them can be set to a non-zero value.
ClusterGroup
ClusterGroup
A ClusterGroup
is a group of clusters.
clusters
array
Cluster
Cluster
A Cluster
is a single cluster.
name
string
Cluster name (ID).
match
Note: name
and match
are mutually exclusive. Only one of them can be set to a non-zero value.
Rule
Rule
A Rule
is a set of users, clusters and Kubernetes impersonation groups.
The reserved prefix group/
is used to reference a user group in users
or a cluster group in clusters
.
users
array
clusters
array
role
enum
kubernetes.impersonate.groups
array
List of string
s representing Kubernetes impersonation groups.
Role
Role
A Role
is the role to grant to the user.
Possible values: None
, Reader
, Operator
, Admin
.
Test
Test
A Test
is a single test case.
Test cases are run when the resource is created or updated, and if any of them fail, the operation is rejected.
name
string
Human-friendly test case name.
user
User identity to use in the test.
cluster
Cluster to use in the test.
expected
Expected result.
TestUser
TestUser
A TestUser
is the user identity to use in a test case.
name
string
User identity to use in the test.
labels
map[string]string
Map of label names to label values.
TestCluster
TestCluster
A TestCluster
is the cluster to use in a test case.
name
string
Cluster name (ID).
Expected
Expected
An Expected
is the expected results of a test case.
role
enum
kubernetes.impersonate.groups
array
List of string
s representing Kubernetes impersonation groups.