SlideShare a Scribd company logo
Bullet-proof Microservices
with Spring & Kubernetes
September 2–3, 2020
springone.io
1
About us
2
● Bella Bai
○ Yuxin Bai
○ 白玉欣
● Servant of two rescued
kitties
About us
3
● Oliver Hughes
○ Ollie
○ @olliehughes82
4
What is a Bullet-proof microservice?
5
🧑
💼
As developers, we want… 💻 🍕🎮
Pod
6
Deploying apps to Kubernetes
Pod
Animal Rescue
Spring Boot App
Container
Image
Registry
Partner Adoption
Center
Node.js App
Container
ReplicaSet
Deployment
ReplicaSet
Deployment
Service
Service
👩
🧑
💻
Demo - Deploy Animal Rescue
8
🧑
💻
Basic Authentication
Username
Password
Demo - Add Basic Auth
So, back to this diagram...
10
🧑
💼
Username
Password
✓
Non-Spring apps?
11
🧑
❔
✓
Add a layer in between!
12
🧑
💼
Demo - Use Ingress
Wait, HTTP is not encrypted...
14
🙅
♀️
Username
Password
🧑
🧑
♀️
Need to enable TLS, but how?
15
● Pick a Certificate Authority (CA)
● Manage certificates (issue/update/renew)
● Enable TLS on servers Or
Ingress
ACME HTTP01 Challenge
16
🙋
Need a cert for
animalrescue.online
plzzzz.
ACME HTTP01 Challenge
17
🙆
Here is a token,
Serve it up with your server,
I will check later.
Token
ACME HTTP01 Challenge
18
🧑
💻
📄 with token
ACME HTTP01 Challenge
19
💁
Ready for action!
ACME HTTP01 Challenge
2
0
💁
Retrieve and verify the file from
http://animalrescue.online/.well-
known/acme-challenge/<TOKEN>
ACME HTTP01 Challenge
21
🙇
I trust this account.
I will grant a valid cert -
On their next request.
ACME HTTP01 Challenge
2
2
🧑
Retrieve cert
ACME HTTP01 Challenge
2
3
🧑
♀️
Retrieve cert
Demo - Enable TLS
Now the communication is secured
2
5
💁 Username
Password
🙈
But I want to use my GitHub account!
2
6
🙅
♀️
Username
Password
OAuth 2
2
7
🙋
♀️
Demo - OAuth 2 with oauth-proxy
But OAuth2 is for users, what about machines?
2
9
🧑
Clients can prove their identities too!
3
0
🧑
⚖️ Private
Certificate
Authority
IssueIssue
Mutual TLS
How to mTLS in k8s?
31
Create CA certificate
with a self-signed
issuer
Create CA issuer
with the created
CA certificate
Issue certificates
with the created CA
issuer
Mount certificates
on app deployments
Update apps
to use the mounted
certificate for mTLS
Step by step guide: https://blog.jetstack.io/blog/securing-mysql-with-cert-manager/
Autocert makes mTLS easier
3
2
Create CA certificate
with a self-signed
issuer
Create CA issuer
with the created
CA certificate
Create certificates
with the created CA
issuer
Mount certificates
on app deployments
Update apps
to use the mounted
certificate for mTLS
Demo - mTLS with Autocert
A few notes about Autocert
3
4
● Pros:
○ Certificates are generated and only available within the pod
○ Easy to set up and run - just one annotation needed
○ Perfect for apps that already know how to handle mTLS
● Cons:
○ Need to add some code to:
■ Load the certs and keys
■ Watch for file changes on cert rotation
○ No fine-grained access control
Automating mTLS with Service Mesh
3
5
Tanzu Service
Mesh Istio
Tanzu Service Mesh: https://docs.vmware.com/en/VMware-Tanzu-Service-Mesh/services/concepts-guide/GUID-9E3F1F90-4310-415B-98C8-C06E59B8A5EE.html
Traefik: https://docs.traefik.io/https/tls/#client-authentication-mtls
Istio: https://istio.io/latest/docs/concepts/security/#mutual-tls-authentication
Linkerd: https://linkerd.io/2/features/automatic-mtls/
https://github.com/LittleBaiBai/animal-rescue
Check out our repo
Bella Bai
LittleBaiBai bellalleb_bai
Oliver Hughes
@olliehughes82
#springone@s1p
Stay Connected.

More Related Content

PDF
Introduction to Spring Cloud
PPTX
If Hemingway Wrote JavaDocs
PDF
Next-Generation Cloud Native Apps with Spring Cloud and Kubernetes
PDF
Walking Through Spring Cloud Data Flow
PDF
Resilient and Adaptable Systems with Cloud Native APIs
PDF
What Is Spring?
PDF
Spring Boot Loves K8s
PDF
Spring Boot Observability
Introduction to Spring Cloud
If Hemingway Wrote JavaDocs
Next-Generation Cloud Native Apps with Spring Cloud and Kubernetes
Walking Through Spring Cloud Data Flow
Resilient and Adaptable Systems with Cloud Native APIs
What Is Spring?
Spring Boot Loves K8s
Spring Boot Observability

What's hot (20)

