Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
HTTP Security
Search
RJ Zaworski
September 05, 2014
Technology
200
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HTTP Security
RJ Zaworski
September 05, 2014
More Decks by RJ Zaworski
See All by RJ Zaworski
Computing Lessons from the Atomic Age: Complexity, Safety, and Ethics
rjz
0
120
Beyond the Single-Page App: React and the Servers that Serve it
rjz
0
100
Typesafe(ish) React
rjz
1
700
Front-end optimization
rjz
1
480
Technical Interviewing
rjz
0
270
Interop! Building a better Backbone.View
rjz
0
110
Front-end optimization
rjz
4
290
Other Decks in Technology
See All in Technology
書籍セキュアAPIについて
riiimparm
0
240
大量データに対しても、生成AIを用いてリーズナブルにデータ加工をしたい!Databricksのai_queryについて調べてみた
kamoshika
1
280
Webアプリ認証の全体像 / The Big Picture of Web App Authentication
kitano_yuichi
1
420
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
2
610
複数プロダクトで進めるAI機能実装 ── 実践から得たリアルな学びとロードマップ実現への挑戦 / AICon2026_yanari
rakus_dev
1
270
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
プロダクト開発組織の現在地(Ver.2026/07) / product-organization
kaonavi
0
400
AI時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
4
2.5k
Multicaで30個のミニプロジェクトをAIエージェント運用して見えてきたこと
eiei114
1
630
複数プロダクト組織のAIネイティブ化における戦略 / AICon2026_kude
rakus_dev
0
300
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.5k
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
300
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.1k
Utilizing Notion as your number one productivity tool
mfonobong
4
450
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
360
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Agile that works and the tools we love
rasmusluckow
331
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
Evolving SEO for Evolving Search Engines
ryanjones
0
240
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
370
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
HTTP Security A matter of trust rj zaworski, versal inc.
· @rjzaworski · github.com/rjz
Browsers ★ Do what servers tell them to ★ Respect
standards (mostly) ★ Render as much of the server response as they can
Trust is a Big Deal ★ Servers can be compromised,
impersonated, or simply misconfigured ★ How can we tell if content is trustworthy? The short answer is, “we can’t”.
HTTP can help $ curl https://twitter.com -I status: 200 OK
# ... strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block
Transport Security $ curl https://twitter.com -I status: 200 OK #
... strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (https://tools.ietf.org/html/rfc6797)
Transport Security ★ Ensure the browser never visits the http
version of a website ★ Force transport-layer security (TLS)
Transport Security Why bother? ★ eavesdropping ★ man in the
middle (data tampering, host spoofing, etc)
Transport Security ★ Protects from common wireless attacks (spoofing, sniffing,
e.g. SSLStrip + Firesheep) ★ Protects from mixed-content errors (CSS, SWF)
Content Security Policies $ curl https://twitter.com -I status: 200 OK
# ... strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (https://w3c.github.io/webappsec/specs/content-security-policy/)
Content Security Policies ★ Helps detect/prevent XSS, mixed-content, and other
classes of attack ★ Whitelist what is or isn't allowed on a page ★ Describe access to specific types of content in terms of directives
Content Security Policies ★ Implemented via HTTP header ★ or
a <META> tag <meta http-equiv="Content-Security-Policy" content="script-src 'self'">
Content Security Policies Some directives: ★ default-src - define base
policy ★ script-src - define valid origins for <script> tags ★ connect-src - XHRs, WebSocket and EventSource ★ form-action - form actions
Content Security Policies ★ Policies may be layered ★ Policies
are restrictive A request must pass all announced policies to be served!
Content Security Policies Report-Only: log without enforcing Content-Security-Policy-Report-Only: \ default-src
'self'; \ report-uri https://test.versal.com/csp-reports Looks familiar...
Content Security Policies Risks: ★ CSS Parsing is still vulnerable
★ Browser support is incomplete
X-Content-Type-Options $ curl https://twitter.com -I status: 200 OK # ...
strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (http://msdn.microsoft.com/en-us/library/ie/gg622941(v=vs.85).aspx)
X-Content-Type-Options ★ <SCRIPT> and <STYLE> reject responses with incorrect content-types
★ Prevent MIME confusion ★ Implemented in Chrome, IE
X-Frame-Options $ curl https://twitter.com -I status: 200 OK # ...
strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (http://msdn.microsoft.com/en-us/library/ie/gg622941(v=vs.85).aspx)
X-Frame-Options ★ Prevents content from being framed ★ Protects from
external clickjacking ★ Three choices: DENY , SAMEORIGIN , or ALLOW-FROM
X-XSS-Protection $ curl https://twitter.com -I status: 200 OK # ...
strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (http://msdn.microsoft.com/en-us/library/dd565647(v=vs.85).aspx)
X-XSS-Protection ★ Browser’s best guess about blocking XSS attempts ★
On by default in Chrome, IE
Further Reading On OWASP: ★ List of Useful Headers ★
HTTP Strict Transport Security ★ Content Security Policy
Thank you! rj zaworski · @rjzaworski · github.com/rjz