SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Securing Application Deployments in
Multi-tenant CI/CD Environments
O’Reilly Security Conference NY 2016
HELLO!
I am Binu Ramakrishnan
Principal Security Engineer
at Yahoo
You can find me at:
@securitysauce
github.com/prbinu
Overview
▹ A brief introduction to CI/CD platform
▹ Challenges with multi-tenant CI/CD environments
▹ Threat modeling
▹ Security patterns and best practices
CI/CD
A CI/CD pipeline is a set of jobs chained to achieve continuous delivery, and deployment of
applications to production.
CI/CD Deployments
Single-tenant | Multi-tenant
Single-tenant
▹ Dedicated build environments
▹ Distributed
▹ Tenant and provider are the same
▹ Limited security impact
Multi-tenant
▹ Shared build environments
▹ Driven by economies of scale
▹ Focused on operational efficiency
▹ Allow enterprise to centrally
enforce dev stds & compliance
controls
▹ Gateway to enterprise networks
Multi-tenant CI/CD - Security Risks
▹ This platform can be an attractive target for attackers because:
▸ Consolidation of large number of long-lived keys in one place
▸ It acts as a corridor that directly connects to large number of machines, bypassing
firewalls
▹ A successful attack can have a significant impact to an enterprise
▸ Leads to exposure of user’s personal info, application credentials, TLS private keys etc.
Denial of Service (DoS) Attacks
* http://bit.ly/2exRpWm
“Enterprises relying on SaaS apps had no choice
but to sit and wait and hope their providers got
back online as soon as possible.” *
CI/CD in Nutshell
Enterprise CI/CD
Threat Modeling
CI/CD Admin
Exclusive access to the CI/CD
platform
Actors
User/Developer
Person who uses the platform
and run their build pipelines.
CI/CD Platform
Developer
Limited admin access to the
platform.
Trust Boundaries
▹ Application - web interface, REST APIs
▹ Host - isolation between host OS and the build job
▹ Network - segment build machines from other
machines and from Internet
Entry Points
▹ Build web interface
▹ Commit handlers
▹ Internal endpoints
▸ Build slave endpoint (to launch
builds; SSH)
▹ Deployable artifacts
▹ Build notifications - eg. emails, IRC
and Hipchat messages
▹ Build console logs
.
Attack Surface
Exit Points
Threats
16
Common Threats
▹ User account compromise & insider threats
▸ User and platform admins
▹ Network Intrusion
▸ CI/CD internal and external endpoints
Local Storage of Non-ephemeral Keys
▹ Long-lived keys are stored locally to allow build jobs to access
protected services.
▹ OAuth tokens, Shared secrets, SSH private keys etc.
Weak Security Controls
Build jobs require access to services as part of their execution (eg. artifacts
store). Protection mechanism used by those services are less effective in
following cases:
▸ IP whitelist based protection
▸ Shared secrets: shared (and accessible) by all build jobs
The above controls are susceptible to spoofing in multi-tenant environments.
Build Slave Compromise
Large attack surface, spread across multiple networks (iphone, Android,
Server app etc.)
How?
▹ A network level compromise, exploiting a vulnerability on build slaves
▹ Jobs break out of build container
Impact
▹ Listen to the network, spoof identity and access locally stored
credentials
▹ Gain access to unauthorized machines and steal sensitive data
Building External Code
An attacker can take this path to get into internal network, either by
adding backdoors or exploiting known vulnerabilities with open
source software.
Security Patterns for
Risk Reduction
Ephemeral Keys
https://www.flickr.com/photos/articnomad/241620406
JWT, OAuth, SSH-CA, AWS access key etc.
▹ Automated deployments require delegation
▹ Token Delegation: a controlled replay of tokens
▹ Ephemeral keys go well with token delegation
model
Capability Delegation &
Stateless Auth
https://www.flickr.com/photos/18946008@N06/14551311971/
By passing capabilities (in the form of tokens)
with build events, we eliminate the need to
store long-lived keys in CI/CD platform
▹ Separate out auth components from the core build platform
▹ The Auth service intercepts and authenticates build events, and issues job tokens to downstream
build platform
▹ Stateless: Build platform no longer stores job specific long-lived keys
▹ Distributed: Per tenant Auth service for cloud based environments, hosted inside tenant’s network
▹ No consolidation of keys in one place
Audit Trails
▹ Immutable and append-only
▹ Traceability: logs should capture build pipeline
events end to end from commit to final deploy.
▹ Trail traits: who, how, when, sequence of events,
start and end state.
▹ Audit trails produced by the Auth service can
provide a verifiable chain of trust from commit to
deploy.
Container &
ToolChain
Hardening
Network Segmentation
Colocating CI/CD platform with other
corporate machines allow malicious build
jobs to raid your internal network.
The recommendation is to zone CI/CD
platform from other corporate systems.
Minimal Builds
▹ Do not expose PII or other sensitive info to build machines.
▹ Do complex tests outside of build, in a separate environment you
control.
Few more...
SSH: Use
Restricted
Shells
Headless SSH access for
automated deployment
should use a restricted shell.
Roll Keys
Periodically
Establish a process to
periodically roll trust anchor
keys (and do it periodically).
Restrict Job
Console Logs
Restrict build job console logs
only to authorized users
Enable 2FA
Admins must follow good
security hygiene and use 2FA
to access platform
application and hosts.
Prune Admin
Access List
Keep admin list small for
build systems and Git repo
access.
Vulnerability
Patch Mgmt
Maintain an inventory of all
packages in use and have a
mechanism to patch the system
in response to a disclosure.
Acknowledgements
▹ Christopher Harrell
▹ St John Johnson
▹ Mike Shema
▹ Jeremiah Wuenschel
Let’s recap major concepts
Ephemeral Keys
Replace long-lived keys with
time-bound scoped tokens.
Service providers should start
supporting tokens for auth &
authz.
Capability
Delegation
Delegate job capabilities with
build events, and eliminate the
need to store long-lived keys in
CI/CD platform.
Audit Trails
A verifiable chain of trust
based on traceable audit logs
is a foundational requirement
for CI/CD.
Minimal Builds
Avoid pulling PII or other
production sensitive data to
build environments. Keep the
builds to minimum.
Network
Segmentation
Network level Isolation of CI/CD
machines.
Build ToolChain
Hardening
Build tools and Docker
containers must be adequately
hardened.
THANKS!
Any questions?
You can find me at:
@securitysauce
github.com/prbinu
CREDITS
Special thanks to all the people who made and
released these awesome resources for free:
▹ Presentation template by SlidesCarnival
▹ Photographs by Death to the Stock Photo
(license)

