You are on page 1of 34

DevSecOps

The InfoQ eMag / Issue #70 / April 2019

IN PRACTICE
The Three Faces
of DevSecOps
DevSecOps is here to stay, as
more vendors use the term.
But what is it? A security
solution that supports DevOps
technologies, or adapts to
DevOps methodologies,
or embraces the DevOps
philosophy?

Five Lessons Security


Can Learn from DevOps
New approaches in security
are needed to address the
challenges of DevOps. They
must incorporate practices that
rely on modularity, automation,
standardization, auditability, and
mirrored systems.

A Security Approach
for a Cloudy World
Does your approach to
application and data center
security change when adopting
cloud services? InfoQ reached
out to Pete Cheslock, from
Threat Stack to learn more.

FACILITATING THE SPREAD OF KNOWLEDGE AND INNOVATION IN PROFESSIONAL SOFTWARE DEVELOPMENT


'-' WhiteSource

Automate Security
Into Your DevOps Pipeline

·r,f
a r
11·
a

FIND OUT HOW


InfoQ @ InfoQ InfoQ InfoQ

DevSecOps
IN PRACTICE
IN THIS ISSUE

The Three Faces of


DevSecOps 08 Five Lessons Security Can Learn
from DevOps 14
A Security Approach for a Four Steps to Continuous
Cloudy World - interview
with Pete Cheslock 18 Security in Container
Deployment 22
Developing a Secure and
Scalable Web Ecosystem
at LinkedIn 27

GENERAL FEEDBACK feedback@infoq.com / ADVERTISING sales@infoq.com / EDITORIAL editors@infoq.com


A LETTER FROM
THE EDITOR

DevSecOps is now clearly es- security testing, bringing it in


tablished as an essential ap- our delivery pipelines with the
proach to build in security early usage of the necessary tools? Or
in an application’s lifecycle. The is it actually about changing our
necessary tooling is also avail- approach to security controls and
able to integrate security activi- revisiting when and how those
ties in modern software delivery activities are performed in the
pipelines. Yet we keep hearing overall application lifecycle? Or
about high profile breaches in do we need to re-consider who
the news (from which you might is really responsible (and pos-
or might not want to think about sibly re-think our team struc-
Manuel Pais how many lower profile breaches tures and skills) for ensuring our
is a DevOps and Delivery Consultant,
happen on a regular basis). Why applications, infrastructure and
focused on teams and flow. are the tools not enough? With networks are secure? There is
Manuel helps organizations adopt
test automation and continuous this eMag, we present you expert no single right answer of course,
delivery, as well as understand security advice on how to effec- but plenty of food for thought in
DevOps from both technical and
human perspectives. Co-curator of tively integrate security practices Podjarny’s article.
DevOpsTopologies.com. DevOps and processes in the software
lead editor for InfoQ. Co-founder of
DevOps Lisbon meetup. Coauthor delivery lifecycle, so that every- Wei Lien Dang’s article sheds fur-
of the book “Team Topologies:
one from development to secu- ther light on how DevOps practic-
Organizing Business and Technology
Teams for Fast Flow”. rity and operations understands es like standardized and trace-
Tweets @manupaisable
and contributes to the overall able configurations, immutable
security of the applications and infrastructure, blue-green de-
infrastructure. ployments and so on can help
security professionals reduce toil
The first question we need to ask and increase the speed at which
is what does DevSecOps mean security controls are carried out
for our organization, our context, during the lifecycle, as well as
our market (including applicable reduce the time it takes to de-
regulations) and our current team tect security issues at runtime.
structures and interactions? Guy Dang also points out the need
Podjarny’s article gets us asking for security tools themselves
the right questions on what is our to follow modern architectural
interpretation of DevSecOps: is patterns like modularity and ease
it just about automating current of integration.
In an insightful interview with rity concerns, approaches and
Pete Cheslock, you will find in- techniques for each phase.
valuable lessons learned on how
security changes when embark- Last, but surely not least, read
ing on a cloud migration journey about how LinkedIn kept security
by someone who has been there at the forefront while architect-
and done that. Cheslock points ing their platform’s scalability to
out emerging security risks support a 20x increase in mem-
around sprawling shadow IT in bers in a 6-year timeframe! All
the cloud or assuming that open while increase the frequency of
source code is secure because delivery from hands-on heavy
it’s openly available. But he also monthly releases to releases 3
makes the case that cloud ser- times per day.
vices can help us better under-
stand our systems at runtime in We hope this eMag can provide
the cloud and automate some an overview of concrete prac-
security practices with a lot less tices and help you get started
effort than on-prem. with the highest priority security
gaps in your organization today.
Containers have revolutionized Or simply clarify and help accel-
the way we package and deploy erate your current DevSecOps
applications and tools. They also initiative.
brought about intense discus-
sions and important changes in
how we secure both the infra-
structure where they run and
the applications inside them.
Fei Huang gives us a detailed
framework on building security
in containers in a continuous
fashion. He explains the impor-
tance of planning in different
phases (build, ship, preparation
and production) and provides
step-by-step guidance on secu-
CONTRIBUTORS

Wei Lien Dang Guy Podjarny Fei Huang


is VP of product at StackRox, a security (@guypod) is Snyk’s co-founder and CEO, is the co-founder and CEO of NeuVector, a
company building a new platform to protect focusing on using open source and staying Docker-container network-security solution
modern enterprise applications. Previously, secure. Guy was previously CTO at Akamai that uses behavioral learning to secure
he was head of product at CoreOS and following their acquisition of his startup, containers during run-time. Fei has over 20
held senior product-management roles for Blaze.io, and worked on the first web app years of experience in enterprise security,
security and cloud infrastructure products firewall & security code analyzer. Guy is a virtualization, cloud, and embedded
at Amazon Web Services, Splunk, and frequent conference speaker & author of software. He was part of the founding team
Bracket Computing. O’Reilly “Securing Open Source Libraries”, of Cloudvolumes (acquired by VMware)
“Responsive & Fast” and “High Performance and co-founder of Provilla, a DLP security
Images”. company (acquired by TrendMicro).
He holds several patents in security,
virtualization, and software architecture.
Richard Seroter James Baker Mira Thambireddy
is the VP of Product Marketing at Pivotal, is a senior software engineer on LinkedIn’s is an information security engineer at
with a master’s degree in Engineering from Feed (homepage) team, striving to LinkedIn, where she is a part of LinkedIn’s
the University of Colorado. He’s also an 11- provide an excellent experience for Application Security and Penetration
time Microsoft MVP, trainer for developer- millions of LinkedIn members across Testing team. Previously, Thambireddy
centric training company Pluralsight, the world. Baker has been active in web worked as a security consultant in Silicon
speaker, the lead InfoQ editor for cloud engineering roles since 2009 and has Valley. She holds a master’s degree in
computing, and author of multiple books on been in some type of IT role since 2004. information security from Carnegie Mellon
application integration strategies. Richard He is based out of Silicon Valley and is University.
maintains a regularly updated blog on passionate about writing enterprise-level,
topics of architecture and solution design highly performant, secure, and accessible
and can be found on Twitter as @rseroter. web applications.
The Three Faces of
The InfoQ eMag / Issue #70 / April 2019

DevSecOps
by Guy Podjarny, cofounder at Snyk.io

