SlideShare a Scribd company logo
Principal Architect
Private Apps in the Public Cloud
Issac Goldstand
Introducing
AppCloud
Introducing AppCloud
Out-of-the-Box Experience
Users discover applications as they
set up a new PC or smartphone
App Discovery Engine
Users browse for software in a
curated catalog
Introducing AppCloud
Dynamic Notifications
Re-engaging users when it makes
sense
Analytics
Understanding users.
Behind the scenes...
Introducing AppCloud
Sponsored AppsPopular Apps
AppCloud Catalog
* Popular Apps - Free apps that users are likely to install on their device
* Sponsored Apps - Apps with campaigns that can generate revenue
Mix of popular and
sponsored apps
App Personalization Engine
Sponsored App
Developing the MVP
Developing the MVP
Developing the MVP
Design Considerations
2 Major Concerns
“The more possessions one owns,
the more worries one needs to
deal with”
“ ‫מרבה‬‫נכסים‬ , ‫מרבה‬‫דאגות‬ ”
Things got...
Design
Considerations
Things got…
...pretty crazy
Design
Considerations
What happens if an attacker
breaches one of the servers?
Design
Considerations
Design
Considerations
We need to partition our
environments properly
Two types of environments
Two types of environments
Single Tenant
Multiple Tenant
Separate sensitive components
In a modern cloud, where most
hardware is multi-tenant by
definition, how can we accomplish
single tenant partitioning?
Hardware (Logical)
Network (Logical)
Application
Hardware Layer
TL; DR
We use dedicated compute
instance per
component/environment
(customer)
Networking Layer
Network
How we used to do it?
https://commons.wikimedia.org/wiki/File:3_men_working_on_a_portable_phone_switchboard.jpg
Each customer gets their own (set
of) VLAN(s)
No interconnectivity between
customer VLANs
Additional VLAN(s) for shared
components
AWS
AWS
VLAN == VPC
AWS
VLAN == VPC
(loosely speaking)
Network Layer
Split each customer to their own VPC
AWS security groups
Network Layer
AWS Jump Rules
Target is another (or the same)
security group
Network Layer
Each customer/component pair has a
security group (at least one)
Allows fine-grained control of which
services can access different sets of
data
Note the separation of S3 buckets +
use of IAM roles to access the S3
data
Each customer/component pair
has a security group (at least one)
Allows fine-grained control of
which services can access
different sets of data
In addition to security, S3
replication allows for cross-region
deployments
https://github.com/issacg/s3sync
Application Layer
Application Layer
Example Workflow
1) Back-end sends app to
“Publish App” microservice
1) “Publish” microservice stores
data in S3 storage
1) “Publish” microservice calls
“Parse App Metadata” and
“Sign App” microservices
1) “Publish” microservice saves
metadata + signature to
database
Future slides will use PoV of “Publish
App” microservice
“Elastic applications in a public
cloud should support zero-
configuration”
“Elastic applications in a public
cloud should support zero-
configuration”
- Me
Zero configuration allows us to
support both auto-scaling groups
and auto-healing in case of (many,
but not all) problems
Zero-Configuration
Networking
Service Discovery
Credentials/Identity Management
Application + Config
Networking
Service Discovery
Options
Option 1
AWS Internal ELB
Route53 Private Hosted Zones
Service Discovery
Route53 Private Zone points to
Internal ELB
ELB load balances traffic between
Publish workers
If a publish worker fails the ELB
health check, it is removed from the
pool of healthy workers
Option 2
Standalone service discovery
ZooKeeper, Consul, etc
Consul
Rich feature-set built-in
Service discovery
KV storage
Global mutex/semaphores
Leader election
High availability (active/active)
Encryption (Gossip + HTTP/RPC)
Health checks
Incredibly elastic
Fits the cloud well
Consul
Register current instance as “publish-
i1234567890abcdefa.node.
customerA” and
“publish.service.customerA” +
healthchecks
Addresses of well-known “parseapp”
and “signapp” services via service
discovery
Name of S3 bucket + path via KV
storage
S3 access via IAM role
Database (host, user, password) via
KV storage
Zero-Configuration via Consul
Application Layer
Server comes up via configuration management scripts
Server joins consul cluster
Server fetches application configuration based on well-known
locations in the consul KV store
Server fetches application bits and boots
Service registers with consul (including healthcheck)
Instead of looking up an ELB with
a well-known hostname, we can
use a well-known service name
and connect to any machine inside
that service group
Service Discovery
Consul DNS lookup for “publish”
service
Consul randomly picks a healthy
instance and returns the address of
the worker
If a publish worker fails the consul
health check, it is removed from the
pool of healthy workers
If we have a leader/follower app, we
can use consul “tags” to get a
specific instance (eg.
master.publish.service…..consul)
Application Layer
Service Discovery
redis.service.nyc3.consul / redis.service.consul
Application Layer
https://www.flickr.com/photos/cogdog/566323330
Service Discovery
Consul Architectural Concepts
Application Layer
Consul
High-level architecture
https://www.consul.io/docs/internals/architecture.html
Two gossip pools - WAN & LAN
LAN pools encapsulate a single
(virtual) datacenter
Divided into server and client
agents
In each DC, a single server is
elected as “Leader”
Transactions are forwarded and
committed to all servers
Leader is responsible for
maintaining consistency in its DC
WAN pool spans all datacenters
(servers only)
Cross-datacenter requests use
RPC-forwarding (between server
nodes) to query the remote DC
No DC stores information about
other DCs
Rich ACL system
Who can access what?
Application Layer
http://imgur.com/gallery/WlgnC
Consul
We already split everything into
VPCs
Each VPC becomes a DC in consul
Each environment (customer)
automatically gets a private KV
store and private service registry
Shared services live in their own
well-known dedicated DC with
their own “shared” KV store &
service registry
Application Layer
https://www.flickr.com/photos/mherzber/500917537
Consul
It’s possible to perform cross-
datacenter queries
Controllable via ACLs
Application Layer
Publish asks Consul Blue - who is
local signapp?
signapp.service.consul
Consul Blue answers with gossipped
address of random signapp instance
in healthy state
Application Layer
Publish asks Consul Blue - who is
tagged as leader node of parse in
green DC?
leader.parse.service.green.consul
Consul Blue checks the WAN
gossipped peers for a server address
of Consul Green cluster
Consul Blue forwards the query (via
HTTP/S) to Consul Green over the
WAN
Consul Green answers with
gossipped address of a parse node
with the tag “leader” and in healthy
state
Is that good enough?
Probably
Application Layer
http://onceuponyourprime.com/2014/03/20/must-you-always-cross-your-eyes-and-dot-all-your-teas/
Application Layer
http://monteeggers.com/shiny-object-syndrome-killing-business
Private Apps in the Public Cloud - DevConTLV March 2016
Secure storage and audit control
of private data
One-time, short-lived, audited
passwords
Growing ecosystem of backends
supporting one-time-passwords
AWS-STS, MySQL, PostgreSQL,
SSH, PKI, Consul
Application Layer
Vault
High-level architecture
https://www.vaultproject.io/docs/internals/architecture.html
Consul + Vault
Consul + Vault access via Vault (via
Provisioning Service)
Addresses of well-known “parseapp”
and “signapp” services via consul
service discovery
Name of S3 bucket + path via KV
storage (access via IAM Role*)
* Could also use Vault AWS backend
Database host via consul KV storage
Database user, password via Vault
Register current instance for consul
service discovery
Zero-Configuration via Consul &
Vault
Networking
Service Discovery
Credentials/Identity Management
Application + Config
Application Layer
Server comes up via configuration management scripts
Server identifies itself to Vault-backed provisioning service and gets
consul SSL keypair + Consul access token + Vault access token for
future queries
Server joins encrypted Consul cluster
Server fetches application bits and boots
Service fetches application configuration from Vault secret backend
and Consul KV store
Service registers with consul (including healthcheck)
The Challenge
Application Layer
Provisioning Service
https://41.media.tumblr.com/eeb9825c9b3bf3a968d8ed63844b11df/tumblr_inline_nvrau6JwQD1rrhq52_540.jpg
How do you bootstrap access for
a single image running in multiple
instances (eg, an AMI in an auto-
scaling group)?
We want to audit each machine’s
access individually - no shared
authentication
We don’t want to allow multiple
machines (or “anything”s) to
authenticate the same token twice
We don’t want to store secrets in
a non-secret place
Many suggestions for inclusion as
an authentication plugin for Vault
I haven’t seen any I like
Let Vault focus on protecting the
data, extend it with external
tooling to fit your needs
Provisioning Service
Amazon EC2 Instance Identity
Document
http://169.254.169.254/latest/dynamic/instance-identity/
Includes embedded cryptographic
signature to authenticate the
document
Signed by AWS
Provisioning Service
AWS EC2 Identity Document
Application Layer
Subset of fields in the Identity Document
● AWS Account Number
● Instance ID
● Instance Primary Private IP address
● AMI + Kernel ID
● Launch request time
Missing component role
Missing environment (customer)
identifier
We currently store those in the
EC2 user-data to be processed by
our configuration management
system
After authenticating the instance
the provisioning service queries
EC2 to obtain the user-data
It’s flexible to harden this later
Provisioning Service
Instance sends its identity document to
Provisioning Service (PrvSrv)
PrvSrv authenticates the AWS signature
PrvSrv verifies that IP making the request
matches the IP in the doc
PrvSrv verifies that the AWS account, AMI are
whitelisted
PrvSrv uses the instance id to query the EC2
API to fetch additional metadata
Using this metadata, PrvSrv
requests/generates credentials for Vault +
Consul and returns this info to the instance
PrvSrv sends additional Vault token to
bootstrap Consul
EC2 Instance IDs are globally
unique across accounts and are
never recycled
Provisioning service will only
provide a single token for an
instance
Instances are guaranteed to be
coming from inside our AWS
accounts, and from a verified IP
address
Consul bootstrap information
TLS keys for the node (PKI
backend)
https://github.com/issacg/vault-pki-client
Current gossip shared-key
(Generic backend)
Token for consul (Consul
backend)
Provides vault token for
application (no backend)
No built-in Vault backend for Vault
No built-in Vault backend for Vault
Not an unsolvable problem -
provisioning service can take care
of this
Future Plans & Challenges
Separate Vault per environment
(eg, Vault per Consul DC)
How do we manage unsealing with
so many Vault clusters?
How do we pass the secrets from
the provisioning service client to
the application service in a secure
manner?
How do we need to change the
provisioning service to run with
containers?
Summing Things Up
In a modern cloud, where most
hardware is multi-tenant by
definition, how can we accomplish
single tenant partitioning?
Partitioning
Hardware (Logical) Layer
Networking (Logical) Layer
Application Layer
Hardware (Logical) Layer
Instance per-service per-
environment
Networking (Logical) Layer
VPC per environment
Security Group per
component/environment
compute-instance
Application Layer
Separation of shared / private
microservices
Consul + Vault + Provisioning
service to provide partitioned
zero-configuration
Questions?
Thank you
Principal Architect
Issac Goldstand
issac@ironsrc.com

