SlideShare une entreprise Scribd logo
1  sur  33
P U B L I C S E C T O R
S U M M I T
Canberra, ACT
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Building Private APIs for Security Automation
Steven Gillard
Solutions Architect
AWS Public Sector
James Lambeth
Enterprise Security Architect
Monash University
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
What are my options?
Consumers
AWS Account 1
Amazon VPC
Secured
resources
AWS Account 2
Amazon VPC
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
AND
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Completely manual
The old way
AWS Cloud
Amazon VPC
Amazon VPCAmazon VPC
Web application
firewall
Amazon CloudFront
Security teamOperations team
Backend web
server
Backend web
server
Project team/faculty
members
End users
Phase one – prototype
The new way
AWS Cloud
Amazon VPC
AWS Secrets
Manager
Web application
firewall
AWS Lambda
function
Amazon DynamoDB
Amazon API
Gateway
Operations team
What next?
We still had a few outstanding questions…
• How do we make the API private?
• How can we make the API more resilient?
• How do the operations team call the API?
• How do we package the API for deployment?
Phase two – more features
The new way
AWS Cloud
Amazon VPC
AWS Secrets
Manager
AWS Lambda
Function
Amazon CloudFront
Backend web
server
Amazon VPC
Automation
pipeline Amazon DynamoDB
AWS Lambda
function
QueueAmazon API
Gateway
Endpoint
AWS CloudFormation
AWS Lambda
Function
Operations team
Ingress/Egress AccountAutomation Account
Web application
firewall
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Serverless APIs
No infrastructure provisioning,
no management
Automatic scaling
Pay for value Highly available and secure
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
What are my options?
Consumers
AWS Account 1
Amazon VPC
Secured
resources
AWS Account 2
Amazon VPC
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
API Gateway private integration
Consumers
AWS Account 1
Amazon VPC
AWS Account 2
Amazon VPC
Amazon API
Gateway
regional
endpoint
Internet
gateway
Network load
balancer
Secured
resource
Private
integration
Public frontend, private backend
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
API Gateway AWS Lambda integration
Consumers
AWS Account 1
Amazon VPC
AWS Account 2
Amazon VPC
Amazon API
Gateway
regional
endpoint
Internet
gateway
Secured
resource
AWS Lambda
proxy
integration
Public frontend, private backend
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Consumers
API Gateway private endpoints
Amazon API
Gateway
Private
endpoint Secured
resource
AWS Lambda
proxy
integration
Consumer VPC endpoint
AWS Account 1 AWS Account 2
Amazon VPC Amazon VPC
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Consumers
API Gateway private endpoints
Amazon API
Gateway
Private
endpoint
AWS Account 1
Amazon VPC
Secured
resource
AWS Lambda
proxy
integration
AWS Account 2
Amazo
n
VPC
Peering
Central endpoint
Amazon VPC
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Consumers
API Gateway private endpoints
Amazon API
Gateway
Private
endpoint
AWS Account 1
Amazon VPC
Secured
resource
AWS Lambda
proxy
integration
AWS Account 2
Amazo
n
VPC
Peering
Central endpoint with DNS
Amazon VPC
Route53
private hosted
zone
AssociationRoute 53
Resolver
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Asynchronous API
Consumers
Amazon API
Gateway
Private
endpoint
AWS Account
Amazon VPC
Secured
resource
AWS Account
Amazon VPC
Consumer Amazon VPC endpoint
Amazon SQS
queue
DynamoDB
table
Direct
integration
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Consumers
API authentication and authorisation
Amazon API
Gateway
Private
endpoint Secured
resource
AWS Lambda
proxy
integration
AWS Lambda authorizer
AWS Account 1 AWS Account 2
Amazon VPC Amazon VPC
AWS Lambda
authorizer
Key/
token/
secret
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Consumers
API authentication and authorisation
Amazon API
Gateway
Private
endpoint Secured
resource
AWS Lambda
proxy
integration
Amazon Cognito
AWS Account 1 AWS Account 2
Amazon VPC Amazon VPC
Amazon
Cognito
Internet
gateway
Token
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Consumers
API authentication and authorisation
Amazon API
Gateway
Private
endpoint Secured
resource
Lambda
Proxy
Integration
IAM/AWS Sigv4
AWS Account 1 AWS Account 2
Amazon VPC Amazon VPC
IAM
Role
Role
API resource
policy
Signed
request Additional
access
check -
optional
External
Auth DB
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Consumers
Multiple control points
Amazon API
Gateway
Private
endpoint Secured
resource
AWS Lambda
proxy
integration
Roles and policies
AWS Account 1 AWS Account 2
Amazon VPC Amazon VPC
VPC Endpoint
Resource Policy
What APIs can be
accessed through
the endpoint
API Gateway
Resource Policy
Which consumers
can access the APIs
and from where
Role
What the
consumer can
access
Security Groups
Control network
access to resources
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
API resource policies are mandatory
{
"Effect": "Deny",
"Principal": "*",
"Action": "execute-api:Invoke",
"Resource": "arn:aws:execute-api:<region>:<acct id>:<api id>/*",
"Condition": {
"StringNotEquals": {
"aws:SourceVpce": [
"vpce-XXX“,
“vpce-YYY”
]
}
}
}
Whitelist of allowed
VPC endpoint ID’s
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
VPC endpoint resource policies
{
"Principal": "*",
"Action": "execute-api:Invoke"
"Effect": "Allow",
"Resource": [
"arn:aws:execute-api:<region>:<acct id>:<api1 id>/*",
"arn:aws:execute-api:<region>:<acct id>:<api2 id>/*"
]
}
Whitelist of allowed API’s that can be
invoked through the endpoint
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
API deployment
Serverless application model
AWS::Serverless::Function
AWS::Serverless::SimpleTable
AWS::Serverless::Api
SAM template
AWS CloudFormation
AWS Lambda
function
DynamoDB
table
Amazon API
Gateway
Transform
AWS Lambda function code
OpenAPI spec
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
API deployment
APIGatewayResource:
Type: AWS::Serverless::Api
Properties:
Name: ExampleAPI
StageName: v1
EndpointConfiguration: PRIVATE
DefinitionBody:
Fn::Transform:
Name: 'AWS::Include'
Parameters:
Location: !Ref S3LocationOfAPISpec
OpenAPI spec can
include AWS
CloudFormation
functions
OpenAPI/swagger inclusion
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
OpenAPI spec – API resource policy
x-amazon-apigateway-policy:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
AWS:
- Ref: APIAccessRole
Action: "execute-api:Invoke"
Resource: "execute-api:/*"
- Effect: Deny
Principal: *
Action: "execute-api:Invoke"
Resource: "execute-api:/*"
Condition:
StringNotEquals:
aws:SourceVpce:
- Ref: VPCEndpointResource
Allow these roles
From these Amazon VPC
endpoint IDs
AWS extension to OpenAPI
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Consumers
Monitoring
Private
endpoint Secured
resource
Logging and end-to-end tracing
AWS Account 1 AWS Account 2
Amazon VPC Amazon VPC
Amazon
CloudWatch
AWS X-Ray
Logs and
metrics
Traces
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Where should I start?
Start experimenting with SAM
https://aws.amazon.com/serverless/sam/
Find pre-built examples in the Serverless Application Repository
https://aws.amazon.com/serverless/serverlessrepo/
Learn PrivateLink Best Practices (re:Invent 2018 session)
https://youtu.be/85DbVGLXw3Y
Get familiar with API Gateway documentation
https://docs.aws.amazon.com/apigateway/index.html

