SlideShare a Scribd company logo
1 of 21
LONDON 18-19 OCT 2018
Patterns and techniques for
securing Microservices
NICK SMITH
THALES ESECURITY
ISTIO SECURITY WG
LONDON 18-19 OCT 2018
Warning: This talk does not deal with Ag projectiles
• Tools discussed can help but not solve all your woes.
LONDON 18-19 OCT 2018
Microservices primer
• Microservices: A software system that has been separated into smaller
modules that interact with each other.
• Self-contained, a microservice stands alone.
• Dynamically deployed often via Containers on a platform such as
Kubernetes.
• An architecture suited to cooperating autonomous teams.
LONDON 18-19 OCT 2018
So what’s the problem? A problem shared …
• Holistic system security is hard – how do we reason about our system?
• Mo microservices, mo problems – We’ve gone from a monolith to a maze.
• Multiple autonomous teams - Everyone is doing things differently.
• How do we perform static analysis across service interactions?
LONDON 18-19 OCT 2018
Facebook “View As” exploit as an example
• 3 bugs.
• Complex interaction of different components.
• Hard to mitigate without a holistic system view.
• Holistic system views are hard to achieve without security being seen as
a blocker and “mitigator of progress”.
• We must use tools!
• This is why DevSecOps is cool!
LONDON 18-19 OCT 2018
Authentication, Authorization and Accounting
• Authentication: the identification of unique users; human or otherwise
• Authorization: Who *can* do what, when and why
• Accounting: Who *did* what, when and why
• How can a service mesh such as istio.io help?
LONDON 18-19 OCT 2018
Reference: A mesh-less deployment
LONDON 18-19 OCT 2018
The service mesh to the rescue*!
LONDON 18-19 OCT 2018
istio Architecture
LONDON 18-19 OCT 2018
Authentication
• Services use unique identifiers,
shared secrets and public keys.
• Services authenticate using OAuth2
Confidential Client flows or mutual
TLS.
• Humans authenticate using unique
identifiers, passwords and ideally
second factors.
• Humans authenticate using SAML
and OpenID Connect flows.
• Both humans and services should authenticate to enable robust access control.
• Authentication is the proof of identity in exchange for a cryptographic assertion
often in the form of a JSON Web Token (JWT) .
LONDON 18-19 OCT 2018
Pattern: Transparent Authentication
• User issues a request to a service.
• The service mesh enforcement point checks the
request against the authentication policy and
whether an Identity Token (JWT) is present.
• The service mesh enforcement point redirects
the user to an authentication service using
OpenID Connect authorization flow.
• User authenticates and tries to access the service
again armed with a JWT.
• The service mesh enforcement point allows the
request to proceed after validating the
authentication policy and identity token.
LONDON 18-19 OCT 2018
Authorization
• Authorization: the act of allowing or disallowing an operation to be performed
given some contextual information.
• Can <identity> perform <request> given the context <time, policy, other>
• Can <identity> perform <request> given the context <time, policy, other> and
via the intermediate service <identity>
• Authorization can be explicit like in the OAuth2 model:
• Requester requests an Authorization token asserting access rights later presented to the
operating service.
• Authorization can be Just-in-Time:
• Given some contextual information such as identity and time, does the operating service
allow the operation being requested by the requester.
LONDON 18-19 OCT 2018
Pattern: Explicit Authorization using OAuth2-like model
• User requests an access token from an
Authorization service.
• Given some contextual information such as
identity (from an Identity Token), time and
policy the Authorization service produces an
Access Token that includes a digitally signed
set of claims describing access rights.
• User includes their Access Token in their
request to a service.
• The service mesh enforcement point
validates the validity of the Access Token and
whether it grants the requester access to the
service and API being requested.
LONDON 18-19 OCT 2018
Pattern: Just-in-Time Authorization
• User issues a request to a service
including an Identity Token.
• Given some contextual information
such as identity, time and policy
the service mesh enforcement
point validates whether the
request can be executed.
• The service mesh enforcement
point allows or rejects the request.
LONDON 18-19 OCT 2018
Comparison
• Explicit authorization is useful for managing access control using an
external service.
• Think github as the authorization service for ${CI-VENDOR-OF-YOUR-CHOICE}.
• JiT authorization is useful in more dynamic contexts where authorization
decisions cannot always be made upfront. For example, an internal
service in a microservice deployment.
• Both are valid approaches
• Choices are always contextual and security is not a binary operator.
LONDON 18-19 OCT 2018
Accounting
• Accounting: the measurement of who has done what on behalf of whom
and why 
• <identity> performed <request> on behalf of <identity> given the context
<time, policy, other>
• Solid accounting is often missing in many systems.
• Useful for understanding system interactions and “good” or “bad” behaviour.
• Observability.
• Accounting can be used in a feedback loop with ML to enhance
authorization decisions!
LONDON 18-19 OCT 2018
Pattern: Transparent Accounting
• User issues a request to a service including
an Identity Token.
• Given some contextual information such as
identity, time and policy the service mesh
enforcement point validates whether the
request can be executed.
• The service mesh enforcement point
appends to the accounting record it’s
decision
• The service mesh enforcement point allows
or rejects the request.
LONDON 18-19 OCT 2018
Configuring the mesh: Security Configuration-as-Code
• istio.io is configured by code
• Reviewable
• Grok-able
• Manageable
• Parse-able/tool-able
• By using Config-as-Code autonomous teams both define and document
the systems behaviour in one step.
• Observability and thus security reasoning can be improved at the macro
level.
LONDON 18-19 OCT 2018
Yaml, all things
LONDON 18-19 OCT 2018
EOF
• The move towards microservices and autonomous teams presents a
security conundrum.
• Holistic security view impaired.
• System understanding difficult.
• A service mesh can help to transparently enforce cross-service patterns to
normalize:
• Authentication, Authorization and Accounting
• Security Config-as-Code allows for security enforcement to be reviewed
observed and understood.
LONDON 18-19 OCT 2018
nick.a.smith@thales-esecurity.com
https://www.linkedin.com/in/nick-a-smith
twitter and github @nickrmc83
https://istio.io
https://groups.google.com/forum/#!forum/istio-security
https://thenounproject.com