PDF
What Is Spring?
PDF
What’s New in Spring Data MongoDB
PDF
Security Patterns for Microservice Architectures - SpringOne 2020
PDF
Going Serverless Using the Spring Framework Ecosystem
PDF
Observability Enhancements in Steeltoe
PDF
Make Spring Home (Spring Customization and Extensibility)
PPTX
State of Steeltoe 2020
PDF
The Path Towards Spring Boot Native Applications
PDF
Spring Boot Whirlwind Tour
PDF
Spring Data JDBC: Beyond the Obvious
PDF
Resilient Microservices with Spring Cloud
PDF
Not Just Initializing
PDF
Spring: Your Next Java Micro-Framework
PDF
Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...
PDF
Welcome to the Metrics
PDF
Introduction to WebMvc.fn
PDF
Connecting Spring Apps to Distributed SQL Clusters Running in Kubernetes
PDF
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
PDF
TDD for Microservices
PDF
Spring Boot—Production Boost
What Is Spring?
What’s New in Spring Data MongoDB
Security Patterns for Microservice Architectures - SpringOne 2020
Going Serverless Using the Spring Framework Ecosystem
Observability Enhancements in Steeltoe
Make Spring Home (Spring Customization and Extensibility)
State of Steeltoe 2020
The Path Towards Spring Boot Native Applications
Spring Boot Whirlwind Tour
Spring Data JDBC: Beyond the Obvious
Resilient Microservices with Spring Cloud
Not Just Initializing
Spring: Your Next Java Micro-Framework
Fundamental Spring Boot: Keep it Simple, Get it Right, Be Productive and Have...
Welcome to the Metrics
Introduction to WebMvc.fn
Connecting Spring Apps to Distributed SQL Clusters Running in Kubernetes
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
TDD for Microservices
Spring Boot—Production Boost
Ad

Similar to Bulletproof Microservices with Spring and Kubernetes (20)

PPTX
Microservices security - jpmc tech fest 2018
PDF
OAuth for QuickBooks Online REST Services
PDF
DIY Transparent Release Management_2024_07.pdf
PDF
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
PPTX
"Secure Mobile Apps with the Microsoft Identity Platform", Christos Matskas, ...
PDF
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
PPTX
Integrating Okta with Anypoint Platform for a mobile security use case
PPTX
Ahmadabad mule soft_meetup_6march2021_azure_CICD
PDF
Building APIs in a Cloud Native Era
PDF
apidays LIVE Paris - Building APIs in a Cloud Native era by Nuwan Dias
PDF
Créer une App Microsoft Teams : REX - Replay Microsoft Experiences 2018
PPTX
Indianapolis_meetup_April-1st-2022.pptx
PDF
Deep Dive on CI/CD NYC Meet Up Group
PPTX
Ultimate Guide to Microservice Architecture on Kubernetes
PPTX
Meetup bangalore-may22nd2021
PDF
Sydney mule soft meetup 30 april 2020
PPTX
Building APIs with Mule and Spring Boot
PDF
Deep Dive on Continuous Integration and Continuous Delivery in Anypoint Platf...
PDF
Deploying Compliant Kubernetes: Real World Edge Cases
PDF
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Microservices security - jpmc tech fest 2018
OAuth for QuickBooks Online REST Services
DIY Transparent Release Management_2024_07.pdf
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
"Secure Mobile Apps with the Microsoft Identity Platform", Christos Matskas, ...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Integrating Okta with Anypoint Platform for a mobile security use case
Ahmadabad mule soft_meetup_6march2021_azure_CICD
Building APIs in a Cloud Native Era
apidays LIVE Paris - Building APIs in a Cloud Native era by Nuwan Dias
Créer une App Microsoft Teams : REX - Replay Microsoft Experiences 2018
Indianapolis_meetup_April-1st-2022.pptx
Deep Dive on CI/CD NYC Meet Up Group
Ultimate Guide to Microservice Architecture on Kubernetes
Meetup bangalore-may22nd2021
Sydney mule soft meetup 30 april 2020
Building APIs with Mule and Spring Boot
Deep Dive on Continuous Integration and Continuous Delivery in Anypoint Platf...
Deploying Compliant Kubernetes: Real World Edge Cases
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Ad

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
PDF
What AI Means For Your Product Strategy And What To Do About It
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
PPTX
Enhancing DevEx and Simplifying Operations at Scale
PDF
Spring Update | July 2023
PPTX
Platforms, Platform Engineering, & Platform as a Product
PPTX
Building Cloud Ready Apps
PDF
Spring Boot 3 And Beyond
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
PPTX
tanzu_developer_connect.pptx
PDF
Tanzu Virtual Developer Connect Workshop - French
PDF
Tanzu Developer Connect Workshop - English
PDF
Virtual Developer Connect Workshop - English
PDF
Tanzu Developer Connect - French
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
PDF
SpringOne Tour: The Influential Software Engineer
PDF
SpringOne Tour: Domain-Driven Design: Theory vs Practice
Spring into AI presented by Dan Vega 5/14
What AI Means For Your Product Strategy And What To Do About It
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Enhancing DevEx and Simplifying Operations at Scale
Spring Update | July 2023
Platforms, Platform Engineering, & Platform as a Product
Building Cloud Ready Apps
Spring Boot 3 And Beyond
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
tanzu_developer_connect.pptx
Tanzu Virtual Developer Connect Workshop - French
Tanzu Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
Tanzu Developer Connect - French
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: Domain-Driven Design: Theory vs Practice

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administraation Chapter 3
PPTX
Essential Infomation Tech presentation.pptx
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
top salesforce developer skills in 2025.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
AI in Product Development-omnex systems
PDF
Nekopoi APK 2025 free lastest update
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
How Creative Agencies Leverage Project Management Software.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administraation Chapter 3
Essential Infomation Tech presentation.pptx
Understanding Forklifts - TECH EHS Solution
VVF-Customer-Presentation2025-Ver1.9.pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
top salesforce developer skills in 2025.pdf
Transform Your Business with a Software ERP System
AI in Product Development-omnex systems
Nekopoi APK 2025 free lastest update
wealthsignaloriginal-com-DS-text-... (1).pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Reimagine Home Health with the Power of Agentic AI​
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How Creative Agencies Leverage Project Management Software.pdf

Bulletproof Microservices with Spring and Kubernetes