Contenu connexe

Tendances

Tendances (20)

Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
 
AWS identity services: Enabling and securing your cloud journey - SEC203 - Ch...
AWS identity services: Enabling and securing your cloud journey - SEC203 - Ch...AWS identity services: Enabling and securing your cloud journey - SEC203 - Ch...
AWS identity services: Enabling and securing your cloud journey - SEC203 - Ch...
 
Monitoring with container insights & anomaly detection - SVC308 - New York AW...
Monitoring with container insights & anomaly detection - SVC308 - New York AW...Monitoring with container insights & anomaly detection - SVC308 - New York AW...
Monitoring with container insights & anomaly detection - SVC308 - New York AW...
 
How Millennium Management achieves provable security with AWS Zelkova - FSV30...
How Millennium Management achieves provable security with AWS Zelkova - FSV30...How Millennium Management achieves provable security with AWS Zelkova - FSV30...
How Millennium Management achieves provable security with AWS Zelkova - FSV30...
 
Introduction to AWS OutIntroduction to AWS Outposts - CMP203 - Chicago AWS Su...
Introduction to AWS OutIntroduction to AWS Outposts - CMP203 - Chicago AWS Su...Introduction to AWS OutIntroduction to AWS Outposts - CMP203 - Chicago AWS Su...
Introduction to AWS OutIntroduction to AWS Outposts - CMP203 - Chicago AWS Su...
 