DevSecOps is here to DevSecOps is a hot buzzword I hate it because, like all buzz-
stay, as more vendors these days, and I love it – as well words, it doesn’t properly reflect
as hate it. the high complexity behind this
use the term. But
journey. Security is a broad topic,
what is it? A security I love it because it embodies a spanning infrastructure, applica-
solution that supports goal the app sec industry, my- tion code, network stacks, third
DevOps technologies, self included, has been trying party vendors, and, of course,
or adapts to DevOps to accomplish for years – get- people. Changing how we apply-
methodologies, or ting developers to own security. security involves a lot of detail,
embraces the DevOps This simple buzzword gives our but buzzwords don’t have room
philosophy? mission a name and helps its for such nuance. Inevitably, dif-
momentum, driving it towards ferent people use it for different
becoming the norm. meanings – or at least empha-
size different parts.

8
The InfoQ eMag / Issue #70 / April 2019
This isn’t surprising, and many these offers new functionality supporting containers out of the
buzzwords have a similar effect. and introduces new technology box and requiring them to adapt.
More specifically, if you get three stacks, which in turn have specif- A good example of that is Trend-
experts in a room you’ll get 4 ic security needs. Micro’s Deep Security product,
different interpretations of the which added container support
term DevOps, and 5 of the term The first step in supporting these in version 10 with a new split of
Cloud. While we’ll never get to a technologies is taking an existing responsibilities between the the
single definition, writing down the security product, which is used host machine and the contain-
different points of view still helps, primarily on older stacks, and er. This change was enough for
as they give us a way to classify adding the technical components them to claim participation in the
what someone means when they necessary to use it in a DevOps DevSecOps movement, although
use the term. environment. These are mostly the product is still primarily used
minor adaptations of existing in traditional security context.
Looking at its different uses, I see tools - as opposed to substantial
three primary meanings attribut- change in the way the tool oper- One step further down the path
ed to the term DevSecOps. These ates - simply meant to support of securing DevOps technolo-
views represent different mile- the new surroundings. gies are security solutions that
stones in the DevSecOps journey address the newsecurity needs
and align to common interpre- Let’s take container security as these technologies introduce.
tation of the term DevOps itself. an example. Symantec, McA- Examples here include Cloud-
Let’s go through each and dig fee, TrendMicro and others offer Checkr and Evident.io inspect-
one layer deeper into this won- endpoint security solutions ing cloud configurations to find
derful and horrible term. which include anti-malware, storage buckets inadvertently left
monitoring for malicious network publicly accessible (and other
DevSecOps as “Security for activity and more. These mature issues, as can be seen in the
DevOps Technologies” products have long worked for figure below), or Snyk looking for
Perhaps the most literal transla- servers and virtual machines, vulnerabilities in open source li-
tion of DevSecOps is to describe and conceptually apply to con- braries. Handling newer technol-
security solutions for the wave tainers just as much. However, ogies requires novel thinking, and
of technologies DevOps brought the division of controls between is often harder for incumbents
along. Technologies like cloud, the container and the machine who are already predisposed
containers and serverless, to hosting it, along with various and structured to older ways of
name a few, are key players in other technical differences, thinking. It is therefore typically
the DevOps movement. Each of prevented these products from the domain of startups, with big

9
The InfoQ eMag / Issue #70 / April 2019

Figure 1 / CloudCheckr’s cloud security assessment results

companies stepping in via acqui- In both cases, the term audit” in the midst of the release
sitions as opposed to building a DevSecOps refers to securing process is no longer acceptable,
solution from scratch. DevOps technologies. That said, requiring strong automated secu-
some of these solutions natu- rity tests in the pipeline instead.
Containers exemplify this sce- rally bleed into the way we ap- This demand for automation
nario well. The fact the isola- plyDevOps too, which gets us to drew attention to static applica-
tion between the host and the the next meaning… tion security testing(SAST) tools,
container isn’t perfect created a but these took too long – often
new risk - having malicious code DevSecOps as “Security for hours – to complete a single
running in a container break out DevOps Methodologies” code scan, which isn’t viable in
of the container sandbox and Beyond its technologies, DevOps a frequent build environment. To
impact the host machine. Since drove adoption of powerful new adapt, most SAST tools intro-
the same physical host often methodologies, such as contin- duced a concept of incremental
runs containers at different levels uous delivery (CD) and micros- scans, only testing the code that
of sensitivity or even belonging ervices (followed by serverless). changed. These scans complete
to different owners, sandbox These techniques lead to faster faster and can therefore fit inside
escaping is a real and immediate development and more granu- the pipeline. Once again, these
threat. This and additional new lar components, both of which tweaks are often featured as a
risks introduced by containers quickly break existing security demonstration of DevSecOps
opened the door to startups methodologies. prowess.
focusing specifically on container
security, such as Sysdig, Aqua Once again, these new approach- While such adaptations are im-
and Twistlock, who harden the es require an evolution for exist- portant, they’re often not enough.
container and flag attempts to ing players. Let’s look at CI/CD as Some new methodologies don’t
break out of it. These startups an example. just change the technical setup,
typically identify themselves as but also break core concepts
DevSecOps companies through The adoption of continuous existing tools rely on, requiring a
and through. delivery means “stopping for an rethinking of the entire product

10
– again a realm where startups Beyond overcoming the chal-

The InfoQ eMag / Issue #70 / April 2019


excel. Microservices security lenges of these new approaches,
monitoring offers a good demon- such dedicated solutions also
stration of this. capitalize on the opportunities
they present. For instance, while
Moving from a monolith appli- containers are logically similar
cation to microservices changes to VMs, they are often stateless
the definition of an app. Instead and deployed in highly elastic
of monitoring one entity with a environments. As a result, it’s en-
set of inputs and outputs, data tirely reasonable to shut down a
now flows between multiple – at container which is behaving sus-
times dozens or even hundreds – piciously and may be compro-
of different services. Successful- mised, as no data will be lost, and
ly identifying attacks in real time the system will simply spin up a
in such an environment requires new one. Such a harsh response
an entirely different security is clearly not an option for bare
monitoring solution, which scales metal hosts and is not viable in a
to monitoring a large number of heavy virtual machine either. And,
services and the data flows be- indeed, you’ll be hard pressed to
tween them. Startups like Apore- find an endpoint security solution
to tackle this problem by tracking that promotes destroying a ma-
service to service communica- chine on alert, while practically all
tion and flagging unauthorized the container and microservice
connection attempts, while security startups heavily promote
startups like SignalSciences fo- doing so.
cus aligning per-service security
insights with their respective ops Adapting to DevOps methodol-
dashboards. ogies is a substantially broader

Figure 2 / Aporeto maps microservice and flags untrusted


connections (Aporeto demo webinar)

11
interpretation of DevSecOps than footsteps. To truly address secu- thus the less likely they are to do
The InfoQ eMag / Issue #70 / April 2019

focusing on technologies alone, rity at the DevOps pace, we must so.