More Related Content

More from DevSecCon

DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...DevSecCon
 
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...DevSecCon
 
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...DevSecCon
 
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon
 
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscapeDevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscapeDevSecCon
 
DevSecCon Singapore 2019: Web Services aren’t as secure as we think
DevSecCon Singapore 2019: Web Services aren’t as secure as we thinkDevSecCon Singapore 2019: Web Services aren’t as secure as we think
DevSecCon Singapore 2019: Web Services aren’t as secure as we thinkDevSecCon
 
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...DevSecCon
 
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...DevSecCon
 
DevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon Singapore 2019: Preventative Security for KubernetesDevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon Singapore 2019: Preventative Security for KubernetesDevSecCon
 
DevSecCon London 2018: Is your supply chain your achille's heel
DevSecCon London 2018: Is your supply chain your achille's heelDevSecCon London 2018: Is your supply chain your achille's heel
DevSecCon London 2018: Is your supply chain your achille's heelDevSecCon
 
DevSecCon London 2018: Get rid of these TLS certificates
DevSecCon London 2018: Get rid of these TLS certificatesDevSecCon London 2018: Get rid of these TLS certificates
DevSecCon London 2018: Get rid of these TLS certificatesDevSecCon
 
DevSecCon London 2018: Open DevSecOps
DevSecCon London 2018: Open DevSecOpsDevSecCon London 2018: Open DevSecOps
DevSecCon London 2018: Open DevSecOpsDevSecCon
 
