The Wayback Machine - https://web.archive.org/web/20160322065121/http://python.sys-con.com/node/3488424

Welcome!

Python Authors: Elizabeth White, AppDynamics Blog, XebiaLabs Blog, Hovhannes Avoyan, Carmen Gonzalez

Related Topics: @DevOpsSummit, Microservices Expo, Linux Containers, Open Source Cloud, Containers Expo Blog, Python

@DevOpsSummit: Blog Feed Post

Secure Container Delivery Pipelines with Docker @DevOpsSummit #DevOps #Microservices

A PaaS-like model that are automatically combined with an Ops-owned container definition

Building Effective, Secure Container Delivery Pipelines with Docker, rkt et al.

Opinions on how best to package and deliver applications are legion and, like many other aspects of the software world, are subject to recurring trend cycles. On the server-side, the current favorite is container delivery: a “full stack” approach in which your application and everything it needs to run are specified in a container definition. That definition is then “compiled” down to a container image and deployed by retrieving the image and passing it to a container runtime to create a running instance.

Here, I’d like to talk about how we can apply lessons from experience of shipping code using many different formats in order to build effective, secure Container Delivery pipelines.

container-build-pipeline

The way it’s described above, container delivery does not sound much different from most other packaging and deployment models: replace container image with WAR file, AMI or OVA and the process looks pretty much the same. A trivial point, perhaps, but one worth making: the fact that containers aren’t that different from other full stack formats means that there are quite a few lessons that we’ve already learned which we can apply to the process of building and delivering containers.

One thing certainly does stand out in the general discussion around container delivery, however: the strong emphasis on how containers apparently will “empower the developer” and “free them from the shackles of Ops.” Unlike delivering, say, a WAR file, .NET application or Rails app, however, a container is not just a bundle of traditional “application code”. It includes all the other levels of the software stack, right down to the operating system.

Most container technologies provide nice mechanisms that mean that developers generally don’t have to bother with the actual details of configuring all the lower levels, but can inherit these from a base image instead. In most cases, though, the developer – as the “deliverer” of the final artifact – is still ultimately responsible for the entire container.

The point being: application developers often aren’t expert at, or even particularly interested in, the levels of the system below the application tier. The tendency more frequently – and I’ve fallen victim to this temptation myself – is to “just quickly change this setting because I read in that Stack Overflow post that it might fix the problem we’re having.”

This is especially tempting with containers as a distribution format because the “system levels” are encapsulated in the base image and so are practically invisible – a generally very desirable characteristic. With other full stack packaging formats – OVAs, Virtual Boxes, AMIs and the like – the system levels are not abstracted away as much, so it feels more logical that Ops should play a role in the production process of such packages.

Not that the “in your face” presence of the system levels is something we want to repeat: arguably, one of the reasons the other formats haven’t caught on in the way many hope containers will is precisely because they have such a comparatively heavyweight feel. Still, as the recent discussions about the number of insecure images in the Docker Registry shows, we need to find a way to add more Ops-side input into the container delivery process than is common today.

The points below assume that the development team is indeed ultimately responsible for the definition of the entire system. Different models are possible with containers, too. For example, you could have a PaaS-like model in which the developers provide app components that are automatically combined with an Ops-owned container definition. However, I would not call this a container delivery model because here the container definition is not the deliverable, but a runtime implementation detail.

Here, then, are my “food for thought” discussion points for building effective, secure container delivery pipelines.

1. Developers provide container definitions in SCM

The container definition – Dockerfile or other, higher-level definition that “compiles down” to a container descriptor – is the source deliverable, and so should be stored as a versioned artifact in a source control repository.

2. Container definitions and dependencies are compiled to container images in an Ops-controlled environment

Concretely: the build or CI system that generates the container images from the container definitions should not be owned or administered by the development team. This helps ensure that all Ops-related checks that need to be executed against the container definitions and associated dependencies are carried out correctly.

Implementing this recommendation does not require the entire CI setup to be controlled by Ops. For example, you could limit direct publish access to your image registry to an Ops-managed “image build service”, which could be called from a developer-run CI server.

3. Minimal base image catalog is enforced

Just as many build environments for application code enforce a whitelist of libraries and other allowed dependencies, your container pipeline should only process container definitions that inherit from a whitelisted set of supported base images. From a maintenance perspective, this whitelist should be as small as possible.

If exceptions need to be made – a particular project requires a component that can only run on a specific OS, for example – these should be limited to container definitions for that specific project.

4. Developer-provided container definitions can be pre-processed to choose a different base image

