The goal: introduction into identity access management
-
Azure Active Directory (AAD) - platform to manage and secure identities (human and not):
- CRUD operations for identities (users and applications)
- Aggregate identities into groups
- CRUD operations for groups
- Manage identities permissions and authentication methods
- audit
AAD manages identities and their access rights to AAD itself.
-
Open AAD single user view and show:
- sign-ins and main information
- groups and roles management
- password and authentication
- audit
-
Open a Subscription Access Control view:
Check Access
: investigate your and others roles within your subscription scopeRole Assignments
: assign a role to identity or groupRoles
: view end edit roles. Note, pressing onView
link shows all the role permissions.
-
Role/permission is given to identity within a scope. Assignment involves the following steps:
- Determine who needs access (e.g. find identity): user, application, group
- Select role
- Select scope: subscription, resource group, or exact azure resource (service)
- Assign the role to the identity within the scope
Azure role-assignment guide.
Kubernetes uses similar concepts but under slightly different names.
Show all the following steps in kind: kind create cluster
.
-
Kubernetes could integrate with external Auth-providers (for example, AAD)
-
Identity
in Kubernetes: User (human), Service Account (application), Group (aggregation) -
Kubernetes scope consist of two parts: namespace and resource type (note, some resource types are not-namespaced)
-
Kubernetes offers
Role
(inside namespace only) andClusterRole
(available in the whole cluster).- Kubernetes roles coupled with REST api verbs
- Consist of policies list: which verb is allowed to which resource type
# get all cluster roles kubectl get ClusterRole # describe defaul admin role kubectl describe ClusterRole admin
-
Kubernetes can bind
Role
orClusterRole
to anIdentity
Role
could be bind to anIdentity
only in the scope of namespaceClusterRole
could be bind to anIdentity
cluster-wide or in one namespace only.
kubectl get clusterrolebindings kubectl describe clusterrolebindings ...
-
There are tools to help navigating RBAC world:
- native kubectl:
$ kubectl auth can-i delete namespace Warning: resource 'namespaces' is not namespace scoped yes $ kubectl auth can-i delete ns --as joe Warning: resource 'namespaces' is not namespace scoped no
- who-can,
- rbac-lookup,
- or kubernetes IDEs (k9s, lens)