and far more valuable in the long embed it into the regular devel-
run. It typically requires some opment and operation processes. More importantly, security prod-
technology support as well (e.g. Since security teams - like ops ucts are designed primarily to
you can’t secure microservices teams before them - are vastly help the InfoSec person do their
without supporting containers) outnumbered by developers, the daily job, and developer integra-
but goes on to understand and only way to achieve shared own- tions are often done from that
adapt security to the new pro- ership is by having the bulk of the skewed perspective. The results
cesses being enacted. And yet, daily security activity performed are similar to what would happen
while it touches two parts of by the development teams. The if VMWare built an IDE, or Citrix
the golden triangle (People, Pro- remaining work should be done created a CI offering. Those are
cess, Technology) - it still over- primarily by ops, and the security powerful ops tools, but they don’t
looks the most important one.  team should spend most of their think developer, and are unlikely
time empowering those teams, to design the right tool for that
DevSecOps as “Security for governing and automating this audience.
DevOps’ Shared Ownership activity (“security as code” to
Philosophy” follow “infrastructure as code”). Interestingly, this DevSecOps
DevOps isn’t – at its core - about philosophy fits the opposite
technologies or methodologies, For existing security solutions, direction better, that is having
but about people and collabo- this is a tough change. These developer tooling companies
ration. It’s about accepting that businesses are built to cater to embrace security. These compa-
keeping our software running security professionals, and their nies have already won the hearts
well is everybody’s problem, and entire go-to-market models, and minds of developers and can
that we share the responsibility as well as their world view, is now take those developers a step
for making it happen. DevOps focused on that industry. They further in their DevOps journey.
goes against the practice of devs sponsor security events, use the Source code vendors can tackle
“throwing code over the wall” for terminology of security people, code security, APM vendors can
ops to handle and helps ops ap- and price their product per the monitor for security flaws, and
preciate the constraints develop- security industry’s standards. pipeline vendors can harden what
ers face on a daily basis. The bigger the security vendor, goes through them.
the more they’ll have to lose from
This cultural and philosophical changing their target market,
shift drives the new methodolo-
gies and technologies. It leads to
developers writing more operable
code, ops treating infrastructure
as code, and the horde of ensu-
ing software and techniques to
make it scale. This shift is what
truly makes business move fast-
er and compete better.
Figure 3 / Chrome Dev Tools flags
The last and broadest view of vulnerable JavaScript libraries
DevSecOps follows the same

12
This is no longer a theoretical op-

The InfoQ eMag / Issue #70 / April 2019


portunity. In 2017, we saw GitHub
add security alerts to its repos,
Google Chrome flag vulnerable
JavaScript libraries in its built-in
dev tools, and Sysdig launcha
container security product. These
companies also have a learning
curve to understand how to build
security solutions, but they are
anchored in the right place.

Lastly, for startups, this is a gold-


en opportunity. Businesses that
sell to developers are far more
capital efficient than their secu-
rity counterpart, as the former
have far lower sales costs. In Figure 4 / Bringing automated remediation into
addition, CSOs today are increas- the developer context inside GitHub
ingly bombarded with cold calls
they learn to ignore, but security
solutions already embraced by
dev teams will still capture their
attention. We now know devel- dev tools integrations, through is quickly entering the InfoSec
opers are the new kingmakers in many thought leadership activi- buzzword bingo, and the hotter
the operations world, and secu- ties, to investing in automated re- it is, the more companies and
rity is likely to follow the same mediation which helps develop- vendors will use it, regardless of
footsteps. ers more than auditors, and it’s what it means.
paying great dividends.
Right now, there are very few The next time you come across
security companies focusing Stats show that organizations a solution using this term, I hope
on developers. One good ex- that truly adopt the DevOps this article will help you classify it
ample is in the authentication philosophy get better business properly. Is it a security solution
space, where Auth0 is winning results, regardless of the tech that supports DevOps technolo-
developers over with great doc- and methodologies they used. I gies, adapts to DevOps method-
umentation, a bottom up pricing expect organizations that truly ologies, or embraces the DevOps
model and strong community adopt this DevSecOps interpre- philosophy and helps you change
forums and programs. Their tation to get the equivalent boost your organization? Or perhaps
latest $55M Series D is one in keeping themselves and their it fits multiple buckets? With the
indication of the payoff. Another users data secure. right classification, you can help
example I can give here is my remove the noise, and focus on
own company, Snyk, which fixes Understanding DevSecOps the DevSecOps mission.
vulnerabilities in open source de- DevSecOps is a hot buzzword,
pendencies. We focused on de- and it’s not going away. The term
velopers throughout, from deep

13
The InfoQ eMag / Issue #70 / April 2019

New approaches in
security are needed to
address the challenges
of DevOps. They
Five Lessons must incorporate
practices that rely on

Security Can Learn modularity, automation,


standardization,

from DevOps
auditability, and
mirrored systems.

by Wei Lien Dang, VP of Product at StackRox

As DevOps becomes increasingly Netflix, Google, and Amazon are quickly deliver cutting-edge, cus-
crucial to the modern enterprise, examples of high-performing, tomer-delighting products. At the
security professionals must ask agile organizations that consid- same time, this creates challeng-
themselves what they can learn er DevOps to be foundational es for other organizational func-
from this culture shift. DevOps is to the success of their digital tions such as security. Delivering
a blend of organizational ideas, businesses. distributed applications more
processes, and software tools quickly and easily substantially
that has enabled some of the Companies with effective DevOps increases risk to businesses that
world’s largest companies to practices understand that in cannot secure them at the same
improve productivity, achieve the technology-driven, winner- speed at which they are deployed
faster time to market, and de- take-all, competitive landscape, and scaled. Security workflows,
liver higher-quality products a business’s success often tools, and operations must
that impact their bottom lines at depends on its ability to contin- change to keep up.
blazing speeds. Enterprises like uously learn, innovate, and more

14
More recently, the need to bal- teams favor applications that are

The InfoQ eMag / Issue #70 / April 2019


ance DevOps speed with ex- assembled in modular fashion.
isting security requirements Some examples include micros-
has resulted in a model called ervices architectures, container
DevSecOps. DevSecOps is based technologies such as Docker, and
on the principle that “everyone 12-factor application methodol-
is responsible for security.” It ogy. Microservices let developers
emphasizes how application focus on optimizing individual
developers can build security application pieces that interact
checks into their integration more easily with other systems
and deployment pipelines. But via APIs. This streamlines de-
DevSecOps has focused far less velopment, integration, and
on security during runtime, which deployment.
is when the business’s applica-
tions and data are most vulnera- Security lessons: Security teams
ble to attacks. Runtime security must grapple with a patchwork
encompasses all types of threats of dozens of security tools that
once an application is running do not easily integrate. Bringing
and includes functions such as modularity to security will dra-
attack detection, incident re- matically reduce the operational
sponse, and policy enforcement. complexity, time, and costs of
These functions still largely integrating and managing these
rely on siloed tools and manual solutions. Security professionals
workflows. Additionally, runtime should look for new tools that are
security cannot and should not built using the same frameworks
be the responsibility of everyone that enable modular application
throughout the enterprise; these development. Security delivered
functions are best handled by using microservices running in
security professionals. Docker containers can be easily
distributed across entire clusters
Besides building security into of applications, orchestrated by
DevOps workflows, security systems like Kubernetes, Meso-
teams should evaluate how they sphere DCOS, or Docker Swarm.
can incorporate DevOps princi- This means security tools can
ples into their tools and process- blend in as just another set of
es. Here are five DevOps practic- applications that are automated
es that security professionals can and orchestrated alongside the
learn from. applications they protect.

Build modular systems Depend on automation and


Key to the DevOps philosophy scalability
is building systems that can be The overriding goal of DevOps
more easily managed by small is to achieve greater speed and
teams. Many of the tools and agility to better serve customers.
approaches used by DevOps Teams reach this goal through

15
high levels of automation and reduce security incidents. Relying settings can highlight anoma-
The InfoQ eMag / Issue #70 / April 2019