Requiring development teams to manually update their container definitions in source control whenever the base image whitelist is updated, e.g. after a security patch, is tedious and creates unnecessary delay. Instead, the image build system should be able to automatically choose a different base image, if necessary, with suitable notification back to the development team.

Container definition formats that allow symlink-style image references, such as Docker via the latest tag, can support this out-of-the-box. However, you may want to exert more fine-grained control over base image choice, such as automatically replacing a reference to an explicitly-specified version such as v10.4.8 by v10.4.9 if 10.4.9 contains an important security patch.

5a. Developer-provided container definitions can be scanned to enforce particular policies

In general, even though image inheritance means that developers generally don’t need to mess with lower-level system settings in their container definitions, nothing prevents them from doing so. For example, the container definition could change the security configuration of the OS, install insecure versions of libraries, create open mail relays etc. etc.

Ideally, code review that includes Ops will prevent such changes from ever making it into the container definition. You will most likely also be running security scans against your running container instances to try to catch such problems after the fact. The ability to automatically check for “problematic” parts of a container definition at image build time – having a linter for container definitions, if you will – is an additional tool that should be in your toolbox, however.

5b. Developer-provided containers can be “black box” tested to enforce particular policies

If the previous point can be described as “white box” testing of container definitions, then this point is about black box testing of the resulting image: ensure that your image build system is able to create instances of new container definitions in a safe/sandbox environment and run assertions (using a tool such as Cucumber or similar) against them.

6. Images in your registry that were created from a particular base image can be invalidated

The ability to enforce a base image whitelist at build time should prevent any new container images from referencing insecure or otherwise unsupported base images. But what about all those images already in your registry that inherited from such a base image? How do you prevent new container instances being created from those?

Consider implementing a system that allows you to check, just before spinning up a container instance from an image, whether that image is still “safe”. This can be as simple as creating a wrapper for your ‘instantiate container’ command that checks for the absence of an ‘unsupported’ tag or other piece of metadata on the image, or as advanced as a plugin or extension that hooks directly into your container runtime.

7. Images derived from a “banned” base image can be rebuilt using an updated base image automatically

When a base image is banned, you want to be able to immediately trigger new container image builds, using an updated base, for each container definition inheriting from the now banned base image. Otherwise, you won’t have any runnable container images for that application until the next code change, or until someone manually triggers the delivery pipeline for that app, since the latest version is now “unsafe”.

Note that I’m not trying to recommend this as a “standard” part of the image build process – the correct way to create new container definitions once a base image is invalidated is definitely to update the container definition in source control and allow the pipeline to build a new image version based on that. Rather, this capability is a stop-gap solution to help bridge the gap until the new image is available.

8. Post-deployment commands can be automatically run against running containers

While all the new image versions are building, you’ll still have plenty of running container instances that use the now banned base image. In that case, it’s very useful to be able to specify commands to be run automatically against all container instances that meet a certain condition (such as inheriting from a particular base image).

Modifying containers at runtime in this way is generally frowned upon, and this capability should again only be considered a temporary fix until new image versions based on updated container definitions in source control have been built, and all running instances have been updated.

But if you have large numbers of running container instances and many images that need rebuilding (which might take quite some time – think build storm), the ability to quickly apply an “emergency band-aid” can be essential. Even if it only takes a few minutes until all the new images have been built and all running container instances have been updated, that can still be a big problem in the face of a critical security vulnerability.

And finally…

For inspiration ;-)


How Shipping Containers are Made


With thanks to Boyd Hemphill for his thoughtful review comments.

XebiaLabs develops enterprise-scale Continuous Delivery and DevOps software, providing companies with the visibility, automation and control to deliver software faster and with less risk. Learn how…

The post Building Effective, Secure Container Delivery Pipelines with Docker, rkt et al. appeared first on XebiaLabs.

Read the original blog entry...

More Stories By XebiaLabs Blog

XebiaLabs is the technology leader for automation software for DevOps and Continuous Delivery. It focuses on helping companies accelerate the delivery of new software in the most efficient manner. Its products are simple to use, quick to implement, and provide robust enterprise technology.

