Learning Library

← Back to Library

Enterprise Container Security Best Practices

Key Points

  • Transitioning from VMs to containers introduces new attack surfaces, including container images, image registries, runtimes, orchestration platforms, and the shared host OS kernel.
  • Secure images by regularly updating them with patches, continuously scanning for vulnerabilities, and cryptographically signing them to verify authenticity.
  • Protect image registries by keeping them private, enforcing strict access controls, monitoring for emerging threats, and hardening the registry host server.
  • Enhance container runtime security by adopting tools that inspect internal container activity—not just network traffic—and by integrating runtime monitoring with broader security policies.
  • Implement consistent, layered security practices across images, registries, runtimes, orchestration, and the host OS to mitigate risks throughout the container lifecycle.

Full Transcript

# Enterprise Container Security Best Practices **Source:** [https://www.youtube.com/watch?v=b_euX_M82uI](https://www.youtube.com/watch?v=b_euX_M82uI) **Duration:** 00:06:50 ## Summary - Transitioning from VMs to containers introduces new attack surfaces, including container images, image registries, runtimes, orchestration platforms, and the shared host OS kernel. - Secure images by regularly updating them with patches, continuously scanning for vulnerabilities, and cryptographically signing them to verify authenticity. - Protect image registries by keeping them private, enforcing strict access controls, monitoring for emerging threats, and hardening the registry host server. - Enhance container runtime security by adopting tools that inspect internal container activity—not just network traffic—and by integrating runtime monitoring with broader security policies. - Implement consistent, layered security practices across images, registries, runtimes, orchestration, and the host OS to mitigate risks throughout the container lifecycle. ## Sections - [00:00:00](https://www.youtube.com/watch?v=b_euX_M82uI&t=0s) **Securing Enterprise Container Migration** - The speaker outlines key container security challenges—including vulnerable images, registries, runtimes, orchestration platforms, and the host OS—and advises practices such as keeping images up‑to‑date to reduce risks when enterprises shift from VMs to containers. - [00:03:03](https://www.youtube.com/watch?v=b_euX_M82uI&t=183s) **Securing Container Runtime & Host** - The speaker stresses monitoring application, network, host, and orchestration layers while leveraging Kubernetes/OCP access controls and employing a minimal, SELinux‑hardened host OS to reduce container‑runtime vulnerabilities. - [00:06:23](https://www.youtube.com/watch?v=b_euX_M82uI&t=383s) **Recap: Container Security Tools** - The speaker reviews container vulnerabilities and open‑source security solutions, then encourages viewers to engage, subscribe, and explore IBM Cloud Labs for hands‑on Kubernetes learning. ## Full Transcript
0:00As you are modernizing your enterprise, how do you mitigate the risks 0:03and vulnerabilities associated with transitioning into a container architecture? 0:07Hi, my name is Charles and I'm a Cloud Developer here with IBM Cloud. 0:11Today, I'm going to give you a general overview and an introduction to how you can begin 0:15to secure your container environment. 0:17Let's say that you're an enterprise and you're using VMs to host your application code 0:23and you want to transition into using containers. 0:27Containers are really great because they allow you 0:30to smoothen the application development pipeline and they can be deployed just about anywhere. 0:35However, because of this flexibility of being able to deploy just about anywhere, 0:39a whole new variety of attack services exist surrounding the container environment. 0:45Some of these include the images that you use to build your containers; the image registries 0:54that we use to store our images in; the container run times 1:03which we use to execute our containers. 1:09And, the orchestration platforms which we use 1:15to manage the lifecycle of multiple containers with. 1:20And lastly, the host OS which manages the Docker client and the Docker daemon and the kernel 1:30of which is shared with our running Docker containers. 1:34So, when we look at images as a potential vulnerability, one of the best things 1:39that we can do to address this vulnerability is to make sure 1:42that we're keeping our images up to date. 1:45And the reason this is so important is because images that are 1:48up to date typically have the latest security patches which protect you 1:52from the latest vulnerabilities that they track. 1:55We also want to make sure that we're regularly scanning our images so that we can keep track 2:00of any new vulnerabilities that may not have already been caught. 2:03And we also want to make sure that we're signing our images. 2:07And signing an image will essentially create a digital fingerprint that you can use 2:12to cryptographically test and verify whoever it was 2:16that was trying to manipulate the image with. 2:18Now, image registries are a potential vulnerability, because they contain all 2:22of these images which contain your application code. 2:25And so in order to keep them secure, you want to make sure 2:28that you're keeping your image registries private and a private registry really is one 2:34that gives you absolute control over the types of images, how many images 2:39and the access control of the users that are accessing the registry. 2:43You also want to make sure that you're regularly monitoring your registry 2:48so that you can track any vulnerabilities that may come about, and you want to make sure 2:52that the host server for the registry is secure so that you can protect it 2:59from being compromised and you can protect your images 3:01and the application code from being accessed. 3:04When it comes to the container run time, run times can be a little bit tricky 3:08because historically security tools related to containers monitor more the communication 3:16around them rather than what's happening inside. 3:18So, one of the best things you can do is to make sure that you're app security is up to par 3:24and you also want to make sure that you are monitoring your network protocols 3:29and your network payloads. 3:31You also want to make sure that you're monitoring the host as well. 3:35When it comes to orchestration softwares, these are platforms 3:38such as Kubernetes or container platforms like OCP. 3:41And what's great about these is that they include lots of access control capabilities 3:47which means that you can easily set limits not just on the number of privileged users 3:53that you have -- which is an important thing to do -- 3:56but also the amount of privilege that you give any one user so that if the user is compromised, 4:00they're not able to attack your entire orchestration platform. 4:04You also want to make sure that you are monitoring your orchestration platform as well. 4:13And that you're monitoring the pod communication within the orchestration platform. 4:19When it comes to the host OS, this is potentially one of the greatest vulnerabilities 4:24that you can have in your container environment because the host OS 4:29if compromised will give the attacker essentially access 4:32to your entire application environment. 4:34So, in order to help to mitigate this, it's good to have a slim OS, 4:38something like SE Linux is a great option. 4:41You also want to make sure that you have access control implemented within your OS and you want 4:49to make sure that you're also regularly monitoring the OS as well 4:53for any vulnerabilities to protect it from being compromised. 4:58And so these are the a few of the potential vulnerabilities that exist 5:02in the space surrounding your container. 5:04When it comes to protecting the container itself, there's a lot of great open source tools 5:08that exist and one of them falls under the category of scanning. 5:13It's sort of the de facto option when it comes to scanning tools 5:18for containers and it's called Docker Bench. 5:20And Docker Bench is great because it's really just a simple script that runs 5:26and it will test your container against dozens 5:28of different container production deployment best practices, 5:32and it will let you know how your container does against it. 5:35Open Scap is another great option which it sort of will collect and analyze different...oh, 5:43sorry, it will allow you to create schedules around continuous scanning for your container. 5:50Now, when it comes to monitoring tools, a really great option is called Prometheus, 5:57and Prometheus is great because this one will allow you to collect 6:02and analyze different metrics around communication between different node end points. 6:06Lastly, when it comes to firewall tools, Cilium is a fantastic option because it will allow you 6:17to analyze communication in your network and also the communication 6:21between all the different application services that you have. 6:24So, just to recap. 6:25We've gone over a few of the vulnerabilities that exist in the environment 6:29around the container and then we've gone over some really great open source tools 6:34that can help to secure your container. 6:35Thank you. 6:36If you have questions, please drop us a line below. 6:39If you want to see more videos like this in the future, please like and subscribe. 6:43And don't forget, you can grow your skills and earn a badge with IBM Cloud Labs which are free, 6:48browser based, interactive Kubernetes labs.