SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
Web security at Meteor
Emily Stark, core developer

Wednesday, October 23, 13
Meteor is a full-stack
Javascript framework
for quickly building
quality web apps.
Wednesday, October 23, 13
Demo

Wednesday, October 23, 13
Outline
• Security in modern Javascript apps
• Security tools in Meteor
• allow/deny rules and methods
• MongoDB injections and check
• browser-policy
Wednesday, October 23, 13
Security in modern
Javascript apps

Wednesday, October 23, 13
Auth in modern
Javascript apps
Client-side rendering and long-lived
connections
Are cookies the best choice?

Wednesday, October 23, 13
Client code in modern
Javascript apps
Shared code on client and server
But client code isn’t trusted

Wednesday, October 23, 13
Databases in modern
Javascript apps
Document-oriented database (e.g.
MongoDB)
Not as battle-hardened as more established
SQL databases

Wednesday, October 23, 13
Security tools in
Meteor

Wednesday, October 23, 13
Locking down client
code
Tool #1: Not all code has to run in all
places.

Wednesday, October 23, 13
Locking down client
code
Tool #1: Not all code has to run in all
places.
Meteor.isServer / Meteor.isClient
server/ directory

Wednesday, October 23, 13
Locking down client
code
Tool #2: Client can use database API
freely by default, but it can be locked
down after prototyping.

Wednesday, October 23, 13
Locking down client
code
Tool #2: Client can use database API
freely by default, but it can be locked
down after prototyping.
(demo)

Wednesday, October 23, 13
Locking down client
code
Tool #3: RPCs

Wednesday, October 23, 13
Locking down client
code
Tool #3: RPCs

(demo)

Wednesday, October 23, 13
Mongo injections and
prevention
(demo)

Wednesday, October 23, 13
Mongo injections and
prevention
check(usernames, [String]);
check(age, Match.OneOf(String, Number));
check(profile, {
admin: Boolean,
location: Match.Optional(String)
});

Wednesday, October 23, 13
Mongo injections and
prevention
meteor add audit-argument-checks

Wednesday, October 23, 13
Browser policy
meteor add browser-policy
Configure X-Frame-Options and
Content-Security-Policy HTTP headers.

Wednesday, October 23, 13
Browser policy
X-Frame-Options: SAMEORIGIN
“Browser, only let my site be framed by web pages
on the same origin as my site.”
Prevents clickjacking attacks.

Wednesday, October 23, 13
Browser policy
Content-Security-Policy: defaultsrc ‘none’; script-src ‘self’
https://mycdn.com ‘unsafe-inline’;
img-src ‘self’ https://mycdn.com;
“Browser, only let my site run code and load images
from my server and mycdn.com, and also allow inline
scripts on my site.”

Wednesday, October 23, 13
Browser policy
Because headers are a pain to configure by
hand:
BrowserPolicy.content.disallowInlineScripts();
BrowserPolicy.content.allowEval();
BrowserPolicy.content.disallowObject();
BrowserPolicy.framing.disallow();

Wednesday, October 23, 13
Browser policy
More to come in browser-policy:

•
•
•

CSP reporting?
Framebusting code?
Use Meteor templating system to enforce
policies that CSP does not?

Wednesday, October 23, 13
Conclusion
•

Modern Javascript apps are new web security
territory.

•

Tools in Meteor for locking down client
code, preventing database attacks, configuring
new browser security features.

Wednesday, October 23, 13
Questions?

emily@meteor.com
@estark37

Wednesday, October 23, 13

Contenu connexe

Tendances

Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
David Timothy Strauss
 
Network Security and Cryptography.pdf
Network Security and Cryptography.pdfNetwork Security and Cryptography.pdf
Network Security and Cryptography.pdf
AdityaKumar1548
 

Tendances (20)

Mule security pgp with Example
Mule security pgp with ExampleMule security pgp with Example
Mule security pgp with Example
 
Tsc summit #2 - HTTP Header Security
Tsc summit #2  - HTTP Header SecurityTsc summit #2  - HTTP Header Security
Tsc summit #2 - HTTP Header Security
 
Preventing XSS with Content Security Policy
Preventing XSS with Content Security PolicyPreventing XSS with Content Security Policy
Preventing XSS with Content Security Policy
 
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
 
Integrity protection for third-party JavaScript
Integrity protection for third-party JavaScriptIntegrity protection for third-party JavaScript
Integrity protection for third-party JavaScript
 
Network Security and Cryptography.pdf
Network Security and Cryptography.pdfNetwork Security and Cryptography.pdf
Network Security and Cryptography.pdf
 
Black magic of web attacks Detection and Prevention
Black magic of web attacks Detection and PreventionBlack magic of web attacks Detection and Prevention
Black magic of web attacks Detection and Prevention
 
Mule security - pgp
Mule  security - pgpMule  security - pgp
Mule security - pgp
 
6 ways to hack your JavaScript application by Viktor Turskyi
6 ways to hack your JavaScript application by Viktor Turskyi   6 ways to hack your JavaScript application by Viktor Turskyi
6 ways to hack your JavaScript application by Viktor Turskyi
 
Content Security Policy - The application security Swiss Army Knife
Content Security Policy - The application security Swiss Army KnifeContent Security Policy - The application security Swiss Army Knife
Content Security Policy - The application security Swiss Army Knife
 
SMIMP Lightning Talk - DEFCON CryptoVillage
SMIMP Lightning Talk - DEFCON CryptoVillageSMIMP Lightning Talk - DEFCON CryptoVillage
SMIMP Lightning Talk - DEFCON CryptoVillage
 
