Blogg
Här finns tekniska artiklar, presentationer och nyheter om arkitektur och systemutveckling. Håll dig uppdaterad, följ oss på LinkedIn
Här finns tekniska artiklar, presentationer och nyheter om arkitektur och systemutveckling. Håll dig uppdaterad, följ oss på LinkedIn
Not long ago, I passed the KCSA(Kubernetes Cloud Native Security Associate) Exam, and thought that I could share some pointers about my experience in this post.
As you might expect, the KCSA exam is primarily focused on Kubernetes and its role in securing your cluster. However, it also delves into topics such as managing your cloud platform, containers, and the code they run.
Since it’s an Associate certificate, the topics are more focused on breadth instead of depth. This is great for those who want to dip their toes into IT security, want a clearer picture of the problem space, and maybe even as a first step toward a more focused effort in the world of security.
This exam was a great way to broaden my security perspective, get a clearer picture, and increase the size of the known-knowns in my knowledge sphere of security.
While optional, a basic understanding of Kubernetes and familiarity with cloud development and Linux computers make understanding the different areas tested easier.
The exam itself is remotely proctored, meaning it doesn’t require a dedicated test center, so it can be taken at home. It consists of 60 multiple-choice questions over a 90-minute duration, so all you need to take the exam is a stable network and a provided test browser.
With that said, let’s do a quick overview of the different areas and see what they contain and if they’re useful to you.
In order to pass the KCSA, it’s important to be comfortable with the basics of cloud-native security. A good first step is to examine the concept of “the 4 C’s” (Cloud, Cluster, Container, Code).
Each of the 4 Cs layers comes with its own security risks and attack surfaces that we need to be aware of and know how to counter. The layers talk about security from top to bottom, how to secure our cloud infrastructure, the Kubernetes cluster we manage, the containers we deploy, and the code we run inside them.
These layers will also be the foundation that supports the rest of the know-how the exam tests, so to build up our foundation, we start with the following topics.
Example questions:
In the context of cloud native security, what does “shift left” refer to?
Which of the following is NOT a key principle of cloud native security?
While the first section paints with broad strokes, we will now pull out our magnifying glass and look closer at the components inside Kubernetes itself and how the various elements are utilized from a security point of view.
Given that this section, along with the subsequent Wing K8s security foundation, accounts for a significant 44% of the exam, it demands some extra time and effort.
While you don’t have to know every detail of every component, make sure you understand the responsibility of the different parts and how they integrate with each other for different flows in the cluster. Who assigns new pods to a suitable Node? (Scheduler). Who can validate an external delete request? (API server), and so on. The components the exam covers are:
The different components we need to know:
Example questions:
Which Kubernetes component is responsible for scheduling pods on nodes?
What is the primary function of etcd in a Kubernetes cluster?
Now that we have a good grasp of Kubernetes’s components, this section will test your knowledge of how to secure these components and our cluster in a broader sense.
How can we implement proper access controls and secure our configuration and sensitive data?
What does it mean when we speak about the different pod security standards, and when should we enforce the Privileged, Baseline, or Restricted standard?
This section, while still within the Kubernetes scope, examines the cluster as a whole instead of each individual component.
The concepts to read up on for this domain are:
Example questions:
Which Kubernetes object is used to define fine-grained access controls?
What is the purpose of a ServiceAccount in Kubernetes?
The Kubernetes Threat Model section focuses on understanding potential security risks and implementing measures to mitigate them. It covers various aspects of securing Kubernetes and our surrounding environment against threats.
Threat modeling is about being proactive and predictive, understanding the different attack surfaces of our system and trying to anticipate what a bad actor could use as leverage during an attack.
We can find some reading material for Kubernetes threat modeling in the following areas:
Example questions:
Which of the following is considered an internal threat to a Kubernetes cluster?
In the context of Kubernetes threat modeling, what does “blast radius” refer to?
Here we are, nearing the end. After digging around in the cluster itself, this domain will instead focus on the surrounding platform and systems.
A secure cluster is all well and good, but it will do us no good if the platform it runs on is wide open to attackers or if the code and containers we deploy are full of malicious code and exploits. This section talks about how we can trust our different integration points to our cluster, feel confident in the code we run, and hopefully sleep well at night, knowing no bad actors are rooting around in our environment.
This Domain covers:
Example questions:
Which of the following is NOT typically considered part of platform security in a Kubernetes environment?
What is the purpose of using a container-specific operating system in a Kubernetes environment?
Last, and also least in terms of weight: Frameworks.
The frameworks covered in this domain are essential in setting up and maintaining the best practices and standards of the security industry, ensuring we are covering our bases and keeping up with an ever-evolving field of security safeguarding.
For the purpose of this exam, it’s important to be familiar with certain frameworks, such as NIST, OWASP, STRIDE, and GDPR. Similarly, understanding the role of tools like Falco, Aqua, and Gvisor in automating our checklists and compliance validation is crucial.
While the exam doesn’t require us to know every detail of every tool mentioned, a general understanding of the landscape and which tool to apply to different situations will be part of it.
So for the final domain, we cover the following topics:
Example questions:
Which of the following is NOT a common compliance framework relevant to Kubernetes environments?
What is the primary purpose of the CIS Kubernetes Benchmark?
So, what does it take to pass the exam?
In terms of preparations, I would say that reading through the official documentation and understanding the different domains and topics listed will already get you 80% of the way.
If you, like me, prefer moving pictures, following a video course like KodeCloud together with some reading will undoubtedly set you up for success.
And lastly, the preparation icing on the exam cake - go through a couple of practice exams - My choice was an exam prep course from Udemy (which is no longer available, replaced with newer versions). The questions from here matched the real exam quite well, indicating how well I had mastered the material.
To pass the KCSA exam, you must dedicate a little over a week’s work. I paced my study time out over around a month, doing around an hour of work every other day or so, and in the end, I was fairly certain of my ability to pass.
Hopefully, this has given you a sense of what a KCSA exam entails and whether it’s something worth looking into for yourself.
And if you do decide to take the exam, I wish you good luck and have fun.
Which Kubernetes feature helps in implementing the principle of least privilege for pods?
What is the recommended way to handle secrets in a Kubernetes environment?
Which component is responsible for enforcing network policies in a Kubernetes cluster?
What is the purpose of Pod Security Standards in Kubernetes?
In the context of Kubernetes security, what does “4C’s” refer to? a) Cloud, Clusters, Containers, and Code b) Compute, Connectivity, Control, and Compliance c) Configuration, Credentials, Cryptography, and Continuity d) Create, Configure, Commit, and Control
Which of the following is a best practice for securing a Kubernetes cluster?
What is the primary purpose of Open Policy Agent (OPA) in a Kubernetes environment?
Which of the following is NOT a typical responsibility of a Container Runtime Interface (CRI) implementation?
What is the purpose of using admission controllers in Kubernetes?
Which of the following tools is commonly used for scanning container images for vulnerabilities?