@ThingsExpo Stories
SYS-CON Events announced today that LeaseWeb USA Inc., one of the world's largest hosting brands, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. LeaseWeb USA Inc. was established in 2011, a separate and distinct operating entity providing services in the USA. LeaseWeb is a trusted partner to mid-market companies, helping them find the right solution to their critical cloud-hosted needs from our global...
Symantec Corp. has announced the worldwide availability of Encryption Everywhere, a website security package available through web hosting providers. Encryption Everywhere lets web hosting providers integrate encryption into every website from the moment it is created. With the new web security service, hosting providers can offer a variety of flexible options, including basic website encryption included as part of any hosted service, and a number of premium security packages with increasingly s...
“Today’s generation of customers are always connected and well informed, but businesses are lagging behind in terms of both understanding and engaging their customers across all their channels in ways that are both relevant and consistent,” said Brian Walker, chief strategy officer, SAP Hybris. Only one in four companies are enabling omnichannel customer engagement, whereby they have a unified, “single view” of the customer and are delivering a consistent, contextual, and relevant experience a...
Zones, Inc., illustrated how technology solutions can improve patient care at the HIMSS16 Conference and Exhibition. Zones’ healthcare experts showcased technology to enhance patient care, ensure access to electronic medical and health records (EMR/EHR), design and implement mobility initiatives, and safeguard network and data security. Supporting every aspect of IT in the healthcare environment, Zones’ healthcare team can recommend the most productive and scalable IT solutions to ensure a high...
Electric Imp has expanded its focus to align with evolving commercial and industrial Internet of Things (IoT) opportunities. ”As our platform evolves, it is able to satisfy markets more demanding than the initial consumer segment,” said Hugo Fiennes, CEO and co-founder of Electric Imp. "Delivering over 500,000 units through our consumer device partners helped prove the scalability, reliability and usability of our platform, and now we are targeting our unique architecture at the problems facing...
@ThingsExpo has been named the ‘Top WebRTC Influencer' by iTrend. iTrend processes millions of conversations, tweets, interactions, news articles, press releases, blog posts - and extract meaning form them and analyzes mobile and desktop software platforms used to communicate, various metadata (such as geo location), and automation tools. In overall placement, @ThingsExpo ranked as the number one ‘WebRTC Influencer' followed by @DevOpsSummit at 55th.
SYS-CON Events announced today that Chetu Inc., a worldwide leader in custom software solutions for niche businesses, software-defined storage and data services platform, will exhibit at SYS-CON's @ThingsExpo, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled ni...
Exosite has announced its Taipei Office has formally been established. Exosite’s Taiwan operations have grown from the Taichung team, primarily focused on research and development, into a full-service IoT enablement organization with development and consulting capabilities. The new Taipei office is located in the Taipei Minsheng Dunhua district, surrounded by all its hardware and channel partners. Exosite will devote its time to the Taiwan market and expand its business into the Asia-Pacific mar...
SYS-CON Events announced today BZ Media LLC has been named “Media Sponsor” of SYS-CON's 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. BZ Media LLC is a high-tech media company that produces technical conferences and expositions, and publishes a magazine, newsletters and websites in the software development, SharePoint, mobile development and Commercial Drone markets.
*This is part of a series of blogs examining Sensor-2-Server (S2S) communications, development, security and implementation. For the past two weeks, we’ve taken an in-depth look at what Sensor-2-Server communications are, how to implement these systems, and some of the specific aspects of communication that these systems facilitate. This week, for our final installment, we’ll examine some of the benefits, as well as security considerations, for S2S communications.
As devices, sensors, objects and people are given digital identities that connect them to the Internet by the billions, the need for security and privacy becomes a critical factor for both market adoption and safety. The 40-year-old security methods we now use on our PCs and networks cannot address many of these IoT devices.
Internet of Things (IoT) platforms have evolved. Advances in technology make it possible for facilities to become more data-driven by connecting to energy assets, thereby improving building resiliency and reducing energy costs. By creating an Energy Network of Things, facilities can manage energy assets in real-time, institute system-wide operational oversight and compliance, execute energy efficiency programs, utilize real-time data, and support budgeting and asset planning across local and geo...
Two-thirds of organizations implementing hybrid cloud report they’re already gaining competitive advantage from their hybrid environments and are nearly three times as likely to use it to assemble data assets or monetize data, according to findings released by IBM (NYSE: IBM). With a hybrid cloud approach, organizations can be selective about when to use cloud and when to use traditional IT infrastructure – delivering the best functionality while meeting speed and flexibility needs, as well a...
SYS-CON Events announced today CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY. CrowdReviews.com is the first buyer’s guide that ranks products and services based on client reviews.
For basic one-to-one voice or video calling solutions, WebRTC has proven to be a very powerful technology. Although WebRTC’s core functionality is to provide secure, real-time p2p media streaming, leveraging native platform features and server-side components brings up new communication capabilities for web and native mobile applications, allowing for advanced multi-user use cases such as video broadcasting, conferencing, and media recording.
SYS-CON Events announced today Object Management Group® has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Pythian, a global IT services company specializing in helping companies adopt disruptive technologies to optimize revenue-generating systems, has been named "Bronze Sponsor" of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Pythian, a 400-person global IT services company that helps companies compete by adopting disruptive technologies, announced today that CEO Paul Vallée has been named “Diversi...
transform operational efficiency and safety for businesses and communities, especially during critical situations. During these critical events, man-made incidents or natural disasters, identifying and reaching employees with reliable and automated communications can not only protect business assets, but can be the difference between life and death. In his session at @ThingsExpo, Imad Mouline, chief technology officer for Everbridge, will highlight incident communications best practices and ...
Big Data, cloud, analytics, contextual information, wearable tech, sensors, mobility, and WebRTC: together, these advances have created a perfect storm of technologies that are disrupting and transforming classic communications models and ecosystems. In his session at @ThingsExpo, Erik Perotti, Senior Manager of New Ventures on Plantronics’ Innovation team, will provide an overview of this technological shift, including associated business and consumer communications impacts, and opportunities...
SYS-CON Events announced today that iDevices®, the preeminent brand in the connected home industry, will exhibit at SYS-CON's 18th International Cloud Expo® | @ThingsExpo, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. iDevices has announced that it has entered into a definitive agreement to sell the world’s #1 app-enabled grilling and cooking thermometer brands, namely iGrill® and Kitchen Thermometer, to Weber-Stephens Products, LLC. Weber®, the world’s lar...
Latest Stories
Cloud Expo & DevOps Summit 2015 West
KEYNOTES
Intellyx
Opening Keynote | Innovation in the Age of Digital Transformation
IBM
Day 2 Keynote | Geek Girls Are Chic: 5 Career Hacks
Octoblu
Day 3 Keynote | How We Built and Scaled an IoT Platform and Business
POWER PANELS
Cloud Expo Power Panel
Cloud Expo Power Panel | Cloud Computing: We Now Live in an API World
DevOps Summit Power Panel
DevOps Summit Power Panel | DevOps Five Years Later: What Does the Future Hold?
IoT Power Panel
@ThingsExpo Power Panel | The World's Many IoTs: Which Are the Most Important?
Cloud Expo & DevOps Summit 2015 East
KEYNOTES
IBM
Opening Keynote | Geek Girls Are Chic: 5 Career Hacks
Cisco
Day 2 Keynote | The Internet of Everything: Seizing the Opportunities
Virtustream
Day 3 Keynote at 16th Cloud Expo | Rodney Rogers, CEO of Virtustream
VENDOR PRESENTATIONS
Akana
General Session at 16th Cloud Expo | Laura Heritage, Director of API Strategy at Akana
CenturyLink
General Session at 16th Cloud Expo | David Shacochis, Vice President at CenturyLink
Cisco
General Session at 16th Cloud Expo | Paul Maravei, Regional Sales Manager, Hybrid Cloud, Cisco
CodeFutures
General Session at 16th Cloud Expo | Dan Lynn, CEO of CodeFutures Corporation
MetraTech, now part of Ericsson
General Session at 16th Cloud Expo | Esmeralda Swartz, VP, Marketing Enterprise & Cloud at Ericsson
SoftLayer
General Session at 16th Cloud Expo | Phil Jackson, Lead Technology Evangelist at SoftLayer
MetraTech, now part of Ericsson
General Session at 16th Cloud Expo | Esmeralda Swartz, VP, Marketing Enterprise & Cloud at Ericsson
Windstream
General Session at 16th Cloud Expo | Michael Piccininni, EMC, & Mike Dietze, Windstream
POWER PANELS
Cloud Expo Power Panel
Cloud Expo Power Panel | The Evolving Cloud: Where Are We Today?
DevOps Summit Power Panel
DevOps Summit Power Panel | Balancing the Three Pillars of DevOps
IoT Power Panel
@ThingsExpo Power Panel | The Internet of Things: A New Age
Microservices & IoT Power Panel
Microservices & IoT Power Panel at DevOps Summit
VIEW KEYNOTE WEBCASTS
Microsoft
Microsoft Opening Keynote | NoOps != No Operations
Qubell
DevOps Summit Keynote | Purpose-Defined Computing: The Next Frontier in Automation
PLATINUM SPONSORS
Verizon Enterprise
General Session | Verizon Pay-As-You-Go Model for Oracle Database Licenses Means Costs Savings and Business Benefits
Verizon Digital Media Services
Creating a Faster, More Secure Cloud
GOLD SPONSORS
Cisco
General Session | [Podcast] Hybrid Cloud – Different Clouds for Different Needs
SAP
General Session | Innovation with Cloud and Big Data Solutions That Will Revolutionize Your Business – Join SAP and Partners
SoftLayer
General Session | How to Architect and Optimize Your Cloud for Consistent Performance
Power Panels