DevSecCon London 2018: Building effective DevSecOps teams through role-playin...
DevSecCon London 2018: Building effective DevSecOps teams through role-playin...DevSecCon London 2018: Building effective DevSecOps teams through role-playin...
DevSecCon London 2018: Building effective DevSecOps teams through role-playin...DevSecCon
 
DevSecCon London 2018: Variant Analysis – A critical step in handling vulnera...
DevSecCon London 2018: Variant Analysis – A critical step in handling vulnera...DevSecCon London 2018: Variant Analysis – A critical step in handling vulnera...
DevSecCon London 2018: Variant Analysis – A critical step in handling vulnera...DevSecCon
 
DevSecCon London 2018: Lessons from the legion (the DevSecCon London Remix)
DevSecCon London 2018: Lessons from the legion (the DevSecCon London Remix)DevSecCon London 2018: Lessons from the legion (the DevSecCon London Remix)
DevSecCon London 2018: Lessons from the legion (the DevSecCon London Remix)DevSecCon
 
DevSecCon London 2018: Security in the serverless world
DevSecCon London 2018: Security in the serverless worldDevSecCon London 2018: Security in the serverless world
DevSecCon London 2018: Security in the serverless worldDevSecCon
 
DevSecCon London 2018: Enabling shift-left for 12k banking developers from sc...
DevSecCon London 2018: Enabling shift-left for 12k banking developers from sc...DevSecCon London 2018: Enabling shift-left for 12k banking developers from sc...
DevSecCon London 2018: Enabling shift-left for 12k banking developers from sc...DevSecCon
 
DevSecCon London 2018: Whatever happened to attack aware applications?
DevSecCon London 2018: Whatever happened to attack aware applications?DevSecCon London 2018: Whatever happened to attack aware applications?
DevSecCon London 2018: Whatever happened to attack aware applications?DevSecCon
 
DevSecCon London 2018: A Journey to Continuous Cloud Compliance
DevSecCon London 2018: A Journey to Continuous Cloud ComplianceDevSecCon London 2018: A Journey to Continuous Cloud Compliance
DevSecCon London 2018: A Journey to Continuous Cloud ComplianceDevSecCon
 
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10DevSecCon
 

More from DevSecCon (20)

DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
 
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
 
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
 
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
 
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscapeDevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
 
DevSecCon Singapore 2019: Web Services aren’t as secure as we think
DevSecCon Singapore 2019: Web Services aren’t as secure as we thinkDevSecCon Singapore 2019: Web Services aren’t as secure as we think
DevSecCon Singapore 2019: Web Services aren’t as secure as we think
 
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
 
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
 
DevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon Singapore 2019: Preventative Security for KubernetesDevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon Singapore 2019: Preventative Security for Kubernetes
 
DevSecCon London 2018: Is your supply chain your achille's heel
DevSecCon London 2018: Is your supply chain your achille's heelDevSecCon London 2018: Is your supply chain your achille's heel
DevSecCon London 2018: Is your supply chain your achille's heel
 
DevSecCon London 2018: Get rid of these TLS certificates
DevSecCon London 2018: Get rid of these TLS certificatesDevSecCon London 2018: Get rid of these TLS certificates
DevSecCon London 2018: Get rid of these TLS certificates
 
DevSecCon London 2018: Open DevSecOps
DevSecCon London 2018: Open DevSecOpsDevSecCon London 2018: Open DevSecOps
DevSecCon London 2018: Open DevSecOps
 
DevSecCon London 2018: Building effective DevSecOps teams through role-playin...
DevSecCon London 2018: Building effective DevSecOps teams through role-playin...DevSecCon London 2018: Building effective DevSecOps teams through role-playin...
DevSecCon London 2018: Building effective DevSecOps teams through role-playin...
 
DevSecCon London 2018: Variant Analysis – A critical step in handling vulnera...
DevSecCon London 2018: Variant Analysis – A critical step in handling vulnera...DevSecCon London 2018: Variant Analysis – A critical step in handling vulnera...
DevSecCon London 2018: Variant Analysis – A critical step in handling vulnera...
 