Weitere ähnliche Inhalte

Was ist angesagt?

Keeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp VaultKeeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp VaultMitchell Pronschinske
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultAWS Germany
 
User Management Life Cycle with Keycloak
User Management Life Cycle with KeycloakUser Management Life Cycle with Keycloak
User Management Life Cycle with KeycloakMuhammad Edwin
 
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Svetlin Nakov
 
Welcome to the Jungle: Pentesting AWS
Welcome to the Jungle: Pentesting AWSWelcome to the Jungle: Pentesting AWS
Welcome to the Jungle: Pentesting AWSMike Felch
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesMikhail Egorov
 
Managing secrets at scale
Managing secrets at scaleManaging secrets at scale
Managing secrets at scaleAlex Schoof
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring SecurityOrest Ivasiv
 
Kubernetes - Security Journey
Kubernetes - Security JourneyKubernetes - Security Journey
Kubernetes - Security JourneyJerry Jalava
 
Introduction to Vault
Introduction to VaultIntroduction to Vault
Introduction to VaultKnoldus Inc.
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration TestersNikhil Mittal
 
Spring Security
Spring SecuritySpring Security
Spring SecurityBoy Tech
 

Was ist angesagt? (20)

Vault
VaultVault
Vault
 
Keeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp VaultKeeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp Vault
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s Vault
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
User Management Life Cycle with Keycloak
User Management Life Cycle with KeycloakUser Management Life Cycle with Keycloak
User Management Life Cycle with Keycloak
 
