SlideShare a Scribd company logo
1 of 39
Let the right one in:
Securing files on AWS S3
Sunil Kowlgi
Houston Techfest
5/5/2018
About me
• Founder of Outclip, a startup focused on video sharing for remote
teams: https://checkoutclip.com
• 2+ years of experience with AWS S3
• Contact: sunil@checkoutclip.com
Amazon S3
• Simple Storage Service (S3)
• Among the top 3 most used AWS services
• S3 is an object storage system, which is quite different than file
system:
• Flat vs. hierarchical address space: makes S3 highly scalable. E.g.
‘prefix/filename’ where prefix is not really a folder.
• Customizable metadata vs. fixed metadata: can add custom attributes to each
object
• Pricing comparison:
• Dropbox: 1TB for $9.99 a month, S3: 1TB for $23 at a minimum
AWS S3 Shared Responsibility Security Model
Demo: S3 Access Denied
• https://houston-techfest-bucket.s3.amazonaws.com/Wildlife.mp4
• https://signing-demo-bucket.s3.amazonaws.com/Wildlife.mp4
S3 Security Fiascos
• “Respondent has engaged in a number of practices that, taken
together, failed to provide reasonable security to prevent
unauthorized access to Rider and Driver personal information stored
in the Amazon S3 Datastore. Among other things, Respondent:
• a. Until approximately September 2014, failed to implement reasonable
access controls to safeguard data stored in the Amazon S3 Datastore. For
example, Respondent:
• i. failed to require programs and engineers that access the Amazon S3 Datastore to use
distinct access keys, instead permitting all programs and engineers to use a single AWS
access key that provided full administrative privileges over all data in the Amazon S3
Datastore;
• ii. failed to restrict access to systems based on employees’ job functions; and
• iii. failed to require multi-factor authentication for access to the Amazon S3 Datastore;”
S3 Security Fiascos
• In 2017, WWE’s misconfigured S3 exposed 3 million emails
• Security researchers discovered two open Amazon S3 Buckets that
contained a trove of private information collected for WWE marketing
purposes.
• An estimated 12 percent of all the information (several gigabytes) was
set to “Public” access and available for anybody with internet
connection to view and download.
Software Security
• While software engineering is about ensuring that certain things
happen, security is about ensuring that they don’t.
– Ross Anderson, Security Engineering
• Many systems fail because designers protect the wrong things or
protect the right things but the wrong way.
• Robust security design requires that the protection goals are made
explicit.
Good Security Engineering Requires Four
Things
• Policy: what are the security goals?
• Mechanism: how to implement the policy?
• Assurance : how reliable are the mechanisms?
• Incentive: understand motivation for people who both secure and try
to attack your system
S3 File Security Policy
1. Deny access to everyone except some users
2. Encrypt data at rest
3. Encrypt data before sending it to S3
4. Manage access through special URL
5. Manage access without special URL
Using S3
• Object: the thing you store e.g. .mp4, .jpg, etc.
• Bucket: where all your objects go
• Bucket policy: controls access to the bucket
• Possible operations: listObjects, getObject, putObject, etc.
• IAM (Identity and Access Management): AWS’ system to set up and
manage user access to all AWS services, not just S3
• Ways to access S3:
• Command line interface (CLI)
• Web console
• API for programmatic access
Demo: S3 console and CLI
S3 File Security Policy
1. Deny access to everyone except some users
2. Encrypt data at rest
3. Encrypt data before sending it to S3
4. Manage access through special URL
5. Manage access without special URL
Managing Access to S3
• Ways to manage access to buckets:
• Bucket Policy
• IAM Policy a.k.a User Policy
• ACLs
• “When Amazon S3 receives a request—for example, a bucket or an
object operation—it first verifies that the requester has the necessary
permissions. Amazon S3 evaluates all the relevant access policies,
user policies, and resource-based policies (bucket policy, bucket ACL,
object ACL) in deciding whether to authorize the request.”
Bucket Policy vs IAM policy
Sample Bucket Policy Sample IAM Policy
ACL – Access Control List
• ACLs are a legacy access control mechanism
• AWS recommends bucket policy over ACL
• Use ACL when you want to manage permissions on individual objects
Sample ACL
Bucket Policy vs. IAM Policy vs ACL: who
wins?
• Access is based on “least-privilege union of all the permissions”
Demo: Bucket policy and ACL
How to Write a Good Bucket Policy
• Explicitly deny everyone except a few users
• Explicitly allow a few users to perform specific operations:
• E.g. Deny everyone but allow Alice to execute S3GetObject on the bucket
Demo: Bucket Policy Best Practice
S3 File Security Policy
1. Deny access to everyone except some users
2. Encrypt data at rest
3. Encrypt data before sending it to S3
4. Manage access through special URL
5. Manage access without special URL
Encrypting data
• Server-side encryption
• Amazon S3 encrypts each object at rest with a unique key
• Client-side encryption
• Object is encrypted by client before it’s sent to S3
• Key management is hard, but AWS Key Management Service (KMS) comes to
the rescue
Demo: Server-side Encryption
Demo: Client-side Encryption
Client-side Encryption
AWS Key
Management
Service (KMS)
AWS S3
S3 File Security Policy
1. Deny access to everyone except some users
2. Encrypt data at rest
3. Encrypt data before sending it to S3
4. Manage access through special URL
5. Manage access without special URL
Manage Access Through Special URL
• Every object has a unique URL (let’s call it a normal URL):
• E.g. https://myBucket.s3.amazonaws.com/vacation.mp4
• There are cases where you want to deny access to the object’s normal
URL but allow access to the object through a special URL.
• A special URL is advantageous because it can:
• Allow access to specific object without having to relax bucket policy
• Have a start date and expiry date
• Condition based access: e.g. access based on IP address
Manage access through special URL
• Two ways to get a special URL for an object
• S3 Pre-signed URL
• Cloudfront signed URL
• S3 Presigned URLs can be used to both get and put objects
• Can only specify expiration date
• Cloudfront Signed URLs are used only to get objects
• Can specify start and expiration date
• Can restrict to IP address or range of IP addresses
What is Cloudfront?
• AWS Cloudfront is a content delivery network (CDN)
• Its primary advantage is faster access for users by caching objects
• Another advantage: Cloudfront provides an extra layer of security
policy over S3:
• Signed URLs
• Signed cookies
What is Cloudfront?
Demo: Pre-signed URL
Demo: Cloudfront Signed URL
S3 File Security Policy
1. Deny access to everyone except some users
2. Encrypt data at rest
3. Encrypt data before sending it to S3
4. Manage access through special URL
5. Manage access without special URL
Manage access without special URL
• There are cases when you want to give users access to multiple
objects
• For each user if you’re signing URLs for multiple objects, that’s not
scalable. To scale you’ll need to use signed cookies.
Cloudfront Signed Cookies
• For signed cookies you’ll need Cloudfront. Signed cookies allow similar policies as signed URLs:
• Can specify start and expiration date
• Can restrict to IP address or range of IP addresses
• With one important addition: you can use a wildcard character (‘*’) in the resource name in the policy
statement to give access to multiple objects
• Example policy:
{
Statement : [
{
Resource : "https://example.com/privatecontent/*",
Condition: { DateLessThan: { 'AWS:EpochTime’: link_expiration_timestamp } }
}
]
}
Summary
• AWS Shared Responsibility security model implies you’re responsible for
configuring S3 correctly. S3 misconfigurations can lead to compromised data
security.
• There are several mechanisms to protect data in S3 that enable a range of policy
options;
1. Deny access to everyone except some users
2. Encrypt data at rest
3. Encrypt data before sending it to S3
4. Manage access through special URL
5. Manage access without special URL
• Knowledge of these mechanisms along with a restrictive security policy approach
can improve the security of your data in S3
Appendix
Examples
• https://github.com/kowlgi/effective-s3-file-security
References
• https://d1.awsstatic.com/whitepapers/Security/AWS_Security_Best_Practices.pdf
• https://www.ftc.gov/enforcement/cases-proceedings/152-3054/uber-technologies-inc
• https://mackeepersecurity.com/post/world-wrestling-entertainment-leaks-3-million-
emails
• http://www.cl.cam.ac.uk/~rja14/book.html
• https://docs.aws.amazon.com/AmazonS3/latest/dev/how-s3-evaluates-access-
control.html
• https://aws.amazon.com/blogs/security/iam-policies-and-bucket-policies-and-acls-oh-
my-controlling-access-to-s3-resources/
• https://aws.amazon.com/about-aws/whats-new/2011/10/04/amazon-s3-announces-
server-side-encryption-support/
• https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateConten
t.html

More Related Content

What's hot

501 ch 4 securing your network
501 ch 4 securing your network501 ch 4 securing your network
501 ch 4 securing your networkgocybersec
 
501 ch 6 threats vulnerabilities and common attacks
501 ch 6 threats vulnerabilities and common attacks501 ch 6 threats vulnerabilities and common attacks
501 ch 6 threats vulnerabilities and common attacksgocybersec
 
501 ch 2 understanding iam
501 ch 2 understanding iam501 ch 2 understanding iam
501 ch 2 understanding iamgocybersec
 
Security Best Practices - Transformation Day Public Sector London 2017
Security Best Practices - Transformation Day Public Sector London 2017Security Best Practices - Transformation Day Public Sector London 2017
Security Best Practices - Transformation Day Public Sector London 2017Amazon Web Services
 
AWS re:Invent 2016: Cyber Resiliency – surviving the breach (SAC321)
AWS re:Invent 2016: Cyber Resiliency – surviving the breach (SAC321)AWS re:Invent 2016: Cyber Resiliency – surviving the breach (SAC321)
AWS re:Invent 2016: Cyber Resiliency – surviving the breach (SAC321)Amazon Web Services
 
GDPR - Top 10 AWS Security and Compliance Best Practices
GDPR - Top 10 AWS Security and Compliance Best PracticesGDPR - Top 10 AWS Security and Compliance Best Practices
GDPR - Top 10 AWS Security and Compliance Best PracticesAhmad Khan
 
Aws certified-security
Aws certified-securityAws certified-security
Aws certified-securitykartikaryan4
 
AWS per la semplificazione del percorso di conformità al GDPR
AWS per la semplificazione del percorso di conformità al GDPRAWS per la semplificazione del percorso di conformità al GDPR
AWS per la semplificazione del percorso di conformità al GDPRAmazon Web Services
 
What's (nearly) new | AWS Security Roadshow
What's (nearly) new | AWS Security RoadshowWhat's (nearly) new | AWS Security Roadshow
What's (nearly) new | AWS Security RoadshowAmazon Web Services
 
501 ch 8 risk managment tool
501 ch 8 risk managment tool501 ch 8 risk managment tool
501 ch 8 risk managment toolgocybersec
 
AWS Enterprise Summit Netherlands - AWS IoT
AWS Enterprise Summit Netherlands - AWS IoTAWS Enterprise Summit Netherlands - AWS IoT
AWS Enterprise Summit Netherlands - AWS IoTAmazon Web Services
 
501 ch 7 protecting against advanced attacks
501 ch 7 protecting against advanced attacks501 ch 7 protecting against advanced attacks
501 ch 7 protecting against advanced attacksgocybersec
 
IAM Introduction and Best Practices
IAM Introduction and Best PracticesIAM Introduction and Best Practices
IAM Introduction and Best PracticesAmazon Web Services
 
501 ch 1 mastering security basics
501 ch 1 mastering security basics501 ch 1 mastering security basics
501 ch 1 mastering security basicsgocybersec
 
Securing enterprise big data workloads on AWS
Securing enterprise big data workloads on AWSSecuring enterprise big data workloads on AWS
Securing enterprise big data workloads on AWSAmazon Web Services
 
Securing Applications in the Cloud
Securing Applications in the CloudSecuring Applications in the Cloud
Securing Applications in the CloudSecurity Innovation
 
Building an Enterprise-Grade Azure Governance Model
Building an Enterprise-Grade Azure Governance ModelBuilding an Enterprise-Grade Azure Governance Model
Building an Enterprise-Grade Azure Governance ModelKarl Ots
 
Getting started with aws security toronto rs
Getting started with aws security toronto rsGetting started with aws security toronto rs
Getting started with aws security toronto rsAmazon Web Services
 

What's hot (20)

501 ch 4 securing your network
501 ch 4 securing your network501 ch 4 securing your network
501 ch 4 securing your network
 
501 ch 6 threats vulnerabilities and common attacks
501 ch 6 threats vulnerabilities and common attacks501 ch 6 threats vulnerabilities and common attacks
501 ch 6 threats vulnerabilities and common attacks
 
501 ch 2 understanding iam
501 ch 2 understanding iam501 ch 2 understanding iam
501 ch 2 understanding iam
 
Security Best Practices - Transformation Day Public Sector London 2017
Security Best Practices - Transformation Day Public Sector London 2017Security Best Practices - Transformation Day Public Sector London 2017
Security Best Practices - Transformation Day Public Sector London 2017
 
AWS re:Invent 2016: Cyber Resiliency – surviving the breach (SAC321)
AWS re:Invent 2016: Cyber Resiliency – surviving the breach (SAC321)AWS re:Invent 2016: Cyber Resiliency – surviving the breach (SAC321)
AWS re:Invent 2016: Cyber Resiliency – surviving the breach (SAC321)
 
GDPR - Top 10 AWS Security and Compliance Best Practices
GDPR - Top 10 AWS Security and Compliance Best PracticesGDPR - Top 10 AWS Security and Compliance Best Practices
GDPR - Top 10 AWS Security and Compliance Best Practices
 
Aws certified-security
Aws certified-securityAws certified-security
Aws certified-security
 
AWS per la semplificazione del percorso di conformità al GDPR
AWS per la semplificazione del percorso di conformità al GDPRAWS per la semplificazione del percorso di conformità al GDPR
AWS per la semplificazione del percorso di conformità al GDPR
 
What's (nearly) new | AWS Security Roadshow
What's (nearly) new | AWS Security RoadshowWhat's (nearly) new | AWS Security Roadshow
What's (nearly) new | AWS Security Roadshow
 
501 ch 8 risk managment tool
501 ch 8 risk managment tool501 ch 8 risk managment tool
501 ch 8 risk managment tool
 
AWS Enterprise Summit Netherlands - AWS IoT
AWS Enterprise Summit Netherlands - AWS IoTAWS Enterprise Summit Netherlands - AWS IoT
AWS Enterprise Summit Netherlands - AWS IoT
 
501 ch 7 protecting against advanced attacks
501 ch 7 protecting against advanced attacks501 ch 7 protecting against advanced attacks
501 ch 7 protecting against advanced attacks
 
IAM Introduction and Best Practices
IAM Introduction and Best PracticesIAM Introduction and Best Practices
IAM Introduction and Best Practices
 
501 ch 1 mastering security basics
501 ch 1 mastering security basics501 ch 1 mastering security basics
501 ch 1 mastering security basics
 
Securing enterprise big data workloads on AWS
Securing enterprise big data workloads on AWSSecuring enterprise big data workloads on AWS
Securing enterprise big data workloads on AWS
 
Understanding AWS Security
Understanding AWS SecurityUnderstanding AWS Security
Understanding AWS Security
 
Securing Applications in the Cloud
Securing Applications in the CloudSecuring Applications in the Cloud
Securing Applications in the Cloud
 
Building an Enterprise-Grade Azure Governance Model
Building an Enterprise-Grade Azure Governance ModelBuilding an Enterprise-Grade Azure Governance Model
Building an Enterprise-Grade Azure Governance Model
 
Getting started with aws security toronto rs
Getting started with aws security toronto rsGetting started with aws security toronto rs
Getting started with aws security toronto rs
 
Aws IAM
Aws IAMAws IAM
Aws IAM
 

Similar to Houston techfest spring 2018

AWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsAWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsPiyush Agrawal
 
Training AWS: Module 6 - Storage S3 in AWS
Training AWS: Module 6 - Storage S3 in AWSTraining AWS: Module 6 - Storage S3 in AWS
Training AWS: Module 6 - Storage S3 in AWSBùi Quang Lâm
 
Cost efficiencies and security best practices with Amazon S3 storage - STG301...
Cost efficiencies and security best practices with Amazon S3 storage - STG301...Cost efficiencies and security best practices with Amazon S3 storage - STG301...
Cost efficiencies and security best practices with Amazon S3 storage - STG301...Amazon Web Services
 
Data Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and ArchiveData Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and ArchiveAmazon Web Services
 
Core strategies to develop defense in depth in AWS
Core strategies to develop defense in depth in AWSCore strategies to develop defense in depth in AWS
Core strategies to develop defense in depth in AWSShane Peden
 
Deep Dive on Amazon S3 - AWS Online Tech Talks
Deep Dive on Amazon S3 - AWS Online Tech TalksDeep Dive on Amazon S3 - AWS Online Tech Talks
Deep Dive on Amazon S3 - AWS Online Tech TalksAmazon Web Services
 
Data Security in the Cloud Demystified – Policies, Protection, and Tools for ...
Data Security in the Cloud Demystified – Policies, Protection, and Tools for ...Data Security in the Cloud Demystified – Policies, Protection, and Tools for ...
Data Security in the Cloud Demystified – Policies, Protection, and Tools for ...Amazon Web Services
 
Deep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
Deep Dive on Amazon S3 - March 2017 AWS Online Tech TalksDeep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
Deep Dive on Amazon S3 - March 2017 AWS Online Tech TalksAmazon Web Services
 
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸Amazon Web Services
 
AWS S3 masterclass
AWS S3 masterclassAWS S3 masterclass
AWS S3 masterclassVikas Arora
 
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...Amazon Web Services
 
Diving into Common AWS Misconfigurations
Diving into Common AWS MisconfigurationsDiving into Common AWS Misconfigurations
Diving into Common AWS MisconfigurationsNikhil Sahoo
 
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...Simplilearn
 
Cross-Account Delegation in AWS
Cross-Account Delegation in AWSCross-Account Delegation in AWS
Cross-Account Delegation in AWSJames Wing
 
AWS Amazon S3 Mastery Bootcamp
AWS Amazon S3 Mastery BootcampAWS Amazon S3 Mastery Bootcamp
AWS Amazon S3 Mastery BootcampMatt Bohn
 
Visualizing Amazon S3 Storage Management with QuickSight - AWS Online Tech Talks
Visualizing Amazon S3 Storage Management with QuickSight - AWS Online Tech TalksVisualizing Amazon S3 Storage Management with QuickSight - AWS Online Tech Talks
Visualizing Amazon S3 Storage Management with QuickSight - AWS Online Tech TalksAmazon Web Services
 

Similar to Houston techfest spring 2018 (20)

Amazon s3
Amazon s3Amazon s3
Amazon s3
 
AWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsAWS Storage - S3 Fundamentals
AWS Storage - S3 Fundamentals
 
Training AWS: Module 6 - Storage S3 in AWS
Training AWS: Module 6 - Storage S3 in AWSTraining AWS: Module 6 - Storage S3 in AWS
Training AWS: Module 6 - Storage S3 in AWS
 
AWS-S3.pptx
AWS-S3.pptxAWS-S3.pptx
AWS-S3.pptx
 
Cost efficiencies and security best practices with Amazon S3 storage - STG301...
Cost efficiencies and security best practices with Amazon S3 storage - STG301...Cost efficiencies and security best practices with Amazon S3 storage - STG301...
Cost efficiencies and security best practices with Amazon S3 storage - STG301...
 
Data Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and ArchiveData Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and Archive
 
AWS Simple Storage Service (s3)
AWS Simple Storage Service (s3) AWS Simple Storage Service (s3)
AWS Simple Storage Service (s3)
 
Core strategies to develop defense in depth in AWS
Core strategies to develop defense in depth in AWSCore strategies to develop defense in depth in AWS
Core strategies to develop defense in depth in AWS
 
Deep Dive on Amazon S3 - AWS Online Tech Talks
Deep Dive on Amazon S3 - AWS Online Tech TalksDeep Dive on Amazon S3 - AWS Online Tech Talks
Deep Dive on Amazon S3 - AWS Online Tech Talks
 
Data Security in the Cloud Demystified – Policies, Protection, and Tools for ...
Data Security in the Cloud Demystified – Policies, Protection, and Tools for ...Data Security in the Cloud Demystified – Policies, Protection, and Tools for ...
Data Security in the Cloud Demystified – Policies, Protection, and Tools for ...
 
Deep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
Deep Dive on Amazon S3 - March 2017 AWS Online Tech TalksDeep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
Deep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
 
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸
 
AWS S3 masterclass
AWS S3 masterclassAWS S3 masterclass
AWS S3 masterclass
 
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
AWS re:Invent 2016: Become an AWS IAM Policy Ninja in 60 Minutes or Less (SAC...
 
Diving into Common AWS Misconfigurations
Diving into Common AWS MisconfigurationsDiving into Common AWS Misconfigurations
Diving into Common AWS Misconfigurations
 
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
AWS S3 | Tutorial For Beginners | AWS S3 Bucket Tutorial | AWS Tutorial For B...
 
Cross-Account Delegation in AWS
Cross-Account Delegation in AWSCross-Account Delegation in AWS
Cross-Account Delegation in AWS
 
AWS Amazon S3 Mastery Bootcamp
AWS Amazon S3 Mastery BootcampAWS Amazon S3 Mastery Bootcamp
AWS Amazon S3 Mastery Bootcamp
 
Visualizing Amazon S3 Storage Management with QuickSight - AWS Online Tech Talks
Visualizing Amazon S3 Storage Management with QuickSight - AWS Online Tech TalksVisualizing Amazon S3 Storage Management with QuickSight - AWS Online Tech Talks
Visualizing Amazon S3 Storage Management with QuickSight - AWS Online Tech Talks
 
Builders' Day - Best Practises for S3 - BL
Builders' Day - Best Practises for S3 - BLBuilders' Day - Best Practises for S3 - BL
Builders' Day - Best Practises for S3 - BL
 

Recently uploaded

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Houston techfest spring 2018

  • 1. Let the right one in: Securing files on AWS S3 Sunil Kowlgi Houston Techfest 5/5/2018
  • 2. About me • Founder of Outclip, a startup focused on video sharing for remote teams: https://checkoutclip.com • 2+ years of experience with AWS S3 • Contact: sunil@checkoutclip.com
  • 3. Amazon S3 • Simple Storage Service (S3) • Among the top 3 most used AWS services • S3 is an object storage system, which is quite different than file system: • Flat vs. hierarchical address space: makes S3 highly scalable. E.g. ‘prefix/filename’ where prefix is not really a folder. • Customizable metadata vs. fixed metadata: can add custom attributes to each object • Pricing comparison: • Dropbox: 1TB for $9.99 a month, S3: 1TB for $23 at a minimum
  • 4. AWS S3 Shared Responsibility Security Model
  • 5. Demo: S3 Access Denied • https://houston-techfest-bucket.s3.amazonaws.com/Wildlife.mp4 • https://signing-demo-bucket.s3.amazonaws.com/Wildlife.mp4
  • 6. S3 Security Fiascos • “Respondent has engaged in a number of practices that, taken together, failed to provide reasonable security to prevent unauthorized access to Rider and Driver personal information stored in the Amazon S3 Datastore. Among other things, Respondent: • a. Until approximately September 2014, failed to implement reasonable access controls to safeguard data stored in the Amazon S3 Datastore. For example, Respondent: • i. failed to require programs and engineers that access the Amazon S3 Datastore to use distinct access keys, instead permitting all programs and engineers to use a single AWS access key that provided full administrative privileges over all data in the Amazon S3 Datastore; • ii. failed to restrict access to systems based on employees’ job functions; and • iii. failed to require multi-factor authentication for access to the Amazon S3 Datastore;”
  • 7. S3 Security Fiascos • In 2017, WWE’s misconfigured S3 exposed 3 million emails • Security researchers discovered two open Amazon S3 Buckets that contained a trove of private information collected for WWE marketing purposes. • An estimated 12 percent of all the information (several gigabytes) was set to “Public” access and available for anybody with internet connection to view and download.
  • 8. Software Security • While software engineering is about ensuring that certain things happen, security is about ensuring that they don’t. – Ross Anderson, Security Engineering • Many systems fail because designers protect the wrong things or protect the right things but the wrong way. • Robust security design requires that the protection goals are made explicit.
  • 9. Good Security Engineering Requires Four Things • Policy: what are the security goals? • Mechanism: how to implement the policy? • Assurance : how reliable are the mechanisms? • Incentive: understand motivation for people who both secure and try to attack your system
  • 10. S3 File Security Policy 1. Deny access to everyone except some users 2. Encrypt data at rest 3. Encrypt data before sending it to S3 4. Manage access through special URL 5. Manage access without special URL
  • 11. Using S3 • Object: the thing you store e.g. .mp4, .jpg, etc. • Bucket: where all your objects go • Bucket policy: controls access to the bucket • Possible operations: listObjects, getObject, putObject, etc. • IAM (Identity and Access Management): AWS’ system to set up and manage user access to all AWS services, not just S3 • Ways to access S3: • Command line interface (CLI) • Web console • API for programmatic access
  • 12. Demo: S3 console and CLI
  • 13. S3 File Security Policy 1. Deny access to everyone except some users 2. Encrypt data at rest 3. Encrypt data before sending it to S3 4. Manage access through special URL 5. Manage access without special URL
  • 14. Managing Access to S3 • Ways to manage access to buckets: • Bucket Policy • IAM Policy a.k.a User Policy • ACLs • “When Amazon S3 receives a request—for example, a bucket or an object operation—it first verifies that the requester has the necessary permissions. Amazon S3 evaluates all the relevant access policies, user policies, and resource-based policies (bucket policy, bucket ACL, object ACL) in deciding whether to authorize the request.”
  • 15. Bucket Policy vs IAM policy Sample Bucket Policy Sample IAM Policy
  • 16. ACL – Access Control List • ACLs are a legacy access control mechanism • AWS recommends bucket policy over ACL • Use ACL when you want to manage permissions on individual objects Sample ACL
  • 17. Bucket Policy vs. IAM Policy vs ACL: who wins? • Access is based on “least-privilege union of all the permissions”
  • 19. How to Write a Good Bucket Policy • Explicitly deny everyone except a few users • Explicitly allow a few users to perform specific operations: • E.g. Deny everyone but allow Alice to execute S3GetObject on the bucket
  • 20. Demo: Bucket Policy Best Practice
  • 21. S3 File Security Policy 1. Deny access to everyone except some users 2. Encrypt data at rest 3. Encrypt data before sending it to S3 4. Manage access through special URL 5. Manage access without special URL
  • 22. Encrypting data • Server-side encryption • Amazon S3 encrypts each object at rest with a unique key • Client-side encryption • Object is encrypted by client before it’s sent to S3 • Key management is hard, but AWS Key Management Service (KMS) comes to the rescue
  • 26. S3 File Security Policy 1. Deny access to everyone except some users 2. Encrypt data at rest 3. Encrypt data before sending it to S3 4. Manage access through special URL 5. Manage access without special URL
  • 27. Manage Access Through Special URL • Every object has a unique URL (let’s call it a normal URL): • E.g. https://myBucket.s3.amazonaws.com/vacation.mp4 • There are cases where you want to deny access to the object’s normal URL but allow access to the object through a special URL. • A special URL is advantageous because it can: • Allow access to specific object without having to relax bucket policy • Have a start date and expiry date • Condition based access: e.g. access based on IP address
  • 28. Manage access through special URL • Two ways to get a special URL for an object • S3 Pre-signed URL • Cloudfront signed URL • S3 Presigned URLs can be used to both get and put objects • Can only specify expiration date • Cloudfront Signed URLs are used only to get objects • Can specify start and expiration date • Can restrict to IP address or range of IP addresses
  • 29. What is Cloudfront? • AWS Cloudfront is a content delivery network (CDN) • Its primary advantage is faster access for users by caching objects • Another advantage: Cloudfront provides an extra layer of security policy over S3: • Signed URLs • Signed cookies
  • 33. S3 File Security Policy 1. Deny access to everyone except some users 2. Encrypt data at rest 3. Encrypt data before sending it to S3 4. Manage access through special URL 5. Manage access without special URL
  • 34. Manage access without special URL • There are cases when you want to give users access to multiple objects • For each user if you’re signing URLs for multiple objects, that’s not scalable. To scale you’ll need to use signed cookies.
  • 35. Cloudfront Signed Cookies • For signed cookies you’ll need Cloudfront. Signed cookies allow similar policies as signed URLs: • Can specify start and expiration date • Can restrict to IP address or range of IP addresses • With one important addition: you can use a wildcard character (‘*’) in the resource name in the policy statement to give access to multiple objects • Example policy: { Statement : [ { Resource : "https://example.com/privatecontent/*", Condition: { DateLessThan: { 'AWS:EpochTime’: link_expiration_timestamp } } } ] }
  • 36. Summary • AWS Shared Responsibility security model implies you’re responsible for configuring S3 correctly. S3 misconfigurations can lead to compromised data security. • There are several mechanisms to protect data in S3 that enable a range of policy options; 1. Deny access to everyone except some users 2. Encrypt data at rest 3. Encrypt data before sending it to S3 4. Manage access through special URL 5. Manage access without special URL • Knowledge of these mechanisms along with a restrictive security policy approach can improve the security of your data in S3
  • 39. References • https://d1.awsstatic.com/whitepapers/Security/AWS_Security_Best_Practices.pdf • https://www.ftc.gov/enforcement/cases-proceedings/152-3054/uber-technologies-inc • https://mackeepersecurity.com/post/world-wrestling-entertainment-leaks-3-million- emails • http://www.cl.cam.ac.uk/~rja14/book.html • https://docs.aws.amazon.com/AmazonS3/latest/dev/how-s3-evaluates-access- control.html • https://aws.amazon.com/blogs/security/iam-policies-and-bucket-policies-and-acls-oh- my-controlling-access-to-s3-resources/ • https://aws.amazon.com/about-aws/whats-new/2011/10/04/amazon-s3-announces- server-side-encryption-support/ • https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateConten t.html

Editor's Notes

  1. Flat address space: prefix/filename where prefix is not a folder Because S3 is the public cloud, data you store on S3 has to be carefully secured. https://aws.amazon.com/s3/
  2. “You are responsible for managing your data (including classifying your assets), and for using IAM tools to apply ACL-type permissions to individual resources at the platform level, or permissions based on user identity or user responsibility at the IAM user/group level. For some services, such as Amazon S3, you can also use platform-provided encryption of data at rest, or platform-provided HTTPS encapsulation for your payloads for protecting your data in transit to and from the service.” https://d1.awsstatic.com/whitepapers/Security/AWS_Security_Best_Practices.pdf Amazon’s mantra is “with great power comes shared responsibility” When you buy a door from Home depot, you install the locks.
  3. Ideally, if you set up s3 correctly, if someone gets hold of an S3 file URL they should see an access denied Open browser and open s3 file links
  4. https://www.ftc.gov/enforcement/cases-proceedings/152-3054/uber-technologies-inc an intruder was able to access consumers’ personal information in plain text in Respondent’s Amazon S3 Datastore using an access key that one of Respondent’s engineers had publicly posted to GitHub, a code-sharing website used by software developers. The publicly posted key granted full administrative privileges to all data and documents stored within Respondent’s Amazon S3 Datastore. The intruder accessed one file that contained sensitive personal information belonging to Uber Drivers, including over 100,000 unencrypted names and driver’s license numbers, 215 unencrypted names and bank account and domestic routing numbers, and 84 unencrypted names and Social Security numbers. The file also contained other Uber Driver information, including physical addresses, email addresses, mobile device phone numbers, device IDs, and location information from trips the Uber Drivers provided.
  5. https://mackeepersecurity.com/post/world-wrestling-entertainment-leaks-3-million-emails
  6. http://www.cl.cam.ac.uk/~rja14/book.html
  7. http://www.cl.cam.ac.uk/~rja14/book.html
  8. I interchangeably use the term file for object.
  9. Office building security S3 encrypts it when it stores it Envelope sent through USPS Boarding pass Costco membership Airbnb stay
  10. https://docs.aws.amazon.com/AmazonS3/latest/dev/how-s3-evaluates-access-control.html https://aws.amazon.com/blogs/security/iam-policies-and-bucket-policies-and-acls-oh-my-controlling-access-to-s3-resources/ ACLs – read, write, full control. Only used to grant permissions. Bucket Policy – what actions are allowed or denied and for whom IAM Policy a.k.a User Policy - what actions are allowed/denied on what resources
  11. AWS console
  12. https://aws.amazon.com/blogs/security/how-to-restrict-amazon-s3-bucket-access-to-a-specific-iam-role/
  13. AWS console
  14. Office building security S3 encrypts it when it stores it Envelope sent through USPS Boarding pass Costco membership Airbnb stay
  15. https://aws.amazon.com/about-aws/whats-new/2011/10/04/amazon-s3-announces-server-side-encryption-support/
  16. AWS console
  17. techfestdemo.online
  18. Office building security S3 encrypts it when it stores it Envelope sent through USPS Boarding pass Costco membership Airbnb stay
  19. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html
  20. Techfestdemo.online
  21. Techfestdemo.online