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
SORACOM EndorseによるSIMカードとAWSの認証連携
Search
takipone
January 27, 2016
Technology
1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SORACOM Endorseによる SIMカードとAWSの認証連携
SORACOM Conference 2016 “Connected” T4セッション ゲストスピーカー
takipone
January 27, 2016
More Decks by takipone
See All by takipone
OJTに夢を見すぎていませんか? ロールプレイ研修の試行錯誤/tryanderror-in-roleplaying-training
takipone
1
410
ロールプレイトレーニングでクラウドエンジニアを短期育成した知見を一挙公開 / roll playing training benefits and cases
takipone
0
920
スキル育成に生かすLlamaIndexの活用 /using-llamaIndex-to-enhance-ones-skills
takipone
1
3.9k
DNSにちょっとだけ詳しくなりたい人に贈る少し突っ込んだDNSの話 / devioday1_dns
takipone
2
11k
Amazon VPC Latticeに期待する / look-for-vpc-lattice
takipone
0
1.2k
DevelopersIOのアウトプット文化をハックして人材育成に繋げる話 /deviosapporo2022fall_takipone
takipone
0
1.2k
AWSネットワークリソースをサービスでマルチテナントに 提供するときのスケーラビリティ / nwjaws202112-takipone
takipone
1
850
ネットワークがクラウドに載って変わることと変わらないこと /nwjaws201909-takipone
takipone
0
2.4k
AWSネイティブなEC/CRMシステム運用に欠かせないログ基盤構築 / cmdevio2018-aws-log-infra
takipone
7
3.4k
Other Decks in Technology
See All in Technology
AIで社員の自主発信に広報目線を組み込む
_mossann_t
0
140
AI Agent入門〜今更聞けないAgentの話〜
hiromimaganuma
0
110
EventBridge に「合流」はない ― サーバーレスのワークフローを育てるということ / No Join in EventBridge
yusukeshimizu
2
540
人にやさしく、AIにやさしく、書き手を選ばないIaCのガードレール再考 / Rethinking IaC Guardrails for Humans and AI Alike
kohbis
5
970
「今盗んで、後で解く」に備える ― AWSのポスト量子暗号入門
yama3133
2
230
PQC移行の今 -- IETF からみた現在地
satokan
3
200
C#未経験の僕がAIに読めるコードを書かせるまで
maguroalternative
0
280
エージェントはローカル、検証はMicroVM — Lambda MicroVMsでつくるServerless CI
fujioka6789
3
780
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
3k
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
150
C#コードの結合を可視化する Roslyn解析による設計改善と リファクタリング判断
dora56
0
610
Antigravity SDK for the Java Developer
glaforge
0
200
Featured
See All Featured
HDC tutorial
michielstock
2
910
Agile that works and the tools we love
rasmusluckow
331
22k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
390
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Faster Mobile Websites
deanohume
310
32k
Are puppies a ranking factor?
jonoalderson
2
3.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Test your architecture with Archunit
thirion
2
2.4k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
240
Transcript
SORACOM Endorseによる SIMカードとAWSの認証連携 SORACOM Conference 2016 “Connected” classmethod.jp 1 2016/1/27
⼤瀧隆太
About me • ⼤瀧隆太 Ryuta Otaki ID : @takipone •
おしごと プリセールス/エンジニア @クラスメソッド • 好きなSORACOMサービス SORACOM Beam classmethod.jp 2
About us • クラスメソッドは本⽇、SPSインテグレー ションパートナーに認定されました。 • 事業会社に向けてSORACOM&クラウドを 活⽤したITシステムの構築をご⽀援します。 • AWSを⽤いたデータ分析・可視化が得意です。
classmethod.jp 3 NEW!!
About us • クラスメソッドは技術ブログの会社です。 • Developers.IO http://dev.classmethod.jp/ • SORACOMネタで30本あります。 classmethod.jp
4
例えばこれ • JWTの解説記事、 あります。 • 「jwt 電⼦署名」 で検索 • これから紹介する
構成もブログで 公開済みです。 classmethod.jp 5
今回構築したところ SORACOMが提供 SIMカードとAWSの認証連携 classmethod.jp 6 Endorse 公開鍵 in S3 AWS
API Endorse SORACOM API Amazon API Gateway AWS Lambda AWS IAM SORACOM Air SIM トークンを リクエスト、取得 トークンを渡して AWS APIキーを取得 AWS APIキーで APIをコール 1 2 3
1. トークンの取得 classmethod.jp 7 OK
1. トークンの取得 classmethod.jp 8 Air SIM経由以外の経路、 Endorseが無効のAir SIMからの アクセスはエラーになる NG
今回構築したところ SORACOMが提供 2. トークン検証とAWS⼀時キー発⾏ classmethod.jp 9 Endorse 公開鍵 in S3
SORACOM API API Gateway (ディスパッチャ) AWS Lambda (ロジック) AWS IAM (APIキー発⾏者) リクエスト : JWT署名済トークン レスポンス : AWS APIキー Endorse a. JWT公開鍵を 取得して トークンを検証 b. トークンに 含まれるIMSI をリスト照会 c. APIキー発⾏
2. トークン検証とAWS⼀時キー発⾏ classmethod.jp 10 3: var jwt = require('jsonwebtoken'); :
17: // トークンをデコード 18: var decoded = jwt.decode(event.token, {complete: true}); 19: // デコードしたペイロードからIMSIを取得 20: var imsi = decoded.payload['soracom-endorse-claim'].imsi; 21: // デコードしたヘッダに含まれるキー名からキーストアのURLを⽣成し、取得 22: request(sora_keystore + decoded.header.kid, function (err, response, body){ 23: var pubkey = body; 24: try { 25: // トークンの検証が成功すればtryブロックを継続 26: jwt.verify(event.token, pubkey);
デモ1 classmethod.jp 11
ONE MORE!(デモ2) classmethod.jp 12
Endorseトークン取得をデバイスで • USBトークン/3Gモデム兼⽤のデバイスがあるといいなぁ • PCのネットワークは接続させずトークン取得専⽤にすれ ば、SORACOMの従量課⾦で維持費は少額で済む • SIMの有効/無効はリモートからAPIで操作できるので、デ バイスの有効/無効は思いのまま。 •
IMEI(デバイス固有ID)でSIM盗難対策もOK classmethod.jp 13 USBトークン 3Gモデム
作ってみました • USBのプログラミングを知らないのでBLE(Bluetooth Low Energy)で作ってみました。 classmethod.jp 14 SORACOM Endorse BLEペリフェラル
(OpenBlocks IoT BX1) BLEセントラル (Macbook) トークン 取得 ReadCharacteristic トークン⽂字列
• Enjoy happy Endorse life!! classmethod.jp 15