Spring Security 5
Spring Security 5Spring Security 5
Spring Security 5
 
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
 
Vault 101
Vault 101Vault 101
Vault 101
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Welcome to the Jungle: Pentesting AWS
Welcome to the Jungle: Pentesting AWSWelcome to the Jungle: Pentesting AWS
Welcome to the Jungle: Pentesting AWS
 
Container Security
Container SecurityContainer Security
Container Security
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
 
Managing secrets at scale
Managing secrets at scaleManaging secrets at scale
Managing secrets at scale
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 
Kubernetes - Security Journey
Kubernetes - Security JourneyKubernetes - Security Journey
Kubernetes - Security Journey
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Introduction to Vault
Introduction to VaultIntroduction to Vault
Introduction to Vault
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 
Spring Security
Spring SecuritySpring Security
Spring Security
 
How fun of privilege escalation Red Pill2017
How fun of privilege escalation  Red Pill2017How fun of privilege escalation  Red Pill2017
How fun of privilege escalation Red Pill2017
 

Andere mochten auch

Analysis of TLS in SMTP World
Analysis of TLS in SMTP WorldAnalysis of TLS in SMTP World
Analysis of TLS in SMTP WorldBinu Ramakrishnan
 
Github, Travis-CI and Perl
Github, Travis-CI and PerlGithub, Travis-CI and Perl
Github, Travis-CI and PerlDave Cross
 
Scaling Up Continuous Deployment
Scaling Up Continuous DeploymentScaling Up Continuous Deployment
Scaling Up Continuous DeploymentTimothy Fitz
 
Continuous Delivery in the AWS Cloud
Continuous Delivery in the AWS CloudContinuous Delivery in the AWS Cloud
Continuous Delivery in the AWS CloudNigel Fernandes
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentTimothy Fitz
 
Multi tenancy - Wining formula for a PaaS
Multi tenancy - Wining formula for a PaaSMulti tenancy - Wining formula for a PaaS
Multi tenancy - Wining formula for a PaaSWSO2
 
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec ProgramAppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec ProgramMatt Tesauro
 
Infrastructure Continuous Delivery using CloudFormation
Infrastructure Continuous Delivery using CloudFormationInfrastructure Continuous Delivery using CloudFormation
Infrastructure Continuous Delivery using CloudFormationjoehack3r
 
Content Security Policy - Lessons learned at Yahoo
Content Security Policy - Lessons learned at YahooContent Security Policy - Lessons learned at Yahoo
Content Security Policy - Lessons learned at YahooBinu Ramakrishnan
 
Continuous Deployment: Beyond Continuous Delivery
Continuous Deployment: Beyond Continuous DeliveryContinuous Deployment: Beyond Continuous Delivery
Continuous Deployment: Beyond Continuous DeliveryTimothy Fitz
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeAmazon Web Services
 
Infrastructure as Code with AWS CloudFormation
Infrastructure as Code with AWS CloudFormationInfrastructure as Code with AWS CloudFormation
Infrastructure as Code with AWS CloudFormationJustyna Janczyszyn
 
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3Mirco Hering
 
Transforming the Monolith at 20M tph
Transforming the Monolith at 20M tphTransforming the Monolith at 20M tph
Transforming the Monolith at 20M tphVMware Tanzu
 
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...XebiaLabs
 
Building a Foundation for Global Digital Marketing
Building a Foundation for Global Digital MarketingBuilding a Foundation for Global Digital Marketing
Building a Foundation for Global Digital MarketingMerkle
 
A Scalable Client Authentication & Authorization Service for Container-Based ...
A Scalable Client Authentication & Authorization Service for Container-Based ...A Scalable Client Authentication & Authorization Service for Container-Based ...
A Scalable Client Authentication & Authorization Service for Container-Based ...Binu Ramakrishnan
 

Andere mochten auch (20)

Analysis of TLS in SMTP World
Analysis of TLS in SMTP WorldAnalysis of TLS in SMTP World
Analysis of TLS in SMTP World
 
Smtp 102013
Smtp 102013Smtp 102013
Smtp 102013
 