More Related Content

PDF
When and Why Would I use Oauth2?
PPTX
Connect your datacenter to Microsoft Azure
PDF
How to Split Your System into Microservices
PPTX
Iot cloud service v2.0
PDF
Protecting Dynamic Datacenters From the Latest Threats
PPT
Integrating an App with Amazon Web Services SimpleDB - A Matter of Choices
PDF
User manual of i vms 4200-v2.3.1_20150415
PDF
Microsoft Azure Security Overview
When and Why Would I use Oauth2?
Connect your datacenter to Microsoft Azure
How to Split Your System into Microservices
Iot cloud service v2.0
Protecting Dynamic Datacenters From the Latest Threats
Integrating an App with Amazon Web Services SimpleDB - A Matter of Choices
User manual of i vms 4200-v2.3.1_20150415
Microsoft Azure Security Overview

What's hot (16)

PPTX
Microservices
PPTX
Azure deployments and ARM templates
PDF
Simplifying User Access with NetScaler SDX and CA Single Sign-on
PPTX
Session 3c The SF SaaS Framework
PPTX
The FaaS and the Curious™
PPTX
DevOps on GCP Course Compared to AWS
PPTX
From Monolith to Microservices using Amazon EC2 Container Service
PDF
Full lifecycle of a microservice
PDF
SwiftKnowledge Multitenancy
PPTX
Building a document e-signing workflow with Azure Durable Functions
PPTX
Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...
PPTX
Adfs Shib Interop Um Oxford
PDF
VMworld 2013: Enhancing Workplace Mobility and BYOD with the VMware Mobile Se...
PDF
Sync on Android
PDF
Microservices - Hitchhiker's guide to cloud native applications
PPTX
SharePoint, ADFS and Claims Auth
Microservices
Azure deployments and ARM templates
Simplifying User Access with NetScaler SDX and CA Single Sign-on
Session 3c The SF SaaS Framework
The FaaS and the Curious™
DevOps on GCP Course Compared to AWS
From Monolith to Microservices using Amazon EC2 Container Service
Full lifecycle of a microservice
SwiftKnowledge Multitenancy
Building a document e-signing workflow with Azure Durable Functions
Microservices Architecture (MSA) - Presentation made at AEA-MN quarterly even...
Adfs Shib Interop Um Oxford
VMworld 2013: Enhancing Workplace Mobility and BYOD with the VMware Mobile Se...
Sync on Android
Microservices - Hitchhiker's guide to cloud native applications
SharePoint, ADFS and Claims Auth
Ad