scalability that are designed to on traditional, fragmented, manu- lous or malicious patterns that
make infrastructure fully pro- al security processes is no longer reflect live attacks or indicators
grammable. For example, Netflix sufficient. of compromise. When detecting
has focused on automating the such activity, security teams can
company’s entire software-re- Use standardized configurations treat infrastructure as immutable
lease platform so that it can In DevOps, teams take advantage to quickly stop impacted sys-
scale on demand to thousands of of consistent baseline config- tems and launch new, unaffected
servers in minutes, ensuring that urations to identify operational ones without having to deal with
customers always have access issues more easily. Teams pack- the complexity of patching live
to their content. Automation has age “infrastructure as code” in systems.
the added benefit of reducing the the form of base images, applica-
likelihood of manual operator tions, and dependencies needed Maintain an auditable “source of
error, which is a frequent source to run services. This ensures truth”
of costly service interruption or that systems are identical and DevOps culture helps foster
downtime. reproducible and drives better greater collaboration across
operational hygiene. Monitoring teams by using techniques
Security lessons: Security’s for deviations against stan- like revision tracking and ver-
mandate is to mitigate the risk dardized configurations allows sion control to maintain full
and impact of attacks on the operators to quickly identify and transparency, improve change
business. Achieving automation troubleshoot issues. Treating management, and streamline
enables faster time to detection, infrastructure as immutable, so system recovery. Modifications
which gives security teams more that running systems are nev- to configurations are recorded to
time to optimize response and er reconfigured, is increasingly capture details such as when the
recovery. As new applications becoming a best practice that change occurred, who requested
are continuously deployed and is facilitated by the adoption of the change, and the impact of
scaled at the speed of the cloud, application container technol- the change. Using this approach,
attack surfaces can scale and ogies such as Docker. Running development and operations gain
change just as constantly and systems are simply replaced with deeper visibility into the complete
quickly. Thousands of micro- new ones that incorporate any lifecycle of both applications
services applications may be desired changes. This approach and infrastructure, which helps
launched or destroyed within the allows teams to easily stop prob- facilitate better cross-function-
span of a few seconds, leaving lematic systems and relaunch al communications and greater
gaps in visibility and data collec- into known, good states at the accountability.
tion. Security tools must incorpo- same time.
rate automation and scalability to Security lessons: Security teams
keep up with these new appli- Security lessons: Security teams should ensure that they imple-
cation delivery models in order can similarly implement ap- ment tools to collect compre-
to minimize potential attacks proved security configurations, hensive data from all systems to
while preserving existing devel- fingerprinting, and profiling to maintain an actionable “source
oper toolchains. Automating the reveal potential issues. These of truth” that is readily accessi-
runtime security lifecycle also standardized configurations are ble. Currently, most datasets are
mitigates the likelihood of con- expected to conform to normal either siloed or aggregated in a
figuration errors that attackers system activity. Runtime activ- centralized SIEM system without
can potentially exploit, helping to ity that diverges from normal the necessary modeling required

16
to make them actionable. Even now use dual active/passive

The InfoQ eMag / Issue #70 / April 2019


outside of use cases such as root partitions to enable simpli-
governance and compliance that fied patch management with the
require audit trails, capturing ability to safely roll back versions
every change to any rules, con- if required. This has the added
figurations, and security policies benefit of increasing system
helps streamline collaboration availability, which falls under
and accountability within securi- the confidentiality, integrity, and
ty teams. Security professionals, availability (CIA) framework for
who may each focus on specific security management. Security
parts of the runtime security teams can take advantage of
lifecycle from configuring instru- this approach to first observe
mentation to forensics, can more the stability and efficacy of fixes
easily take coordinated action that are meant for production
when security incidents arise. environments. They can ensure
that security issues will be fully
Leverage mirrored, active- remediated before implementing
standby deployments them at large scale.
Teams often use blue/green
deployments to minimize down- Conclusion
time. This technique leverages Businesses of all sizes are
two identical production envi- seeking greater agility and speed
ronments; at any given time, to fuel digital transformation.
one is active and the second is By embracing DevOps, appli-
on standby. New releases are cation developers can focus on
only tested in the standby en- what they do best: building and
vironment. Once teams verify shipping new software. Security
the changes, they activate the professionals should also con-
standby environment and switch tinue to focus on what they do
the active environment to stand- best: keeping attackers out. Just
by. This allows teams to safely as DevOps emerged to meet new
roll back new releases if they business needs, new approach-
encounter unanticipated bugs or es in security are now needed
operational issues without ever to address the challenges of a
having to make changes to any DevOps-driven world. These
live systems. new security approaches them-
selves must incorporate DevOps
Security lessons: Security teams practices that rely on modularity,
can apply the same techniques automation, standardization,
to patch management and auditability, and mirrored sys-
security updates. They can test tems. By applying these five
fixes on mirrored systems before DevOps principles to new tools
releasing them in active produc- and workflows, security can help
tion environments. For example, businesses succeed.
some operating system vendors

17
The InfoQ eMag / Issue #70 / April 2019

INTERVIEW WITH PETE CHESLOCK


A Security Approach for
a Cloudy World
by Richard Seroter, VP of Product Marketing at Pivotal

Does your approach to application and data-


The Interviewee center security change when adopting cloud
services? To learn more about this topic, InfoQ
reached out to Pete Cheslock, head of operations
and support teams at Threat Stack.

Pete Cheslock
InfoQ: Have the on-demand, to computing resources their in-
As the head of Threat
self-service capabilities of cloud ternal technical teams are unable
Stack’s operations and
support teams, Pete IaaS forced a change an organi- to help them with. Now devs and
Cheslock is focused
on delivering the
zation’s security approach? If so, even ops teams can circumvent
highest level of service, how?  security policies and leave their
reliability, and customer
satisfaction to Threat security teams behind to clean
Stacks’ growing user Pete Cheslock: Absolutely. up the mess.
base. An industry
veteran with nearly 20 Before, security teams could tie
years’ experience in themselves into the procure- InfoQ: In past talks, you’ve
technical operations,
he understands ment process to ensure that all covered how companies build
the challenges and
issues faced by
systems and applications would security into their process from
security, development, meet standards before being the start. Does that practice look
and operations
professionals and how deployed and consumed by different if your company already
we can help. Prior to customers. But now, anyone at has a dedicated information se-
Threat Stack, Pete held
senior positions at the company can go and create curity team? 
Dyn and Sonian, where an account for a cloud provider
he built, managed,
and developed and start deploying their ser- Cheslock: In many ways, the
automation and release
engineering teams and
vices. Commonly referred to as steps to bring security into an
projects. “shadow IT” — we’ve seen count- existing DevOps process at a
less companies where they will small company can work at a
have dozens or hundreds of AWS big company as well. The goal is
accounts as a way to get access working with your security teams

18
The InfoQ eMag / Issue #70 / April 2019
to involve them in the tooling many news reports of critical can get tools such as CloudTrail
and workflows your dev and ops vulnerabilities in closed-sourced to audit all the API calls on your
teams are already using (like software and hardware as well. account and you can use AWS
continuous integration and deliv- Since no one is safe, leverage Config in order to audit your
ery). Another goal for companies MITRE and the National Vulner- systems and ensure they meet
that don’t have a dedicated secu- ability Database to help people your compliance rules. Finally,
rity team, or have no idea where understand their risk, help them you leverage the EC2-VPC (which
to start, is to start small and not prioritize their security updates, is default for all new AWS cus-
attempt to boil the ocean. and finally talk about the risk and tomers) to segment your sys-
reward of nightly security up- tems behind private non-routable
InfoQ: What are areas where dates and what it means to your networks and use network ACLs
technical staff take the cloud for business. to restrict access. In many cases,
granted and assume that their the tools are there to be more se-
workloads are inherently secure?  InfoQ: Conversely, are there cure running in the cloud, users
native cloud capabilities that just need to learn what they all
Cheslock: Many times, people companies *should* use that re- are.
think that using open source lieve them of a particular aspect
means their code is secure. As- of security?  InfoQ: Should companies wean
suming that “many eyes makes themselves off perimeter security
secure code”. That concept has Cheslock: The great news is that as a dominant application securi-
been proven wrong time and time cloud providers like AWS are ty strategy, and if so, how?
again, with many vulnerabilities doing great things in the security
in core pieces of open-source space to help their users under- Cheslock: When moving to the
technology. Closed-sourced ven- stand better what is going on. cloud, you can still attempt to
dors are no safer, as we’ve seen If you are running on AWS, you maintain a perimeter by routing