DevSecCon London 2018: Lessons from the legion (the DevSecCon London Remix)
DevSecCon London 2018: Lessons from the legion (the DevSecCon London Remix)DevSecCon London 2018: Lessons from the legion (the DevSecCon London Remix)
DevSecCon London 2018: Lessons from the legion (the DevSecCon London Remix)
 
DevSecCon London 2018: Security in the serverless world
DevSecCon London 2018: Security in the serverless worldDevSecCon London 2018: Security in the serverless world
DevSecCon London 2018: Security in the serverless world
 
DevSecCon London 2018: Enabling shift-left for 12k banking developers from sc...
DevSecCon London 2018: Enabling shift-left for 12k banking developers from sc...DevSecCon London 2018: Enabling shift-left for 12k banking developers from sc...
DevSecCon London 2018: Enabling shift-left for 12k banking developers from sc...
 
DevSecCon London 2018: Whatever happened to attack aware applications?
DevSecCon London 2018: Whatever happened to attack aware applications?DevSecCon London 2018: Whatever happened to attack aware applications?
DevSecCon London 2018: Whatever happened to attack aware applications?
 
DevSecCon London 2018: A Journey to Continuous Cloud Compliance
DevSecCon London 2018: A Journey to Continuous Cloud ComplianceDevSecCon London 2018: A Journey to Continuous Cloud Compliance
DevSecCon London 2018: A Journey to Continuous Cloud Compliance
 
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
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
 
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
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
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...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
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
 
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
 