Viewers also liked (20)

PPTX
Deploying Node.js With Atlassian Bamboo
PPT
All About IPv6
PDF
Using Vault to decouple MySQL Secrets
PPTX
Gearman & PHP
PDF
Gearman For Beginners
PDF
PHP & Queue
PPTX
Distributed Applications with Perl & Gearman
PDF
Vault encryption support
PDF
Introduction to Go language
PPTX
Next Generation Language Go
PDF
Gearman and Perl
PDF
Gearman for MySQL
PPTX
Using ansible vault to protect your secrets
PDF
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
PPTX
Tips, Tricks and Tools for Running Containers Like a Pro - Rancher Labs April...
PDF
Introduction to go language programming
PPTX
Trying out the Go language with Google App Engine
PPTX
Vault - Secret and Key Management
PDF
Service Discovery. Spring Cloud Internals
PPTX
Hashicorp: Delivering the Tao of DevOps
Deploying Node.js With Atlassian Bamboo
All About IPv6
Using Vault to decouple MySQL Secrets
Gearman & PHP
Gearman For Beginners
PHP & Queue
Distributed Applications with Perl & Gearman
Vault encryption support
Introduction to Go language
Next Generation Language Go
Gearman and Perl
Gearman for MySQL
Using ansible vault to protect your secrets
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Tips, Tricks and Tools for Running Containers Like a Pro - Rancher Labs April...
Introduction to go language programming
Trying out the Go language with Google App Engine
Vault - Secret and Key Management
Service Discovery. Spring Cloud Internals
Hashicorp: Delivering the Tao of DevOps
Ad