19
all your traffic through your inter- InfoQ: Do your security recom- Cheslock: Often, when compa-
The InfoQ eMag / Issue #70 / April 2019

nal data centers, but eventually mendations change if someone nies run inside their own data
you may move off your internal moves up the stack from bare centers on networks they own,
data centers entirely so you have metal or virtual cloud servers up they will run many of their ser-
to be prepared. The reality is to PaaS or functions?  vices likely not thinking about
that many companies use end- encryption. This assumes that
point security tools to track and Cheslock: Providers such as physical security can help them
monitor their users’ laptops and Heroku, Google Cloud Functions, beat this problem. When moving
mobile devices. We need to take and AWS Lambda really make to the cloud and shared infra-
the same tactic with our servers the concept of securing your structure, encrypting your data at
as well. Every server running systems more interesting when rest can be critically important to
code is an endpoint, and enabling you don’t have any servers to run ensure data is not leaking due to
a continuous security-monitoring your code on. These are often bugs or errors with the provider.
tool can help you track and iden- referred to as serverless — your Additionally, when running on
tify more than just zero-day ex- code executes inside a provider someone else’s infrastructure,
ploits. They can help you identify on systems that you likely don’t you need to ensure you are using
internal bad actors who might have any control over. In many TLS to secure your services
be stealing intellectual property ways, this can help make you internally, similarly to how we run
using valid credentials. The risks more secure as you are reduc- SSL/TLS on our external web-
to a company come from inside ing the number of endpoints sites. Many tools make this very
often as much as from remote you need to secure. But in the easy to do nowadays.
attackers. end, this pushes your security
challenges over to the provid- InfoQ: Is it a false choice to de-
InfoQ: What security aspects ers themselves. AWS uses their cide between speed and safety?
should NOT be lifted and shift- Identity and Access Management
ed from on premises to a cloud (IAM), meaning you are now in Cheslock: In the past, we used to
environment? full control of providing access to have to choose between speed
your functions. You need to en- of deployment and the safety of
Cheslock: We mentioned this a sure the security is as least-priv- deploying and managing that
bit in the previous section, but ilege as possible. Additionally, code. That was the pre-DevOps
edge-based network-securi- your code needs to get to the conversations. How can we both
ty-monitoring tools. The chal- provider somehow, which means move fast and stay highly avail-
lenge you can get into is in the you’ll be running systems that do able. Well, in many ways those
cloud every one of your systems the continuous integration and are now considered solved prob-
could be acting as an endpoint, deployment — that is, where add- lems. We are now at the point of
and the edge of the network ing in security testing and static asking the same questions in the
could be wider than you would code-analysis tools at the build DevOps and security spaces. I
normally experience in a single and deployment side. think using many of the tools and
datacenter. The challenge comes technologies that enabled devs
into play when companies go InfoQ: How does data security — and ops to work better together,
multi-cloud — now you need to including access control, encryp- we can tie security into those
deal with disparate networks tion at rest and in transit, change same processes and procedures
and providers that in many ways data logging — look different in a and move quickly while increas-
don’t natively integrate. services world?  ing our security posture. 

20
SPONSORED ARTICLE

3 DevOps Security

The InfoQ eMag / Issue #70 / April 2019


Challenges & How to
Overcome Them
While organizations continue to adopt, expand, and perfect their DevOps game, security has become an
urgent issue. Malicious attacks on application layers are on the rise, and it seems like almost every day
brings news of yet another data breach in an organization. Enterprises are coming to realize that while
DevOps tools and processes helping them stay innovative within tight release timelines, the risks of slack
security remain real, immediate, and extremely costly. This puts DevOps outfits under pressure to imple-
ment stronger and smarter security measures, and adopt a set of secure DevOps practices.

Security: Too Slow to Join the Secure DevOps: Where DevOps and experts need to adjust them-
DevOps Squad? and Security Can Play Nice selves to a new organizational
Secure DevOps is a relatively new Over the past few years, more structure, new processes need
approach, and up until recently, and more enterprises and orga- to be adopted, new skills need
not many people thought it was nizations are making a concerted to be developed, and new tools
a good fit. Even security experts effort to shift security practic- need to be integrated. As compa-
point out that incorporating es left and implement security nies continue to adopt a secure
security people into the DevOps throughout the DevOps cycle, DevOps approach, they should be
cycle can be challenging. ensuring that it doesn’t impede aware of the common challenges
time to market. management teams face as they
Security expert Michele Chubir- set out on this journey.
ka says in her blog that, “While According to recent DigiCert re-
many security people have a search, organizations are already Here are a few barriers organiza-
good understanding of how to invested in secure DevOps. Re- tions face on the road to ensuring
find application vulnerabilities search results show that 49% of an efficient and innovative secure
and exploit them, they often don’t the organizations surveyed said DevOps cycle:
understand how software devel- that they are in the process of
opment teams work, especially integrating security with DevOps #1 Teamwork Makes the Dream
in Agile/DevOps organizations. and that another 49% said that Work
This leads to inefficiencies and a they already completed their Adopting a secure DevOps
flawed program.” DevOps security integration. approach requires teams and ex-
perts that aren’t used to working
This led to a situation where the Ensuring a Smooth Ride: 3 together to cooperate, creating
security team was essentially out DevOps Security Barriers & How and maintaining a development
of the DevOps picture, unable to to Overcome Them lifecycle that delivers quickly and
have a real impact on the final Change is never easy for an securely.
product in an efficient manner. organization, and managing a
secure DevOps cycle is quite a
READ THE FULL ARTICLE
transition on many levels. Teams

21
Containers face security risks at every stage, from building to shipping to
The InfoQ eMag / Issue #70 / April 2019

the run-time production phases. Securing them requires a layered strategy


throughout the stack and the deployment process.

Four Steps to
Continuous Security in
Container Deployment
by Fei Huang, Co-Founder & CEO of NeuVector

Containers face numerous se- containers forced to eat up Apache Struts exploit used in
curity risks at every stage of the system resources to crash other Equifax breach
deployment process, from build- containers, and plenty others. Apache Struts is a widely used
ing to shipping to the run-time framework for creating web ap-
production phases. These threats Many of these attacks start with plications in Java. It was initially
make achieving continuous previously undetected vulnera- believed that attackers used a
security essential to the integrity bilities, which can lie dormant for newly published Struts vulnera-
and safety of containers. Howev- years. Attackers exploit these to bility, CVE-2017-9805, to access
er, often these security measures gain a foothold, and then expand the Equifax data in 2017 but an
are skipped or overlooked in the into other hosts or containers. Equifax announcement indicated
rush to get the CI/CD pipeline
flowing faster. Many businesses
are paying the price for imple-
menting poor security years ago.
Hopefully, these mistakes won’t
be repeated in the migration to a
containerized environment.

Risks to containers and their