Github, Travis-CI and Perl
Github, Travis-CI and PerlGithub, Travis-CI and Perl
Github, Travis-CI and Perl
 
Scaling Up Continuous Deployment
Scaling Up Continuous DeploymentScaling Up Continuous Deployment
Scaling Up Continuous Deployment
 
Continuous Delivery in the AWS Cloud
Continuous Delivery in the AWS CloudContinuous Delivery in the AWS Cloud
Continuous Delivery in the AWS Cloud
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous Deployment
 
Multi tenancy - Wining formula for a PaaS
Multi tenancy - Wining formula for a PaaSMulti tenancy - Wining formula for a PaaS
Multi tenancy - Wining formula for a PaaS
 
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec ProgramAppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
 
Infrastructure Continuous Delivery using CloudFormation
Infrastructure Continuous Delivery using CloudFormationInfrastructure Continuous Delivery using CloudFormation
Infrastructure Continuous Delivery using CloudFormation
 
Smtp server q&a webinar
Smtp server q&a webinarSmtp server q&a webinar
Smtp server q&a webinar
 
Content Security Policy - Lessons learned at Yahoo
Content Security Policy - Lessons learned at YahooContent Security Policy - Lessons learned at Yahoo
Content Security Policy - Lessons learned at Yahoo
 
Continuous Deployment: Beyond Continuous Delivery
Continuous Deployment: Beyond Continuous DeliveryContinuous Deployment: Beyond Continuous Delivery
Continuous Deployment: Beyond Continuous Delivery
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as Code
 
Infrastructure as Code with AWS CloudFormation
Infrastructure as Code with AWS CloudFormationInfrastructure as Code with AWS CloudFormation
Infrastructure as Code with AWS CloudFormation
 
Dod is not done
Dod is not doneDod is not done
Dod is not done
 
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
 
Transforming the Monolith at 20M tph
Transforming the Monolith at 20M tphTransforming the Monolith at 20M tph
Transforming the Monolith at 20M tph
 
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
 
Building a Foundation for Global Digital Marketing
Building a Foundation for Global Digital MarketingBuilding a Foundation for Global Digital Marketing
Building a Foundation for Global Digital Marketing
 
A Scalable Client Authentication & Authorization Service for Container-Based ...
A Scalable Client Authentication & Authorization Service for Container-Based ...A Scalable Client Authentication & Authorization Service for Container-Based ...
A Scalable Client Authentication & Authorization Service for Container-Based ...
 

Ähnlich wie Securing application deployments in multi-tenant CI/CD environments