Exploring the fundamentals of AWS networking - SVC210 - Chicago AWS Summit
Exploring the fundamentals of AWS networking - SVC210 - Chicago AWS SummitExploring the fundamentals of AWS networking - SVC210 - Chicago AWS Summit
Exploring the fundamentals of AWS networking - SVC210 - Chicago AWS Summit
 
打破時空藩籬,輕鬆存取您的雲端工作負載
打破時空藩籬,輕鬆存取您的雲端工作負載打破時空藩籬,輕鬆存取您的雲端工作負載
打破時空藩籬,輕鬆存取您的雲端工作負載
 
從業人員指南-如何像技術專家一樣守護您的雲端安全
從業人員指南-如何像技術專家一樣守護您的雲端安全從業人員指南-如何像技術專家一樣守護您的雲端安全
從業人員指南-如何像技術專家一樣守護您的雲端安全
 
Introduction to AWS Global Accelerator - SVC211 - Chicago AWS Summit
Introduction to AWS Global Accelerator - SVC211 - Chicago AWS SummitIntroduction to AWS Global Accelerator - SVC211 - Chicago AWS Summit
Introduction to AWS Global Accelerator - SVC211 - Chicago AWS Summit
 
Scalable serverless architectures using event-driven design - MAD301 - Atlant...
Scalable serverless architectures using event-driven design - MAD301 - Atlant...Scalable serverless architectures using event-driven design - MAD301 - Atlant...
Scalable serverless architectures using event-driven design - MAD301 - Atlant...
 
Software delivery best practices: Lessons from Amazon and our customers - MAD...
Software delivery best practices: Lessons from Amazon and our customers - MAD...Software delivery best practices: Lessons from Amazon and our customers - MAD...
Software delivery best practices: Lessons from Amazon and our customers - MAD...
 
Building with AWS Databases: Match Your Workload to the Right Database | AWS ...
Building with AWS Databases: Match Your Workload to the Right Database | AWS ...Building with AWS Databases: Match Your Workload to the Right Database | AWS ...
Building with AWS Databases: Match Your Workload to the Right Database | AWS ...
 
Deep-Dive-with-Cloud-Monitoring-with-Amazon-EKS-and-Prometheus
Deep-Dive-with-Cloud-Monitoring-with-Amazon-EKS-and-PrometheusDeep-Dive-with-Cloud-Monitoring-with-Amazon-EKS-and-Prometheus
Deep-Dive-with-Cloud-Monitoring-with-Amazon-EKS-and-Prometheus
 
AWS App Mesh (Service Mesh Magic)- AWS Container Day 2019 Barcelona
AWS App Mesh (Service Mesh Magic)- AWS Container Day 2019 BarcelonaAWS App Mesh (Service Mesh Magic)- AWS Container Day 2019 Barcelona
AWS App Mesh (Service Mesh Magic)- AWS Container Day 2019 Barcelona
 