hosts come in many forms: ran-
somware, application-level DDoS
and cross-site scripting attacks,
compromised containers that
download extra malware or hunt
for sensitive data or weaknesses
in internal systems, container
breakouts that allow unautho-
rized access across systems,

22
that it was vulnerability CVE- SambaCry is a seven-year-old Linux Stack Clash

The InfoQ eMag / Issue #70 / April 2019


2017-5638, discovered months critical code-execution vulnera- The Linux Stack Clash vulner-
earlier, that provided the way in. bility (CVE-2017-7494) discov- ability (CVE-2010-2240) was
ered in the Samba networking recently discovered by Qualys
The vulnerable code of CVE- software that allows a remote security researchers. They
2017-9805 resides in the REST attacker to take control of an called it “Stack Clash” because
plugin of the Struts framework. affected Linux system. If you it involves clashing the stack
The plugin fails to validate and have your CVE database updated, with another memory region,
safely deserialize the user-up- vulnerability-scanning software such as the heap. While this is a
loaded data in the HTTP request. could help to find this CVE in local exploit in the user space, it
This allows attackers to write container images. Other tech- can still give attackers a foot-
arbitrary binary code to the web niques can also help detect a hold into the operating system
server and execute it remotely. privilege escalation or breakout. or kernel. Stack Clash could be
CVE-2017-5638 was reported used with other exploits to wreak
in the Jakarta multi-part pars- Elasticsearch and MongoDB are even more havoc on systems and
er in March 2017. By injecting two of the most popular appli- potentially move laterally. For
a crafted Content-Type HTTP cation container downloads at example, a recent sudo vulnera-
header with a ‘#cmd=’ string, the Docker Hub. Surprisingly simple bility (CVE-2017-100367) could
attacker is also able to execute attacks involving open ports and be combined with Stack Clash to
arbitrary commands on the web passwords could allow these to be able to run arbitrary code with
server. be used for ransomware. Basic root privileges.
container security precautions
Ransomware could prevent such an attack. Attack detection
Recent ransomware attacks have Frequent auditing and testing Every successful attack involves
exploited various vulnerabilities, of host and container security a kill chain of events, and de-
including open ports, remote settings would highlight risks in- tection is possible at multiple
code execution, and other appli- troduced by the latest application points using various techniques.
cation liabilities. updates or host deployments. Generally, to mitigate these risks
in a container environment, the
WannaCry/WannaCrypt attacks Dirty Cow following security measures
Microsoft Windows vulnerabili- The Dirty Cow (CVE-2016- should be taken:
ties on SMB, RDP, and IIS service 5195) kernel exploit is used by
ports like 445. Like most attacks, attackers to overwrite a setu- 1. Scan hosts and containers
there is a kill chain of events id program in the system. By (before and during run-time)
that leads to the ransomware replacing the setuid program, for vulnerabilities and patch
demand. the attacker gains root privileges vulnerable systems.
when the program is executed.
2. Monitor hosts and contain-
Once attackers are able to get While an attacker can perform
ers for suspicious processes
inside a network, they spread destructive acts, it is more likely
such as root-privilege escala-
laterally, called an “east/west” that they will try to expand their
tions and port scanning.
direction. Doing that has become access to other systems or appli-
much easier in a containerized cations as stealthily as possible. 3. Detect lateral movements and
environment due to the lack of It’s even possible for the exploit breakouts using suspicious
visibility into east/west container to stick around in a container en- network connections to other
traffic. vironment, even when the infect- hosts or containers.
ed containers are destroyed.

23
Here are the measures you can
The InfoQ eMag / Issue #70 / April 2019

put in place throughout the


container deployment process to
enact continuous security.

Step 1: Build phase


Continuous security begins with
building secure applications.
Developers must understand and
use proper techniques for mini-
mizing risk within the application
code itself. These techniques
include:

• Code analysis — Developers


should use code-analysis
tools that can recognize
and report any potential
vulnerabilities.

• Hardening — Reduce the


attack surface of the con-
tainer image by removing any
libraries and packages that
aren’t needed and by restrict-
ing non-required functions.

• Image scanning — Just be-


fore the ship phase, container
images should be scanned
for vulnerabilities in order to
catch any issues before the
application is built. Registry
scanning should also be done
regularly, as this can find new
issues in existing images.

4. Lock down containers to is implemented to prevent issues As a practical matter of execut-


exclude external access if not throughout the stack and at ing these security measures,
strictly required. each phase of the deployment they should be automated into
process. The correct security the delivery process/pipeline
5. Continuously audit security
controls and automated tests to using adequate tools, as doing so
settings for containers, hosts,
detect and address attacks and ensures that they occur continu-
and platform tools.
other issues are critical compo- ously and without fail.
nents for ensuring effective and
Curtailing these threats requires
secure applications.
a layered security strategy that

24
Step 2: Ship phase Step 3: Run-phase preparation

The InfoQ eMag / Issue #70 / April 2019


When preparing to deploy im- Ahead of running application containers live in
ages, security depends on the production, the run-time environment needs to be
right controls and verifications secured, including the host, kernel, Docker daemon,
in place to ensure trust. These and all network and system services:
include:
• Host and kernel security — These can be safe-
• Image signing — This ensures guarded using security modules such as AppAr-
that the author/publisher is mor, SELinux, seccomp, or the equivalent host
verified and that no image security settings.
tampering has occurred. For
• System and Docker daemon security — Make
example, Docker’s Content
sure that only authorized users can access
Trust feature provides this
sensitive systems and Docker commands and
security.
settings.
• User access controls — Sen-
• Secrets management — Use encryption to pro-
sitive systems and de-
tect secrets that are subject to application and
ployment tools (registries,
API access.
orchestration tools, etc.)
should have mechanisms in • Auditing — Audit security settings both before
place to effectively enforce and during run-time. This can be accomplished
restrictions and monitor user using the previously mentioned Docker Bench
access. for Security, Kubernetes CIS Benchmark, or oth-
er tools, and has the additional benefit of help-
In order to automate these secu- ing to meet container compliance requirements.
rity features to facilitate continu-
• Orchestration and network security — Secure
ous security, images for produc-
the container environment by using container
tion use should automatically be
management and orchestration tools capable
signed and tagged. Access con-
of controlling access, setting network policies,
trols for sensitive tools should
and using appropriate names and labels. These
be integrated with Active Direc-
tools can also make sure that security contain-
tory or LDAP directories. Docker
ers are running on every host.
Bench for Security can be run
as an automated process to test
These orchestration and integrated security tools
content trust and access-control
can deliver automated security testing and checks
issues.
against standard benchmarks, as well as automatic
policy updates to adapt to configuration changes
and clearer visualization of behavior within the
application and containers.

25
Step 4: Run-phase production Conclusion
The InfoQ eMag / Issue #70 / April 2019

Run-time in production environments is the most crucial phase when With the right strategy in place to
it comes to container security. This is the battleground where hackers integrate security tools and auto-
will attempt to exploit any vulnerabilities they’ve discovered, and se- mate policy, continuous contain-
curity efforts must detect and thwart those attempts. Hacker actions er security that offers protection
will include a kill chain, the series of events that occur as the hack- throughout the container deploy-
er moves from the host or another container to the targeted exploit ment process can be achieved.
point. This chain of events often presents several chances to detect
and prevent the hacker’s activities with these techniques:

• Network inspection and visualization — Inspecting network


behavior is the most opportune vantage point for monitoring
and recognizing suspicious activity. Be sure to inspect all con-
tainer-to-container connections as well as container and host
processes, and visualize application-stack behavior. If an attack
spreads and real-time response is necessary, these capabilities
will enable the security team to see it coming and respond.

