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
Keep Your API Secure
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Андрей Листочкин (Andrey Listochkin)
November 29, 2014
Programming
88
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Keep Your API Secure
Kiyv JS November 2014
Андрей Листочкин (Andrey Listochkin)
November 29, 2014
More Decks by Андрей Листочкин (Andrey Listochkin)
See All by Андрей Листочкин (Andrey Listochkin)
Everybody Stand Back! I Know Regular Expressions
listochkin
0
230
Command-line scripting with Rust. Wait, what?!
listochkin
0
420
Server Memory - BuildStuff Ukraine 2019
listochkin
0
71
Server Memory - Chernivtsi JS 2019
listochkin
1
170
10 Years Later
listochkin
0
400
Managing Managers - DevTalks iHUB
listochkin
0
86
Time, Numbers, Text
listochkin
1
670
Software Licensing: A Minefield Guide
listochkin
0
190
We Make Bots. For Real
listochkin
0
470
Other Decks in Programming
See All in Programming
自分的「カンファレンスの楽しみ方」
syumai
0
200
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
120
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
370
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
770
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
220
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
170
Foundry Localでエージェント開発
seosoft
0
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
320
iOSDC2026登壇資料.pdf
riofujimon
0
140
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
0
240
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
530
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
Building Applications with DynamoDB
mza
96
7.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
My Coaching Mixtape
mlcsv
0
310
Leo the Paperboy
mayatellez
9
2.3k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
460
Paper Plane
katiecoart
PRO
3
53k
エンジニアに許された特別な時間の終わり
watany
108
250k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
Keep Your API Secure
None
OSWAP
XSS
SQL Injection
Plugins
Today
Crossite
CSRF
HTTP
Cookies
Secure HttpOnly
Set-Cookie: name=value; domain=.whatever.com; path=/; expires=Tue, 28-Nov-2034 21: 05:44 GMT; secure;
HttpOnly
Cookie: name=value
sessionId=a4d543bc809
Session Management
In Memory
External
None
Client Based
WAT??? нужна картинка
Encrypt
salt
salt+encData
salt+encData
Sign
(salt+encData)+signature
(salt+encData+createdAt+lifetime Duration)+signature
2 keys: encryption key signing key
{user info} => encrypt => sign => cookie
cookie => check signature => decrypt => {User Info}
Too complicated?
But ready-made!
by Mozilla
mozilla/node-client-sessions
Browser sends cookies automatically
CSRF
Roll-your-own-Cookie
Client: custom header / payload Server: middleware
Tokens
JSON Web Token
{user data} => encrypt => sign => token => memory,
localStorage
jsonwebtoken express-jwt
Securing WebSockets
HTTP Upgrade Request 101
Only implicit Auth Cookie or Basic Auth
HTTP: get WS token WS: send token to validate user
Fin
Frontend UA
Frontend UA Angular UA Ember UA Node UA Mobile Frontend
...
None
Gitter
NodeSchool Node Forward Angular UI RobotsConf lxjs
dev-ua
None
https://tinyurl.com/welcome-to-dev-ua frontendua.im angular.im