AWS Networking Fundamentals
AWS Networking FundamentalsAWS Networking Fundamentals
AWS Networking Fundamentals
 
AWS Fargate deep dive - MAD303 - Chicago AWS Summit
AWS Fargate deep dive - MAD303 - Chicago AWS SummitAWS Fargate deep dive - MAD303 - Chicago AWS Summit
AWS Fargate deep dive - MAD303 - Chicago AWS Summit
 
Developing Modern Applications in the Cloud
Developing Modern Applications in the CloudDeveloping Modern Applications in the Cloud
Developing Modern Applications in the Cloud
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDK
 
Increasing the value of video with machine learning & AWS Media Services - SV...
Increasing the value of video with machine learning & AWS Media Services - SV...Increasing the value of video with machine learning & AWS Media Services - SV...
Increasing the value of video with machine learning & AWS Media Services - SV...
 
Planning advanced AWS networking architectures - SVC304 - Chicago AWS Summit
Planning advanced AWS networking architectures - SVC304 - Chicago AWS SummitPlanning advanced AWS networking architectures - SVC304 - Chicago AWS Summit
Planning advanced AWS networking architectures - SVC304 - Chicago AWS Summit
 

Similaire à Building Private API’s for Security Automation at Monash University

Similaire à Building Private API’s for Security Automation at Monash University (20)

Building secure APIs in the cloud - SDD403-R - AWS re:Inforce 2019
Building secure APIs in the cloud - SDD403-R - AWS re:Inforce 2019 Building secure APIs in the cloud - SDD403-R - AWS re:Inforce 2019
Building secure APIs in the cloud - SDD403-R - AWS re:Inforce 2019
 
To Infinity and Beyond: What's new with Serverless
To Infinity and Beyond: What's new with ServerlessTo Infinity and Beyond: What's new with Serverless
To Infinity and Beyond: What's new with Serverless
 
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
 
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
 
Security at the Speed of Cloud How to Think About it & How You Can Do it Now
Security at the Speed of Cloud How to Think About it & How You Can Do it NowSecurity at the Speed of Cloud How to Think About it & How You Can Do it Now
Security at the Speed of Cloud How to Think About it & How You Can Do it Now
 
How Vanguard and Bloomberg Use AWS PrivateLink (NET323) - AWS re:Invent 2018
How Vanguard and Bloomberg Use AWS PrivateLink (NET323) - AWS re:Invent 2018How Vanguard and Bloomberg Use AWS PrivateLink (NET323) - AWS re:Invent 2018
How Vanguard and Bloomberg Use AWS PrivateLink (NET323) - AWS re:Invent 2018
 
AWS CloudFormation Deep Dive and Recent Enhancements
AWS CloudFormation Deep Dive and Recent EnhancementsAWS CloudFormation Deep Dive and Recent Enhancements
AWS CloudFormation Deep Dive and Recent Enhancements
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
 
Scale - Enterprise Network Architectures on AWS
Scale - Enterprise Network Architectures on AWSScale - Enterprise Network Architectures on AWS
Scale - Enterprise Network Architectures on AWS
 
How to build a FullStack Airline Ticketing Web App.pdf
How to build a FullStack Airline Ticketing Web App.pdfHow to build a FullStack Airline Ticketing Web App.pdf
How to build a FullStack Airline Ticketing Web App.pdf
 
AWS Security, IAM, Databases, Elasticity, Management Tools - AWSome Day Phila...
AWS Security, IAM, Databases, Elasticity, Management Tools - AWSome Day Phila...AWS Security, IAM, Databases, Elasticity, Management Tools - AWSome Day Phila...
AWS Security, IAM, Databases, Elasticity, Management Tools - AWSome Day Phila...
 
Building A Cloud-Native Advanced Logistics Ecosystem
Building A Cloud-Native Advanced Logistics EcosystemBuilding A Cloud-Native Advanced Logistics Ecosystem
Building A Cloud-Native Advanced Logistics Ecosystem
 