• Layer-7-based application isolation — Go beyond layer-3 and lay-


er-4 network segmentation by also isolating and protecting based
on application protocols and inspecting container metadata. As
necessary, application activity can be blocked without affecting
containers.

• Threat detection — Monitor applications, always remaining on the


lookout for DDoS, DNS, or other varieties of network-based appli-
cation attacks.

• Privilege-escalation detection — Hacking efforts may attempt to


grant greater administrative privileges to unauthorized intrud-
ers. Detect these escalations on hosts and containers to foresee
breakouts and defend against such attacks. 

• Container quarantine — When a container exhibits suspicious


behavior, have the ability to quarantine it for safety while investi-
gating it.

• Run-time vulnerability scanning — All running containers should


be scanned for vulnerabilities; all newly created containers should
be scanned immediately as well.

• Packet capture and event logging — Capturing packets and creat-


ing event logs allows for more capable forensics efforts.

Tools for these security measures should be automatically deployed


to each host, and new container behavior should automatically be
learned or programmatically added to the security policy. Real-time
monitoring and alerts can be managed from either local consoles or
logs exported to SIEM systems.

26
The InfoQ eMag / Issue #70 / April 2019
Developing a Secure
and Scalable Web
Ecosystem at LinkedIn
by Mira Thambireddy, information security engineer at LinkedIn
and James Baker, Senior Software Engineer at LinkedIn

LinkedIn’s hyper- Between 2008 and 2014, LinkedIn’s global member base grew from
growth placed strains 16 million members to 330 million members, straining our organi-
zation’s infrastructure. As our member base grew, we needed more
on the organization’s
insight into how our members were using our platform and what
infrastructure. A product lines we could introduce to best serve them.
new release model
was instrumental Scaling through hyper-growth
to scale and led to The company produced numerous internal, web-based applications
increased code quality, that engineers, product managers, executives, and operations teams
security, and member used to perform a variety of crucial tasks such as A/B testing, appli-
satisfaction. cation deployment and lifecycle management, reporting, analytics,
and more. Teams also undertook new approaches to solve technolo-
gy problems, introducing and vetting a number of different languages,
frameworks, and tools. Such growth and experimentation resulted
in a lack of uniformity among technologies and solutions between

27
groups, which created strain as for developer ergonomics and timed with product manag-
The InfoQ eMag / Issue #70 / April 2019

engineers were hired to fill roles satisfaction. ers and marketing partners to
within emerging teams. coincide with their plans for new
This growing number of varying feature releases. It wasn’t easy
Languages such as Python, Ruby, technologies also introduced a to iterate on member feedback
Java, Scala, JavaScript, and security debt over time. Having within this infrequent cadence of
others emerged in various or- a large number of frameworks, 12 releases per year.
ganic efforts or acquisitions that languages, and components
peppered the ecosystem with in- made it increasingly difficult to Further, prevention and remedi-
compatible but useful solutions. assess the security posture of ation of potential security vul-
Mind you, this exploration was a the applications built on top of it. nerabilities strongly depended
healthy and intentional endeavor Additionally, this undermined the upon the deployment and release
to find the best long-term solu- efforts to move towards releas- process. It was imperative that
tions for problems we sought to ing a common framework-level once a fix was identified and in
solve. Teams were encouraged to security solution to eliminate place that we get it into the pro-
seek out technologies that they certain classes of vulnerabilities. duction environment as quickly
felt might benefit the organiza- as possible. This often meant
tion and this exploratory process The impact of a slow deployment that security fixes were hotfixed
was instrumental in helping us process against the release cycle instead
define what we would lean on, Around this same time, our of incorporated within it. It is
long term, as a scaling and nota- complex infrastructure for the generally good practice to deploy
ble organization in Silicon Valley Linkedin.com website alone sur- a security patch in isolation —
and across the globe. passed 3,000 submodules across i.e., not to add other, non-security
more than 6 million lines of code, bug fixes along with a securi-
By mid-2015, several dozen all within a single repository ty update. This is primarily to
active projects had surfaced with trunk. This trunk approach was reduce the chances of re-intro-
various implementations, frame- governed by a tedious monthly ducing a security vulnerability if
works, and libraries. Because of release cycle that encompassed the patch is rolled back due to a
the varying approaches, teams hundreds of engineers across non-security update that breaks
struggled to share code and, various teams. Prior to each functionality.
though repositories and arti- release, a release candidate (RC)
facts were in place, the imple- was selected and handed off to A less obvious side effect of
mentations themselves lacked our testing teams for four days of hyper-growth, a long release ca-
uniformity. In the case of JavaS- manual regression testing. If they dence, and a mixture of technol-
cript, some used a composite of found any bugs, we made hot- ogies was an emerging “blocky”
libraries and micro-libraries like fixes to the RC to avoid disrupt- and inconsistent user experience
jQuery and Backbone.js; some ing the deployment. Engineers (UX). As LinkedIn began to em-
teams used popular frameworks rushed to get their code checked ploy user research in the product
while others rolled their own. A in before the deadline to avoid development process, we found
growing uncertainty loomed over having to wait an entire month to that many users felt the site was
how we would approach building deliver their features or bug fixes disconnected and that one page
front-ends for applications, how to members. would look different from anoth-
developers could share common er. Because teams were releasing
logic across teams, and how we Such a serial and time-sensitive so far apart in cycles, the feed-
could streamline best practices process had to be meticulously back loop for UI changes was

28
The InfoQ eMag / Issue #70 / April 2019
Figure 1 / Our former deployment process.

delayed, impacting the quality of and extended product lines and


changes over time. services.

Introduction of the 3x3 method Transitioning to such a release


In 2014, LinkedIn’s mobile model was challenging and
engineering teams had begun required involvement from all
experimenting with what would areas of engineering, especially
become our current release from our tooling and infrastruc-
model. Dubbed “train release”, ture teams. It meant that we
this approach shifted our month- would have to revisit our existing
ly release cadence to one called internal applications and tooling
“3x3”, meaning that we would re- to ensure that developers re-
lease three times per day, with no ceived timely information about
more than three hours between the status of the deployment
when code is committed to when process, that they had the proper
that code becomes available to scripting and systems in place to
members. automate much of that process,
and that proper end-to-end test-
The idea behind this was not ing could take place to ensure
just web-specific. The ultimate adequate code coverage.
goal was to have all platforms
running on this cadence, includ- We would not be able to test all
ing iOS, Android, API, and other changes in such a short amount
back-end services necessary to of time between release cycles
run the LinkedIn.com experience in this newly proposed approach,

29
placing a strong and necessary emphasis on test-
The InfoQ eMag / Issue #70 / April 2019

ing and automation. This, among other challenges,


resulted in the need for client-side technologies
that naturally emphasized testing in the develop-
ment lifecycle — testing historically has not been in
the purview of client-side engineering in the in-
dustry, particularly in web. This, combined with the
many pain points listed above, became the catalyst
for change in not only the Linkedin.com experience,
but in the structure of our infrastructure and appli-
cation-level technology stack.

While this meant that we could now fix a security


issue identified on the platform in a short time, it
also meant that security issues could slip in fast
with this frequency of code deployment. And when
such a model is adopted by 100+ applications that
comprise the LinkedIn ecosystem, it amplifies the
need for security automation.

Our next play


