
What if the Kubernetes API could be used as an Authentication and Authorisation server? If a Role grants access to create and delete Pods, you won't be able to amend Secrets, or create ConfigMaps - for example.Ĭould you use Service Accounts as a mechanism to authenticate requests between apps in the cluster? Service Accounts are then linked to Roles that grant access to resources. Users and Pods can use those identities as a mechanism to authenticate to the API and issue requests. In Kubernetes, you assign identities using Service Accounts. Kubernetes as an authentication and authorization server You might not have noticed, but Kubernetes offers the same primitives for implementing authentication and authorization with Service Accounts, Roles and RoleBindings.


Authenticate the caller - The caller should have a valid and verifiable identity.You could roll out your authentication and authorisation mechanism such as mutual TLS certificates.Īll the authentication and authorisation servers have to do is to:.In this case, there is no need for running a dedicated authentication server. You could use static tokens that don't expire.You have several options when it comes to implementing this authentication mechanism:
