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
一時URLとKVS #TechLunch
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Livesense Inc.
PRO
April 21, 2014
Technology
96
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
一時URLとKVS #TechLunch
一時URLとKVS
2012/08/01 (水) @ Livesense TechLunch
発表者:福田 慎太郎
Livesense Inc.
PRO
April 21, 2014
More Decks by Livesense Inc.
See All by Livesense Inc.
味覇で作るパスタが美味い - 20261001_yabaubuki.dev
livesense
PRO
0
140
Rubyはただの⾔語に⾮ず
livesense
PRO
0
580
28新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
130
27新卒_総合職採用_会社説明資料
livesense
PRO
0
7.5k
27新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
13k
株式会社リブセンス・転職会議 採用候補者様向け資料
livesense
PRO
0
600
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
1
1.8k
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
730
26新卒_総合職採用_会社説明資料
livesense
PRO
0
13k
Other Decks in Technology
See All in Technology
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
300
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
140
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1.2k
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
120
Kiro Crewをはじめよう
kizawa2020
1
160
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
300
専門領域のAIをどう評価するか
bengo4com
2
260
S3 Filesで挑む! 八戸せんべい汁の食べ頃問題
usanchuu
0
100
Refining Active Record
shugo
0
160
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
160
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Typedesign – Prime Four
hannesfritz
42
3.2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Skip the Path - Find Your Career Trail
mkilby
1
260
Transcript
一時URLとKVSのお話
2 Copyright © Livesense Inc. All rights reserved. はじまり •
ジョブセンス派遣において、セキュリティガイドラインのうち、パ スワード保存とアカウント管理の一部を適用開始
3 Copyright © Livesense Inc. All rights reserved. はじまり •
そのうち、パスワード再設定機能については、下のようにルー ルが記述されています • 以下のようなトークンを使用する手順でパスワード再設定機能を 用意すること – パスワードを忘れたユーザーにメールアドレスを入力してもらう – トークンを生成し、トークン付きのパスワード再設定画面へのURLをユー ザーの登録メールアドレスに送付する – ユーザーが指定されたURLへ遷移し、パスワードの再設定を行う – パスワード再設定が行われたトークンは破棄する – パスワード再設定が行われた旨をユーザーの登録メールアドレス宛に通 知する – パスワード再設定が1日経過しても行われなかった場合は、そのトークン も破棄する
4 Copyright © Livesense Inc. All rights reserved. はじまり •
「トークン付きのパスワード再設定画面」ってさらっと書いてあ るけども・・・ • トークンの生成方法 • トークンの保持方法 • URLの形式 • 等が書かれていません
5 Copyright © Livesense Inc. All rights reserved. トークンの生成 •
そこで、まずどうすれば良いトークンが作れるかを考えました • トークンに求められるのは • 安全な乱数 • 十分な長さ • 安全な乱数を作るために使ったのは • https://github.com/ircmaxell/PHP-PasswordLib • このおじさんが作ってくれたみたいです • https://github.com/ircmaxell • 十分な長さは • とりあえず40に – 参考:googleは247、amazonは162.固定長かは未調査 – 本当に40でいいか心配になってきた
6 Copyright © Livesense Inc. All rights reserved. トークンの保持方式 •
memcacheに保存。 • しようと思ったら、うちのサーバー構成↓みたいなので • アクセスするたびに読み込むmemcacheサービスが変わる可 能性がある Web Server memcache apache Web Server memcache apache ロードバランサ
7 Copyright © Livesense Inc. All rights reserved. トークンの保持方式 •
しょうがないので、DBにKVS型のテーブル作成して、そこに保 存する key value expired_at
8 Copyright © Livesense Inc. All rights reserved. URLの形式 •
http://haken.j-sen.jp/password/reset_{企業ID}_{token}.htm にしました • トークンだけにしなかった理由 – URLを再発行するたびに、以前発行した生きている再設定URLを破棄し たいという要件を満たしたかったため – つまり、KVSに保存する方法が – の形式だと、URLはトークンだけをパラメータで渡せば済むが、古い再設 定URLを削除するには、全表走査して同一企業IDを探す必要が出てきて しまう – ので、keyに企業ID、valueにトークンを格納することにし、新たに再設定 URLが発行されたら、トークンと有効期限を上書きすることにしました key value expired_at トークン 企業ID 日時 key value expired_at 企業ID トークン 日時
9 Copyright © Livesense Inc. All rights reserved. 今日の結論 •
canpassとかでredisを入れるという噂を聞いたので、導入事例 をさくっと作って、memcacheに代わるインメモリなKVSが欲し いな
10 Copyright © Livesense Inc. All rights reserved. 今日の疑問 •
インメモリKVSっていっぱいあるけど、それぞれ何が違うのか よくわからない • Redis • Oracle Coherence • EADs • Red Hat JBoss Data Grid 6 • VMware vFabric GemFire
11 Copyright © Livesense Inc. All rights reserved. 質問タイム
12 Copyright © Livesense Inc. All rights reserved. い ち
ろ ー い ち ろ ー 内質 容問 をで 膨発 ら表 ま