A simple but powerful approach towards secur-
ing web applications is to rely upon frameworks
that offer inherent security features. Of course, the
choice of framework is not only dependent on se-
Figure 2 / Project Voyager.
curity, but also performance, ease of use, and other
factors.
consistent user experience (UX) across mobile
Our infrastructure team, in collaboration with other platforms (iOS, Android, and Web). Focusing on
partner teams, began extensively researching and mobile first gave us the opportunity to later extend
vetting many languages, frameworks, and librar- to a future desktop application that would embrace
ies, creating gap analyses for technologies that the same UI patterns and theme, providing a con-
spanned the server-client relationship and the sistent experience across all platforms.
applications that would serve as tooling for future
spin-ups in new and existing product lines and As a result of this effort, we chose two frameworks
internal platforms. for building our API and web client: the Play Frame-
work for Java and the Ember.js framework for web
Alongside this effort, our User Experience Research were chosen to be the de facto frameworks used
team established extensive focus groups and for building web applications. LinkedIn had been
feedback efforts from members to gain a better investing effort to contribute to the Play Framework
sense of what the ideal experience for LinkedIn. for some time prior to this new project. Our security
com would be. team performed an extensive gap analysis on the
security features that were currently available in
These joint efforts of product, design, and engi- these frameworks against those features that were
neering resulted in Project Voyager - a mobile-first, required for our stack.

30
The InfoQ eMag / Issue #70 / April 2019
Figure 3 / Pre-commit hook tool for scanning for potential XSS.

Our analysis concluded that the • a well-developed and seman-


Play Framework provided a se- tic approach for testing UI
cure-by-default approach along components.
with a responsive security team,
an active core-developer com- By moving the web to a cli-
munity, extensive documentation, ent-side application, we were
and a stable release cycle. able to establish a uniform
internal API for all clients (iOS,
Ember.js shared all of these traits Android, web), better aligning
as well. As a single-page appli- our infrastructure across vari-
cation (SPA) framework, Ember.js ous platforms and reducing the
also provided: number of applications needed to
provide data.
• future support for server-side
rendering (SSR) through tech- Ember.js’s focus on tests took us
nologies like Fastboot; another step towards automat-
ing deployment and was instru-
• developer-focused, CLI-
mental in our efforts towards
based ergonomics like gen-
embracing 3x3. The framework
erators and blueprints and an
provides three types of tests:
active add-on community;
integration, acceptance, and
• an active core-developer unit tests. Integration testing
community; allowed us to test data flows
and interactions of components
• focus on impacting and
in the application, acceptance
polyfilling emerging industry
tests gave us user interaction
standards through clear and
testing, and unit tests provided
powerful abstract primitives;
us with ways to test application
and
logic. As developers generated
new components, the framework
would produce the test files as

31
well, allowing the developer to focus on more interesting areas ensuring broader coverage and
The InfoQ eMag / Issue #70 / April 2019

focus more on writing code and of the application and underlying faster turnaround time for the
verifying its functionality in the framework and provides us more assessment of our applications.
tests as opposed to just in the time to research some in-depth
browser. vulnerabilities in those areas. An established approach to
security assessment is through
Security in depth As we added API endpoints to the the adoption of security in depth.
At Linkedin, our security team application, we needed a security We do not want to be in a sit-
performs in-depth design reviews analysis to prevent vulnerabili- uation where the failure of one
including hands-on penetra- ties from emerging. Previously, particular security control results
tion tests for all member-facing this process was operationally in the failure of the entire chain.
products, features, and func- cumbersome, given the number We love to give developers the
tionalities. We are also heavily of routes (paths to resources or tooling they need to avoid intro-
invested in security automation. URLs) per application and the ducing security vulnerabilities.
However, with the 3x3 deploy- number of applications in the Our product-security team built
ment architecture, we couldn’t system. Our security team built tooling to scan the code changes
possibly scale manual penetra- tooling to detect and notify us for potential vulnerabilities. If the
tion test for all builds, resulting in of any new changes made to tooling detects any anti-patterns
a decision to double down on se- an application, broken down by or discouraged practices, it noti-
curity automation. Once we find the nature of change (addition fies the developer and suggests
a class of vulnerability that can or deletion of an external API code fixes to allow the developer
be detected with a high level of route, modification to key code the opportunity to properly ad-
confidence, we build automation of the application, etc.) to assist dress the problem. Once past the
checks for that class. Our part- in the evaluation of each such code review process, the tool-
ner product-security engineering commit to the application. This ing again analyzes the code for
teams have helped in building, let us determine the state of an changes and if it finds a potential
maintaining, and scaling such application since the last review. vulnerability, it rejects the code
automation. This allows us to This allowed for targeted reviews, at the pre-commit stage of the

Figure 4 / Our current (3x3) release cycle.

32
deployment pipeline, through the but is also scanned with linters an organization and has ushered

The InfoQ eMag / Issue #70 / April 2019


adoption of custom pre-commit for various languages to ensure in increased code quality, secu-
hooks. that developers are writing code rity, productivity, and member
similar to their peers. As men- satisfaction. We are now more
Once a security issue has been tioned, these code changes also capable of providing our mem-
identified on the platform through undergo an automated, custom- bers with a safer, faster, modern
any channel, our goal is to pre- ized security scan to check for experience, quickly resolving
vent the same issue from resur- known classes of vulnerabilities issues or bugs that are found and
facing in the future. To help avoid including, but not limited to XSS, innovating more rapidly.
regression issues, we build tool- CSRF, and access-control issues.
ing and test cases that contin- Once developers receive the
uously run against the deployed approvals they need and have
services, detect the reintroduc- addressed any open issues, their
tion of a particular instance of a code is submitted through a set
security vulnerability, and alert of systems to ensure its health
the security team. before it makes it into the set
of commits bound for the next
In January 2014, prior to the deployment.
introduction of this system, we
identified over 5,000 potential These systems will perform a
XSS vulnerabilities through code variety of tasks as well as run all
scans; by January 2016, that of the application’s tests. If these
number was less than 500. The tests do not pass, they reject the
number of pre-commit failures commit and notify the developer.
due to the introduction of offend- Once the commit passes, it en-
ing commits steadily declined ters the trunk of the application
during this same timeframe. and a separate set of tests run to
Through our methodical ap- ensure the code did not intro-
proach to security automation, duce performance regressions or
we saw close to a 90% reduction exceed other obvious thresholds
in the presence and introduction established by the application
of potential vulnerabilities. owners. Assuming it passes all
these, the commit ends up in a
To date, we average 50-75 production environment at the
commits in our web client per next available deployment. If no
day from a developer body of commits are introduced between
over 100 UI engineers in a single deployment times, a deployment
repository. Each of these com- is still performed against the
mits goes through a code review same version; this is part of the
system and requires several sep- 3x3 methodology and ensures
arate approvals from developers that code is rigorously tested.
on access-control lists (ACLs)
to ensure code is at the highest The resulting shift towards a new
quality. Code is evaluated against release model has been instru-
a style guide of best practices mental in our ability to scale as

33
InfoQ @ InfoQ InfoQ InfoQ

Curious about
previous issues?

This eMag explores how In this eMag covering .NET This eMag will inspire you
Kubernetes is moving from Core, we will explore the to dig deeper into your
a simple orchestration benefits of .NET Core and systems, question your
framework to a fundamental how it can benefit not only mental models, and use
cloud-native API and traditional .NET developers chaos engineering to build
paradigm that has but all technologists that confidence in your system’s
implications in multiple need to bring robust, behaviors under turbulent
dimensions, from operations performant and economical conditions.
to software architecture. solutions to market.

You might also like