Similar to Private Apps in the Public Cloud - DevConTLV March 2016 (20)

PDF
Public Cloud Workshop
PDF
Cloud Native Computing - Part II - Public Cloud (AWS)
PDF
Aws Architecture Fundamentals
PDF
Introduction to Consul
PDF
Microservices: State of the Union
PDF
Achieve business agility with Cloud APIs, Cloud-aware Apps, and Cloud DevOps ...
PDF
Cloud On-Ramp Project Briefing
PDF
The Future of Cloud Innovation, featuring Adrian Cockcroft
PPTX
PPTX
Softlayer an IBM Compay . Connaissez vous le cloud de l'avenir
PDF
Xebia Knowledge Exchange (jan 2011) - Trends in Enterprise Applications Archi...
PDF
V mware service-def-private-cloud-11q1-white-paper
PPTX
Cloud computing_Final
PDF
Modern Software Architecture - Cloud Scale Computing
PPTX
Moving to microservices – a technology and organisation transformational journey
PDF
Securing your Cloud Application using StratosLive
PDF
Service mesh in Microservice World to Manage end to end service communications
PPTX
introduction to distributed computing.pptx
PDF
Taufik kurniawan strategy and approach to private cloud infrastructure impl...
PPTX
IBM Softlayer ile bulutta 3. Boyut Bora Taşer IBM
Public Cloud Workshop
Cloud Native Computing - Part II - Public Cloud (AWS)
Aws Architecture Fundamentals
Introduction to Consul
Microservices: State of the Union
Achieve business agility with Cloud APIs, Cloud-aware Apps, and Cloud DevOps ...
Cloud On-Ramp Project Briefing
The Future of Cloud Innovation, featuring Adrian Cockcroft
Softlayer an IBM Compay . Connaissez vous le cloud de l'avenir
Xebia Knowledge Exchange (jan 2011) - Trends in Enterprise Applications Archi...
V mware service-def-private-cloud-11q1-white-paper
Cloud computing_Final
Modern Software Architecture - Cloud Scale Computing
Moving to microservices – a technology and organisation transformational journey
Securing your Cloud Application using StratosLive
Service mesh in Microservice World to Manage end to end service communications
introduction to distributed computing.pptx
Taufik kurniawan strategy and approach to private cloud infrastructure impl...
IBM Softlayer ile bulutta 3. Boyut Bora Taşer IBM

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Modernizing your data center with Dell and AMD
PPTX
A Presentation on Artificial Intelligence
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Empathic Computing: Creating Shared Understanding
Diabetes mellitus diagnosis method based random forest with bat algorithm
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Digital-Transformation-Roadmap-for-Companies.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
Modernizing your data center with Dell and AMD
A Presentation on Artificial Intelligence
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Empathic Computing: Creating Shared Understanding