Mule security - pgp
Mule  security - pgpMule  security - pgp
Mule security - pgp
 
Securing the Web @DevDay Da Nang 2018
Securing the Web @DevDay Da Nang 2018Securing the Web @DevDay Da Nang 2018
Securing the Web @DevDay Da Nang 2018
 
[DevDay2018] Hacking for fun and profit - By: Dennis Stötzel, Head of Securit...
[DevDay2018] Hacking for fun and profit - By: Dennis Stötzel, Head of Securit...[DevDay2018] Hacking for fun and profit - By: Dennis Stötzel, Head of Securit...
[DevDay2018] Hacking for fun and profit - By: Dennis Stötzel, Head of Securit...
 
How to avoid connection pool deadlock
How to avoid connection pool deadlockHow to avoid connection pool deadlock
How to avoid connection pool deadlock
 
Pgp security mule
Pgp security   mulePgp security   mule
Pgp security mule
 
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложениеJS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
 
Out-of-band SQL Injection Attacks (#cypsec'17)
Out-of-band SQL Injection Attacks (#cypsec'17)Out-of-band SQL Injection Attacks (#cypsec'17)
Out-of-band SQL Injection Attacks (#cypsec'17)
 
ASP.NET View State - Security Issues
ASP.NET View State - Security IssuesASP.NET View State - Security Issues
ASP.NET View State - Security Issues
 
W3C Content Security Policy
W3C Content Security PolicyW3C Content Security Policy
W3C Content Security Policy
 

Similaire à Web security at Meteor (Pivotal Labs)

Simplified Security Code Review Process
Simplified Security Code Review ProcessSimplified Security Code Review Process
Simplified Security Code Review Process
Sherif Koussa
 

Similaire à Web security at Meteor (Pivotal Labs) (20)

Exploring the Possibilities of Sencha and WebRTC
Exploring the Possibilities of Sencha and WebRTCExploring the Possibilities of Sencha and WebRTC
Exploring the Possibilities of Sencha and WebRTC
 
OSMC 2013 | Flapjack - monitoring notification system by Birger Schmidt
OSMC 2013 | Flapjack - monitoring notification system by Birger SchmidtOSMC 2013 | Flapjack - monitoring notification system by Birger Schmidt
OSMC 2013 | Flapjack - monitoring notification system by Birger Schmidt
 
Introduction to Cloud Computing
Introduction to Cloud Computing  Introduction to Cloud Computing
Introduction to Cloud Computing
 
CIW Lab with CoheisveFT: Get started in public cloud - Part 2 Hands On
CIW Lab with CoheisveFT: Get started in public cloud - Part 2 Hands OnCIW Lab with CoheisveFT: Get started in public cloud - Part 2 Hands On
CIW Lab with CoheisveFT: Get started in public cloud - Part 2 Hands On
 
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...
CIW Lab with CoheisveFT: Get started in public cloud - Part 1 Cloud & Virtual...
 
Building Complete Private Clouds with Apache CloudStack and Riak CS
Building Complete Private Clouds with Apache CloudStack and Riak CSBuilding Complete Private Clouds with Apache CloudStack and Riak CS
Building Complete Private Clouds with Apache CloudStack and Riak CS
 
منصة شليلة
منصة شليلةمنصة شليلة
منصة شليلة
 
Android Security & Penetration Testing
Android Security & Penetration TestingAndroid Security & Penetration Testing
Android Security & Penetration Testing
 
Using Proxies To Secure Applications And More
Using Proxies To Secure Applications And MoreUsing Proxies To Secure Applications And More
Using Proxies To Secure Applications And More
 
Mojo+presentation+1
Mojo+presentation+1Mojo+presentation+1
Mojo+presentation+1
 
Become a Frontend Developer Ninja using HTML5, JavaScript and CSS3 - Marco Ca...
Become a Frontend Developer Ninja using HTML5, JavaScript and CSS3 - Marco Ca...Become a Frontend Developer Ninja using HTML5, JavaScript and CSS3 - Marco Ca...
Become a Frontend Developer Ninja using HTML5, JavaScript and CSS3 - Marco Ca...
 
Trust in Every Byte - Securing Edge Workflows with Fastly Compute [Cloud Nati...
Trust in Every Byte - Securing Edge Workflows with Fastly Compute [Cloud Nati...Trust in Every Byte - Securing Edge Workflows with Fastly Compute [Cloud Nati...
Trust in Every Byte - Securing Edge Workflows with Fastly Compute [Cloud Nati...
 
Continuous Delivery for the Web Platform
Continuous Delivery for the Web PlatformContinuous Delivery for the Web Platform
Continuous Delivery for the Web Platform
 
CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa)
CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa)CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa)
CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa)
 
Java scriptarchitektur
Java scriptarchitekturJava scriptarchitektur
Java scriptarchitektur
 
JavaScript Architektur
JavaScript ArchitekturJavaScript Architektur
JavaScript Architektur
 
Web Performance Optimization @Develer
Web Performance Optimization @DevelerWeb Performance Optimization @Develer
Web Performance Optimization @Develer
 
Simplified Security Code Review Process
Simplified Security Code Review ProcessSimplified Security Code Review Process
Simplified Security Code Review Process
 
SQL Injection and Clickjacking Attack in Web security
SQL Injection and Clickjacking Attack in Web securitySQL Injection and Clickjacking Attack in Web security
SQL Injection and Clickjacking Attack in Web security
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008
 

Dernier

Dernier (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Web security at Meteor (Pivotal Labs)