Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Next.jsのセキュリティ設計とアーキテクチャ
Search
muratak
October 28, 2024
3.4k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Next.jsのセキュリティ設計とアーキテクチャ
muratak
October 28, 2024
More Decks by muratak
See All by muratak
Building large-scale batch of media with AWS
tresagua0123
0
54
DDoS対策 ~監視、分析、対策~
tresagua0123
3
140
Why Hono なぜHonoを使うべきなのか
tresagua0123
6
2.2k
大規模な美容メディアのフロントエンドを支えるサーバー技術
tresagua0123
0
53
バッチシステムのリプレース ~オンプレ/PHP->AWS/TypeScriptで実現する大規模バッチの新規設計、構築~
tresagua0123
0
54
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
320
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
560
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
250
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
440
Transcript
スポンサー LT: Next.jsのセキュリティ設計とアーキテクチャ 10/28 ROSCAFE TECH NIGHT#11 muratak@SWE
簡単な自己紹介 muratakについて ・Next.js, ServerSide TypeScript, AWS etc ・@cosmeエンジニア 主にNext.jsやHonoなど技術系発信 →
普段はこれらの活動をしている。
Next.jsのセキュリティ設計とアーキテクチャ 今日のテーマ ・Next.js開発でのセキュリティ設計上気をつける点を知り、 Web開発一般におけるセキュリティ設計においても気をつける点を振り返る 注意) 本スライドはエンジニアとして、 また、本イベント会場スポンサーとしての著者の個人見解であり、 発表者の所属会社の技術責任者及び代表として意見するものではありません。
What is Next.js? ~最も人気な Reactフレームワーク ~
How Next.js works? ~Nextってどうやって動くの? ~ ・Browser | Node.js, Bun, Deno
などブラウザとサーバ両面で動く ・Client Componentsはブラウザで実行され、 Server Componentsはサーバーで実行される Next.jsのセキュリティ設計を考える上での肝はそれらの 境界面にある 原則として、機密情報がブラウザー側に露出する設計はセキュリティ上ダメ
But in what cases? ~セキュリティ設計上、気をつける点って? ~ 今から一緒に具体例を通してみていきましょう! (一緒に設計するつもりで )
Bad Env ~環境変数をどこに置くか ~ ・NEXT_PUBLIC_XXXX で始まる環境変数はブラウザーからアクセスできるので機密情報を入れない。 → サーバー側の環境変数など、セキュアな場所に機密情報は保管せよ
Bad Props ~propsの渡し方~
Bad Props ~propsの渡し方~
Bad Props ~propsの渡し方~
Bad Props ~どうやって防ぐ? ~ ・そもそも機密情報を propsとして渡さない(それはそう)・DTOパターン(それはそう) ・Taint APIs (React19の新機能)を使って渡そうとすると強制エラーにする
Some ways to protect your apps ・next-auth ・session & pass
Some ways to protect your apps ・next-cors ・express-rate-limit ・express-slow-down ・helmet
… what else guys?
It is your turn! Next.jsのセキュリティについて学びを深め、 いつか一緒に働ける日を楽しみにしています!