Private Apps in the Public Cloud - DevConTLV March 2016

Editor's Notes

  • #2: Sample Text
  • #3: When you get a new phone, you probably get 4 navigation apps. You get Orange GPS, Google Maps, Glympse (whatever that is) but all you really wanted is Waze. The apps are burned 6 months before you ever get your phone, so they’re all way out of date too. AppCloud aims to solve this by allowing users to choose what they want to install when they set up their device for the first time.
  • #4: Benefits to user: ability to choose what they want to install Benefits to advertiser: more targeted users Benefits to OEM/Mobile Network: higher fees from advertiser + trust relationship with the user
  • #11: We’ll focus on 2 concerns that came up
  • #16: Even if we’ve segmented environments to dedicated instances, if they all live in a single security group, then an attacker who breaches the backend server belonging to Customer A could use that to hijack the database of Customer B.
  • #17: Our enterprise customers were specifically worried about a scenario where they could be attacked based on a flaw present in a different customer’s environment (possibly due to special requirements by another customer)
  • #25: This can be a presentation unto itself. For brevity, let’s summarize the conclusion
  • #27: Let’s try to model the networking considerations on a classic networking design pattern before deciding how to do it in the cloud
  • #36: Extensive use of jump rules. Instead of specifying a IP or CIDR block, we can specify another security group as the rule target
  • #45: Design pattern called immutable servers
  • #47: Our cloud provider will deal with this
  • #50: I didn’t know about private hosted zones at the time...
  • #56: What information does the Publish App microservice need from Consul?
  • #59: How does a service discovery request for the publish microservice happen with Consul?
  • #60: This is what it looks like inside Consul’s UI. This example is from the Demo UI, and not from the AppCloud consul UI.
  • #62: (If we have time)
  • #63: Two gossip pools - WAN & LAN LAN pools encapsulate a single (virtual) datacenter Divided into server and client agents In each DC, a single server is elected as “Leader” Transactions are forwarded and committed to all servers Leader is responsible for maintaining consistency in its DC WAN pool spans all datacenters (servers only) Cross-datacenter requests use RPC-forwarding (between server nodes) to query the remote DC No DC stores information about other DCs Rich ACL system Who can access what?
  • #71: Except for server information which is gossipped in the WAN pool
  • #73: How do we use consul?
  • #80: How do local and cross datacenter queries work?
  • #83: But my perfectionistic nature got the best out of me...
  • #84: ...and a great looking tool existed to make things better - (unusually) I let myself fall for shiny object syndrome - and decided to use it
  • #97: Git, S3, chef (excepting encrypted data bags), EC2 user-data, etc are considered non-secret
  • #105: VPC ID would be nice...
  • #106: Could be tightly coupled to the AMI, but then you’d need to secure the AMI registry and coupling to vault roles
  • #107: Reference is to the AppCloud environment/customer identifier; not AWS. If we partition by AWS accounts, then we can get this in the instance-data, but there’s no real advantage to us in doing so; breach of the AWS account will always be an attack vector to fool the provisioning service
  • #123: Possibly use semi-automated unsealing process using phone push
  • #124: We could use envconsul, but the same question would apply: how to get the VAULT_TOKEN in the proper environment when sent to envconsul - also envconsul, although marginally better than consul-template, still won’t let us rotate OTPs inside the application
  • #125: The provisioning service currently uses the instance ID as a unique index - how will that apply to multiple containers running on a single instance?