Securing Application Deployments in CI/CD Environments (Updated slides: http:...
Securing Application Deployments in CI/CD Environments (Updated slides: http:...Securing Application Deployments in CI/CD Environments (Updated slides: http:...
Securing Application Deployments in CI/CD Environments (Updated slides: http:...Binu Ramakrishnan
 
Implementing a Security strategy in IoT, Practical example Automotive Grade L...
Implementing a Security strategy in IoT, Practical example Automotive Grade L...Implementing a Security strategy in IoT, Practical example Automotive Grade L...
Implementing a Security strategy in IoT, Practical example Automotive Grade L...LibreCon
 
DevSecOps: The Open Source Way
DevSecOps: The Open Source WayDevSecOps: The Open Source Way
DevSecOps: The Open Source WayGordon Haff
 
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDPKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDDevOps.com
 
Secure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliverySecure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliveryBlack Duck by Synopsys
 
Secure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliverySecure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliveryTim Mackey
 
How to build a self-documenting application
How to build a self-documenting applicationHow to build a self-documenting application
How to build a self-documenting applicationconjur_inc
 
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...Priyanka Aash
 
Building A Self-Documenting Application: A Study in Chef and Compliance
Building A Self-Documenting Application: A Study in Chef and ComplianceBuilding A Self-Documenting Application: A Study in Chef and Compliance
Building A Self-Documenting Application: A Study in Chef and ComplianceKevin Gilpin
 
Secure containers for trustworthy cloud services: business opportunities
 Secure containers for trustworthy cloud services: business opportunities Secure containers for trustworthy cloud services: business opportunities
Secure containers for trustworthy cloud services: business opportunitiesATMOSPHERE .
 
Q Con New York 2015 Presentation - Conjur
Q Con New York 2015 Presentation - ConjurQ Con New York 2015 Presentation - Conjur
Q Con New York 2015 Presentation - Conjurconjur_inc
 
Windows Server 2016 ile İşlerinizi Daha Güvenli Gerçekleştirin!
Windows Server 2016 ile İşlerinizi Daha Güvenli Gerçekleştirin!Windows Server 2016 ile İşlerinizi Daha Güvenli Gerçekleştirin!
Windows Server 2016 ile İşlerinizi Daha Güvenli Gerçekleştirin!MSHOWTO Bilisim Toplulugu
 
Enterprise Node - Securing Your Environment
Enterprise Node - Securing Your EnvironmentEnterprise Node - Securing Your Environment
Enterprise Node - Securing Your EnvironmentKurtis Kemple
 
Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!All Things Open
 
Operations: Security Crash Course — Best Practices for Securing your Company
Operations: Security Crash Course — Best Practices for Securing your CompanyOperations: Security Crash Course — Best Practices for Securing your Company
Operations: Security Crash Course — Best Practices for Securing your CompanyAmazon Web Services
 
Platform Security IRL: Busting Buzzwords & Building Better
Platform Security IRL:  Busting Buzzwords & Building BetterPlatform Security IRL:  Busting Buzzwords & Building Better
Platform Security IRL: Busting Buzzwords & Building BetterEqual Experts
 
Implementing zero trust in IBM Cloud Pak for Integration
Implementing zero trust in IBM Cloud Pak for IntegrationImplementing zero trust in IBM Cloud Pak for Integration
Implementing zero trust in IBM Cloud Pak for IntegrationKim Clark
 
Hybrid - Seguridad en Contenedores v3.pptx
Hybrid - Seguridad en Contenedores v3.pptxHybrid - Seguridad en Contenedores v3.pptx
Hybrid - Seguridad en Contenedores v3.pptxHansFarroCastillo1
 
Introduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural PatternsIntroduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural PatternsMathieu Mailhos
 

Ähnlich wie Securing application deployments in multi-tenant CI/CD environments (20)

Securing Application Deployments in CI/CD Environments (Updated slides: http:...
Securing Application Deployments in CI/CD Environments (Updated slides: http:...Securing Application Deployments in CI/CD Environments (Updated slides: http:...
Securing Application Deployments in CI/CD Environments (Updated slides: http:...
 
Implementing a Security strategy in IoT, Practical example Automotive Grade L...
Implementing a Security strategy in IoT, Practical example Automotive Grade L...Implementing a Security strategy in IoT, Practical example Automotive Grade L...
Implementing a Security strategy in IoT, Practical example Automotive Grade L...
 
DevSecOps: The Open Source Way
DevSecOps: The Open Source WayDevSecOps: The Open Source Way
DevSecOps: The Open Source Way
 
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDPKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
 
Secure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliverySecure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous Delivery
 
Secure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliverySecure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous Delivery
 
How to build a self-documenting application
How to build a self-documenting applicationHow to build a self-documenting application
How to build a self-documenting application
 
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
 
Building A Self-Documenting Application: A Study in Chef and Compliance
Building A Self-Documenting Application: A Study in Chef and ComplianceBuilding A Self-Documenting Application: A Study in Chef and Compliance
Building A Self-Documenting Application: A Study in Chef and Compliance
 
Secure containers for trustworthy cloud services: business opportunities
 Secure containers for trustworthy cloud services: business opportunities Secure containers for trustworthy cloud services: business opportunities
Secure containers for trustworthy cloud services: business opportunities
 
Q Con New York 2015 Presentation - Conjur
Q Con New York 2015 Presentation - ConjurQ Con New York 2015 Presentation - Conjur
Q Con New York 2015 Presentation - Conjur
 
Windows Server 2016 ile İşlerinizi Daha Güvenli Gerçekleştirin!
Windows Server 2016 ile İşlerinizi Daha Güvenli Gerçekleştirin!Windows Server 2016 ile İşlerinizi Daha Güvenli Gerçekleştirin!
Windows Server 2016 ile İşlerinizi Daha Güvenli Gerçekleştirin!
 
Enterprise Node - Securing Your Environment
Enterprise Node - Securing Your EnvironmentEnterprise Node - Securing Your Environment
Enterprise Node - Securing Your Environment
 
Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!
 
Operations: Security Crash Course — Best Practices for Securing your Company
Operations: Security Crash Course — Best Practices for Securing your CompanyOperations: Security Crash Course — Best Practices for Securing your Company
Operations: Security Crash Course — Best Practices for Securing your Company
 
Platform Security IRL: Busting Buzzwords & Building Better
Platform Security IRL:  Busting Buzzwords & Building BetterPlatform Security IRL:  Busting Buzzwords & Building Better
Platform Security IRL: Busting Buzzwords & Building Better
 
Operations: Security
Operations: SecurityOperations: Security
Operations: Security
 
Implementing zero trust in IBM Cloud Pak for Integration
Implementing zero trust in IBM Cloud Pak for IntegrationImplementing zero trust in IBM Cloud Pak for Integration
Implementing zero trust in IBM Cloud Pak for Integration
 
Hybrid - Seguridad en Contenedores v3.pptx
Hybrid - Seguridad en Contenedores v3.pptxHybrid - Seguridad en Contenedores v3.pptx
Hybrid - Seguridad en Contenedores v3.pptx
 
Introduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural PatternsIntroduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural Patterns
 

Kürzlich hochgeladen

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Securing application deployments in multi-tenant CI/CD environments

  • 1. Securing Application Deployments in Multi-tenant CI/CD Environments O’Reilly Security Conference NY 2016
  • 2. HELLO! I am Binu Ramakrishnan Principal Security Engineer at Yahoo You can find me at: @securitysauce github.com/prbinu
  • 3. Overview ▹ A brief introduction to CI/CD platform ▹ Challenges with multi-tenant CI/CD environments ▹ Threat modeling ▹ Security patterns and best practices
  • 4. CI/CD A CI/CD pipeline is a set of jobs chained to achieve continuous delivery, and deployment of applications to production.
  • 6. Single-tenant ▹ Dedicated build environments ▹ Distributed ▹ Tenant and provider are the same ▹ Limited security impact
  • 7. Multi-tenant ▹ Shared build environments ▹ Driven by economies of scale ▹ Focused on operational efficiency ▹ Allow enterprise to centrally enforce dev stds & compliance controls ▹ Gateway to enterprise networks
  • 8. Multi-tenant CI/CD - Security Risks ▹ This platform can be an attractive target for attackers because: ▸ Consolidation of large number of long-lived keys in one place ▸ It acts as a corridor that directly connects to large number of machines, bypassing firewalls ▹ A successful attack can have a significant impact to an enterprise ▸ Leads to exposure of user’s personal info, application credentials, TLS private keys etc.
  • 9. Denial of Service (DoS) Attacks * http://bit.ly/2exRpWm “Enterprises relying on SaaS apps had no choice but to sit and wait and hope their providers got back online as soon as possible.” *
  • 13. CI/CD Admin Exclusive access to the CI/CD platform Actors User/Developer Person who uses the platform and run their build pipelines. CI/CD Platform Developer Limited admin access to the platform.
  • 14. Trust Boundaries ▹ Application - web interface, REST APIs ▹ Host - isolation between host OS and the build job ▹ Network - segment build machines from other machines and from Internet
  • 15. Entry Points ▹ Build web interface ▹ Commit handlers ▹ Internal endpoints ▸ Build slave endpoint (to launch builds; SSH) ▹ Deployable artifacts ▹ Build notifications - eg. emails, IRC and Hipchat messages ▹ Build console logs . Attack Surface Exit Points
  • 17. Common Threats ▹ User account compromise & insider threats ▸ User and platform admins ▹ Network Intrusion ▸ CI/CD internal and external endpoints
  • 18. Local Storage of Non-ephemeral Keys ▹ Long-lived keys are stored locally to allow build jobs to access protected services. ▹ OAuth tokens, Shared secrets, SSH private keys etc.
  • 19. Weak Security Controls Build jobs require access to services as part of their execution (eg. artifacts store). Protection mechanism used by those services are less effective in following cases: ▸ IP whitelist based protection ▸ Shared secrets: shared (and accessible) by all build jobs The above controls are susceptible to spoofing in multi-tenant environments.
  • 20. Build Slave Compromise Large attack surface, spread across multiple networks (iphone, Android, Server app etc.) How? ▹ A network level compromise, exploiting a vulnerability on build slaves ▹ Jobs break out of build container Impact ▹ Listen to the network, spoof identity and access locally stored credentials ▹ Gain access to unauthorized machines and steal sensitive data
  • 21. Building External Code An attacker can take this path to get into internal network, either by adding backdoors or exploiting known vulnerabilities with open source software.
  • 23. Ephemeral Keys https://www.flickr.com/photos/articnomad/241620406 JWT, OAuth, SSH-CA, AWS access key etc. ▹ Automated deployments require delegation ▹ Token Delegation: a controlled replay of tokens ▹ Ephemeral keys go well with token delegation model
  • 24. Capability Delegation & Stateless Auth https://www.flickr.com/photos/18946008@N06/14551311971/ By passing capabilities (in the form of tokens) with build events, we eliminate the need to store long-lived keys in CI/CD platform
  • 25. ▹ Separate out auth components from the core build platform ▹ The Auth service intercepts and authenticates build events, and issues job tokens to downstream build platform ▹ Stateless: Build platform no longer stores job specific long-lived keys ▹ Distributed: Per tenant Auth service for cloud based environments, hosted inside tenant’s network ▹ No consolidation of keys in one place
  • 26. Audit Trails ▹ Immutable and append-only ▹ Traceability: logs should capture build pipeline events end to end from commit to final deploy. ▹ Trail traits: who, how, when, sequence of events, start and end state. ▹ Audit trails produced by the Auth service can provide a verifiable chain of trust from commit to deploy.
  • 28. Network Segmentation Colocating CI/CD platform with other corporate machines allow malicious build jobs to raid your internal network. The recommendation is to zone CI/CD platform from other corporate systems.
  • 29. Minimal Builds ▹ Do not expose PII or other sensitive info to build machines. ▹ Do complex tests outside of build, in a separate environment you control.
  • 30. Few more... SSH: Use Restricted Shells Headless SSH access for automated deployment should use a restricted shell. Roll Keys Periodically Establish a process to periodically roll trust anchor keys (and do it periodically). Restrict Job Console Logs Restrict build job console logs only to authorized users Enable 2FA Admins must follow good security hygiene and use 2FA to access platform application and hosts. Prune Admin Access List Keep admin list small for build systems and Git repo access. Vulnerability Patch Mgmt Maintain an inventory of all packages in use and have a mechanism to patch the system in response to a disclosure.
  • 31. Acknowledgements ▹ Christopher Harrell ▹ St John Johnson ▹ Mike Shema ▹ Jeremiah Wuenschel
  • 32. Let’s recap major concepts Ephemeral Keys Replace long-lived keys with time-bound scoped tokens. Service providers should start supporting tokens for auth & authz. Capability Delegation Delegate job capabilities with build events, and eliminate the need to store long-lived keys in CI/CD platform. Audit Trails A verifiable chain of trust based on traceable audit logs is a foundational requirement for CI/CD. Minimal Builds Avoid pulling PII or other production sensitive data to build environments. Keep the builds to minimum. Network Segmentation Network level Isolation of CI/CD machines. Build ToolChain Hardening Build tools and Docker containers must be adequately hardened.
  • 33. THANKS! Any questions? You can find me at: @securitysauce github.com/prbinu
  • 34. CREDITS Special thanks to all the people who made and released these awesome resources for free: ▹ Presentation template by SlidesCarnival ▹ Photographs by Death to the Stock Photo (license)