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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
takipone
January 27, 2016
Technology
1.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
Transcript
15 slides
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
More Decks by takipone
See All by takipone
OJTに夢を見すぎていませんか? ロールプレイ研修の試行錯誤/tryanderror-in-roleplaying-training
takipone
1
450
ロールプレイトレーニングでクラウドエンジニアを短期育成した知見を一挙公開 / roll playing training benefits and cases
takipone
0
960
スキル育成に生かすLlamaIndexの活用 /using-llamaIndex-to-enhance-ones-skills
takipone
1
4k
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
870
ネットワークがクラウドに載って変わることと変わらないこと /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
gradle-best-practices 使ってみた
mikanichinose
0
160
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
170
パスワードのない鍵で、 データを手元に置く
ginjihayashi
0
350
IoTのデータ保存をSREの観点で考える
grimoh
1
110
Claude Codeで新規事業を伸ばせるか? Zennの試行錯誤の記録
wadayusuke
2
240
思考過程から秘密が漏れる:Amazon Bedrock上のKimi K3を5つの方法で攻めたら、25回中22回漏洩した話
yama3133
1
170
契約書SaaSにAIエージェントを組み込む
sansantech
PRO
0
190
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
3
250
攻撃と守りは何が変わり、何が変わらないのか~最近の不正アクセスから考える、リスク評価と標準の使いどころ
oidfj
2
110
Claude Securityを使ってみた / claude-security-claude-code-meetup-nagoya
tnir
0
140
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
14
7.1k
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
210
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
480
Why Our Code Smells
bkeepers
PRO
340
58k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
2k
How STYLIGHT went responsive
nonsquared
100
6.4k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Side Projects
sachag
456
43k
Accessibility Awareness
sabderemane
1
300
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Cost Of JavaScript in 2023
addyosmani
56
10k