DevSecCon London 2018: Patterns and techniques for securing Microservices

  • 1. LONDON 18-19 OCT 2018 Patterns and techniques for securing Microservices NICK SMITH THALES ESECURITY ISTIO SECURITY WG
  • 2. LONDON 18-19 OCT 2018 Warning: This talk does not deal with Ag projectiles • Tools discussed can help but not solve all your woes.
  • 3. LONDON 18-19 OCT 2018 Microservices primer • Microservices: A software system that has been separated into smaller modules that interact with each other. • Self-contained, a microservice stands alone. • Dynamically deployed often via Containers on a platform such as Kubernetes. • An architecture suited to cooperating autonomous teams.
  • 4. LONDON 18-19 OCT 2018 So what’s the problem? A problem shared … • Holistic system security is hard – how do we reason about our system? • Mo microservices, mo problems – We’ve gone from a monolith to a maze. • Multiple autonomous teams - Everyone is doing things differently. • How do we perform static analysis across service interactions?
  • 5. LONDON 18-19 OCT 2018 Facebook “View As” exploit as an example • 3 bugs. • Complex interaction of different components. • Hard to mitigate without a holistic system view. • Holistic system views are hard to achieve without security being seen as a blocker and “mitigator of progress”. • We must use tools! • This is why DevSecOps is cool!
  • 6. LONDON 18-19 OCT 2018 Authentication, Authorization and Accounting • Authentication: the identification of unique users; human or otherwise • Authorization: Who *can* do what, when and why • Accounting: Who *did* what, when and why • How can a service mesh such as istio.io help?
  • 7. LONDON 18-19 OCT 2018 Reference: A mesh-less deployment
  • 8. LONDON 18-19 OCT 2018 The service mesh to the rescue*!
  • 9. LONDON 18-19 OCT 2018 istio Architecture
  • 10. LONDON 18-19 OCT 2018 Authentication • Services use unique identifiers, shared secrets and public keys. • Services authenticate using OAuth2 Confidential Client flows or mutual TLS. • Humans authenticate using unique identifiers, passwords and ideally second factors. • Humans authenticate using SAML and OpenID Connect flows. • Both humans and services should authenticate to enable robust access control. • Authentication is the proof of identity in exchange for a cryptographic assertion often in the form of a JSON Web Token (JWT) .
  • 11. LONDON 18-19 OCT 2018 Pattern: Transparent Authentication • User issues a request to a service. • The service mesh enforcement point checks the request against the authentication policy and whether an Identity Token (JWT) is present. • The service mesh enforcement point redirects the user to an authentication service using OpenID Connect authorization flow. • User authenticates and tries to access the service again armed with a JWT. • The service mesh enforcement point allows the request to proceed after validating the authentication policy and identity token.
  • 12. LONDON 18-19 OCT 2018 Authorization • Authorization: the act of allowing or disallowing an operation to be performed given some contextual information. • Can <identity> perform <request> given the context <time, policy, other> • Can <identity> perform <request> given the context <time, policy, other> and via the intermediate service <identity> • Authorization can be explicit like in the OAuth2 model: • Requester requests an Authorization token asserting access rights later presented to the operating service. • Authorization can be Just-in-Time: • Given some contextual information such as identity and time, does the operating service allow the operation being requested by the requester.
  • 13. LONDON 18-19 OCT 2018 Pattern: Explicit Authorization using OAuth2-like model • User requests an access token from an Authorization service. • Given some contextual information such as identity (from an Identity Token), time and policy the Authorization service produces an Access Token that includes a digitally signed set of claims describing access rights. • User includes their Access Token in their request to a service. • The service mesh enforcement point validates the validity of the Access Token and whether it grants the requester access to the service and API being requested.
  • 14. LONDON 18-19 OCT 2018 Pattern: Just-in-Time Authorization • User issues a request to a service including an Identity Token. • Given some contextual information such as identity, time and policy the service mesh enforcement point validates whether the request can be executed. • The service mesh enforcement point allows or rejects the request.
  • 15. LONDON 18-19 OCT 2018 Comparison • Explicit authorization is useful for managing access control using an external service. • Think github as the authorization service for ${CI-VENDOR-OF-YOUR-CHOICE}. • JiT authorization is useful in more dynamic contexts where authorization decisions cannot always be made upfront. For example, an internal service in a microservice deployment. • Both are valid approaches • Choices are always contextual and security is not a binary operator.
  • 16. LONDON 18-19 OCT 2018 Accounting • Accounting: the measurement of who has done what on behalf of whom and why  • <identity> performed <request> on behalf of <identity> given the context <time, policy, other> • Solid accounting is often missing in many systems. • Useful for understanding system interactions and “good” or “bad” behaviour. • Observability. • Accounting can be used in a feedback loop with ML to enhance authorization decisions!
  • 17. LONDON 18-19 OCT 2018 Pattern: Transparent Accounting • User issues a request to a service including an Identity Token. • Given some contextual information such as identity, time and policy the service mesh enforcement point validates whether the request can be executed. • The service mesh enforcement point appends to the accounting record it’s decision • The service mesh enforcement point allows or rejects the request.
  • 18. LONDON 18-19 OCT 2018 Configuring the mesh: Security Configuration-as-Code • istio.io is configured by code • Reviewable • Grok-able • Manageable • Parse-able/tool-able • By using Config-as-Code autonomous teams both define and document the systems behaviour in one step. • Observability and thus security reasoning can be improved at the macro level.
  • 19. LONDON 18-19 OCT 2018 Yaml, all things
  • 20. LONDON 18-19 OCT 2018 EOF • The move towards microservices and autonomous teams presents a security conundrum. • Holistic security view impaired. • System understanding difficult. • A service mesh can help to transparently enforce cross-service patterns to normalize: • Authentication, Authorization and Accounting • Security Config-as-Code allows for security enforcement to be reviewed observed and understood.
  • 21. LONDON 18-19 OCT 2018 nick.a.smith@thales-esecurity.com https://www.linkedin.com/in/nick-a-smith twitter and github @nickrmc83 https://istio.io https://groups.google.com/forum/#!forum/istio-security https://thenounproject.com