Websites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinWebsites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit Berlin
 
ArmadaJS - how to build a full-stack airline ticketing web app
ArmadaJS - how to build a full-stack airline ticketing web appArmadaJS - how to build a full-stack airline ticketing web app
ArmadaJS - how to build a full-stack airline ticketing web app
 
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...
AWS Summit Singapore 2019 | The Serverless Lifecycle: Development and Operati...
 
Solution-Lab-Serverless-Web-Application
Solution-Lab-Serverless-Web-ApplicationSolution-Lab-Serverless-Web-Application
Solution-Lab-Serverless-Web-Application
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Building APIs with Amazon API Gateway
Building APIs with Amazon API GatewayBuilding APIs with Amazon API Gateway
Building APIs with Amazon API Gateway
 
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...
Building APIs with Amazon API Gateway: re:Invent 2018 Recap at the AWS Loft -...
 

Plus de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Building Private API’s for Security Automation at Monash University

  • 1. P U B L I C S E C T O R S U M M I T Canberra, ACT
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Building Private APIs for Security Automation Steven Gillard Solutions Architect AWS Public Sector James Lambeth Enterprise Security Architect Monash University
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T What are my options? Consumers AWS Account 1 Amazon VPC Secured resources AWS Account 2 Amazon VPC
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T AND
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T
  • 6. Completely manual The old way AWS Cloud Amazon VPC Amazon VPCAmazon VPC Web application firewall Amazon CloudFront Security teamOperations team Backend web server Backend web server Project team/faculty members End users
  • 7. Phase one – prototype The new way AWS Cloud Amazon VPC AWS Secrets Manager Web application firewall AWS Lambda function Amazon DynamoDB Amazon API Gateway Operations team
  • 8. What next? We still had a few outstanding questions… • How do we make the API private? • How can we make the API more resilient? • How do the operations team call the API? • How do we package the API for deployment?
  • 9. Phase two – more features The new way AWS Cloud Amazon VPC AWS Secrets Manager AWS Lambda Function Amazon CloudFront Backend web server Amazon VPC Automation pipeline Amazon DynamoDB AWS Lambda function QueueAmazon API Gateway Endpoint AWS CloudFormation AWS Lambda Function Operations team Ingress/Egress AccountAutomation Account Web application firewall
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Serverless APIs No infrastructure provisioning, no management Automatic scaling Pay for value Highly available and secure
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T What are my options? Consumers AWS Account 1 Amazon VPC Secured resources AWS Account 2 Amazon VPC
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T API Gateway private integration Consumers AWS Account 1 Amazon VPC AWS Account 2 Amazon VPC Amazon API Gateway regional endpoint Internet gateway Network load balancer Secured resource Private integration Public frontend, private backend
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T API Gateway AWS Lambda integration Consumers AWS Account 1 Amazon VPC AWS Account 2 Amazon VPC Amazon API Gateway regional endpoint Internet gateway Secured resource AWS Lambda proxy integration Public frontend, private backend
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Consumers API Gateway private endpoints Amazon API Gateway Private endpoint Secured resource AWS Lambda proxy integration Consumer VPC endpoint AWS Account 1 AWS Account 2 Amazon VPC Amazon VPC
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Consumers API Gateway private endpoints Amazon API Gateway Private endpoint AWS Account 1 Amazon VPC Secured resource AWS Lambda proxy integration AWS Account 2 Amazo n VPC Peering Central endpoint Amazon VPC
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Consumers API Gateway private endpoints Amazon API Gateway Private endpoint AWS Account 1 Amazon VPC Secured resource AWS Lambda proxy integration AWS Account 2 Amazo n VPC Peering Central endpoint with DNS Amazon VPC Route53 private hosted zone AssociationRoute 53 Resolver
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Asynchronous API Consumers Amazon API Gateway Private endpoint AWS Account Amazon VPC Secured resource AWS Account Amazon VPC Consumer Amazon VPC endpoint Amazon SQS queue DynamoDB table Direct integration
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Consumers API authentication and authorisation Amazon API Gateway Private endpoint Secured resource AWS Lambda proxy integration AWS Lambda authorizer AWS Account 1 AWS Account 2 Amazon VPC Amazon VPC AWS Lambda authorizer Key/ token/ secret
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Consumers API authentication and authorisation Amazon API Gateway Private endpoint Secured resource AWS Lambda proxy integration Amazon Cognito AWS Account 1 AWS Account 2 Amazon VPC Amazon VPC Amazon Cognito Internet gateway Token
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Consumers API authentication and authorisation Amazon API Gateway Private endpoint Secured resource Lambda Proxy Integration IAM/AWS Sigv4 AWS Account 1 AWS Account 2 Amazon VPC Amazon VPC IAM Role Role API resource policy Signed request Additional access check - optional External Auth DB
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Consumers Multiple control points Amazon API Gateway Private endpoint Secured resource AWS Lambda proxy integration Roles and policies AWS Account 1 AWS Account 2 Amazon VPC Amazon VPC VPC Endpoint Resource Policy What APIs can be accessed through the endpoint API Gateway Resource Policy Which consumers can access the APIs and from where Role What the consumer can access Security Groups Control network access to resources
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T API resource policies are mandatory { "Effect": "Deny", "Principal": "*", "Action": "execute-api:Invoke", "Resource": "arn:aws:execute-api:<region>:<acct id>:<api id>/*", "Condition": { "StringNotEquals": { "aws:SourceVpce": [ "vpce-XXX“, “vpce-YYY” ] } } } Whitelist of allowed VPC endpoint ID’s
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T VPC endpoint resource policies { "Principal": "*", "Action": "execute-api:Invoke" "Effect": "Allow", "Resource": [ "arn:aws:execute-api:<region>:<acct id>:<api1 id>/*", "arn:aws:execute-api:<region>:<acct id>:<api2 id>/*" ] } Whitelist of allowed API’s that can be invoked through the endpoint
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T API deployment Serverless application model AWS::Serverless::Function AWS::Serverless::SimpleTable AWS::Serverless::Api SAM template AWS CloudFormation AWS Lambda function DynamoDB table Amazon API Gateway Transform AWS Lambda function code OpenAPI spec
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T API deployment APIGatewayResource: Type: AWS::Serverless::Api Properties: Name: ExampleAPI StageName: v1 EndpointConfiguration: PRIVATE DefinitionBody: Fn::Transform: Name: 'AWS::Include' Parameters: Location: !Ref S3LocationOfAPISpec OpenAPI spec can include AWS CloudFormation functions OpenAPI/swagger inclusion
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T OpenAPI spec – API resource policy x-amazon-apigateway-policy: Version: "2012-10-17" Statement: - Effect: Allow Principal: AWS: - Ref: APIAccessRole Action: "execute-api:Invoke" Resource: "execute-api:/*" - Effect: Deny Principal: * Action: "execute-api:Invoke" Resource: "execute-api:/*" Condition: StringNotEquals: aws:SourceVpce: - Ref: VPCEndpointResource Allow these roles From these Amazon VPC endpoint IDs AWS extension to OpenAPI
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Consumers Monitoring Private endpoint Secured resource Logging and end-to-end tracing AWS Account 1 AWS Account 2 Amazon VPC Amazon VPC Amazon CloudWatch AWS X-Ray Logs and metrics Traces
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R S U M M I T Where should I start? Start experimenting with SAM https://aws.amazon.com/serverless/sam/ Find pre-built examples in the Serverless Application Repository https://aws.amazon.com/serverless/serverlessrepo/ Learn PrivateLink Best Practices (re:Invent 2018 session) https://youtu.be/85DbVGLXw3Y Get familiar with API Gateway documentation https://docs.aws.amazon.com/apigateway/index.html