DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Access Management for Kubernetes (Part 1)

Access Management for Kubernetes (Part 1)

Want to learn more about access management for Kubernetes? Check out this post about the benefits of implementing a fine-grained access management solution in Kubernetes.

Mohit Jain user avatar by
Mohit Jain
·
Venky Karukuri user avatar by
Venky Karukuri
·
Sep. 21, 18 · Presentation
Like (6)
Save
Tweet
Share
3.29K Views

Join the DZone community and get the full member experience.

Join For Free

What Is Fine-Grained Access Management?

The need for implementing an access management solution mandates us to identify the resources that we want to protect. This is a resource that we may want to give different levels of protection, meaning the resource should be accessed only by a few privileged users. We would want to have control over who is accessing it and what do they want to DO with it. Typical operations on resources, for example, are ‘create, ‘read,' ‘update,’ and ‘delete’ CRUD operations.

Why Does Kubernetes Need Fine-Grained Access Management?

Before getting into access management in Kubernetes, we need to understand the resources that Kubernetes holds. Resources in Kubernetes are comprised of system nodes, pods, containers, volumes, cluster-info, metadata, and much more. Now that we know what needs to be protected in Kubernetes, it's time to ask ourselves a few questions about the security of our resources.

  • Should we treat each user equally?
  • Should there be a mechanism to identify users on the basis of the different level of privilege that each one has?
  • How can we allow a user to create pods if it doesn't have required privileges?
  • If a user has access to one resource inside the cluster does that mean it can access anything inside our cluster?

Do we have a problem here? Yes!

Our Solution

We have worked on an access management solution for Kubernetes using the CA Single Sign-On (SSO) by configuring a web-hook. The basic understanding of the solution is that, by default, each request that comes towards the Kubernetes cluster will be processed by an API server (Note: the API server is a pod that resides on the master node of the Kubernetes cluster). So, the API server is the single entry point for every request that comes into the cluster. We deployed a webhook on the master to intercept every incoming request and then redirect it to our service SSO for further authentication and authorization. Only when SSO sends an access granted response back to our webhook, then the intercepted request is allowed to be executed inside the cluster. Otherwise, the request is blocked with the appropriate response sent back to the user. A diagram is attached to get a better understanding of this solution.

Image title

Why Do We Need It?

Now, we have an idea of why is it important to have an access management solution for our cluster environment. But first, we should know about available solutions, along with the pros and cons.

Let us go over the benefits of our proposed solution:

  • No more use of Command Lines tool — there is one single interface to manage everything inside our cluster. 
  • Ease of management: There is no need to get inside the cluster configuration for changing any simple details like adding a new user.
  • Continue to focus on business app development without the need to worry about security.  

How Is it Different From What Kubernetes Has to Offer?

Kubernetes comes in with a default RBAC (Role Based Access Control) mode of authorization mechanism.

There are various problems related to this mechanism, such as

  • High level of access management: This default mechanism of Kubernetes is effective but not up to fine-grain level. It provides a sufficient amount of security measures, but if we are looking for a better and more secure solution, then this may not be the right choice.
  • Size of the cluster and manual workload: This mechanism makes you perform everything from the command line, and you have to rely heavily on your cluster administrator for performing every task. This problem becomes much larger when the size of the cluster grows and so does the number of users in your cluster.
  • Diversification of users and resources: The most important part about fine-grain access management is that it treats every user and resource differently which makes it question everything and offers much more control over cluster resources. This can't be achieved with existing command line tool, and even if it's possible then it will be a very tedious task  

How Does it Fit Into Your Existing Environment?

Usually every organization is equipped with on-premise single-sign-on solutions, like CA SSO, to protect their organization applications. Since you already have an on-premise SSO solution deployed, you can leverage the same solution to protect the Kubernetes resources as well.

The approach of using your existing SSO solution to protect Kubernetes resources helps you minimize cost of learning new solutions and the cost of staffing since your existing staff can continue to manage new Kubernetes resources.

The new webhook is being written in order to support this kind of integration with existing SSO environments. This webhook runs on the Master of your Kubernetes cluster and redirects the request to your SSO environment. It is assumed that your SSO environment is capable of checking if the received URL is protected or not based on the rules and policies that your SSO environment was configured with.

Conclusion

We have seen the need of fine-grained and effective access management, and also understood how the proposed solution works at a high level. We will be looking into how to integrate with your existing SSO solution taking an example of CA SSO in the next article.

Kubernetes cluster

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Kubernetes vs Docker: Differences Explained
  • OpenID Connect Flows
  • Differences Between Site Reliability Engineer vs. Software Engineer vs. Cloud Engineer vs. DevOps Engineer
  • How Do the Docker Client and Docker Servers Work?

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: