Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SORACOMのスイッチユーザー機能を使ってみよう
Search
Ken'ichirou Kimura
August 23, 2023
Technology
0
210
SORACOMのスイッチユーザー機能を使ってみよう
2023/08/23に開催されたSORACOM UG Tokyo#16でのLT資料です
Ken'ichirou Kimura
August 23, 2023
Tweet
Share
More Decks by Ken'ichirou Kimura
See All by Ken'ichirou Kimura
AWSで動くプログラムをC#で書こう ~主にLambdaのお話~
kenichirokimura
1
41
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
220
Alternative GitHub Secret Manager
kenichirokimura
0
76
SORACOMで実現するIoTのマルチクラウド対応 - IoTでのクリーンアーキテクチャの実現 -
kenichirokimura
0
540
How to use Amazon Cognito user pools with custom UI and also OIDC
kenichirokimura
0
300
あなたも今日からIoTと握手! SORACOM/SORACOM UGの紹介
kenichirokimura
1
120
推し活の1つとしての株購入~みんなでソラコムの株主になろう~
kenichirokimura
0
230
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
1.3k
SORACOM UGとは? - 2023/11/04 JAWS-UG 佐賀 x SORACOM UG 九州 バルーンフェスタSP版
kenichirokimura
0
160
Other Decks in Technology
See All in Technology
Power BI は、レポート テーマにこだわろう!テーマのティア表付き
ohata_ds
0
120
Redmineの意外と知らない便利機能 (Redmine 6.0対応版)
vividtone
0
190
Windows Server 2025 へのアップグレードではまった話
tamaiyutaro
2
260
20250129 Findy_テスト高活用化
dshirae
0
220
SIEMによるセキュリティログの可視化と分析を通じた信頼性向上プロセスと実践
coconala_engineer
1
2.9k
[TechNight #86] Oracle GoldenGate - 23ai 最新情報&プロジェクトからの学び
oracle4engineer
PRO
1
170
CNAPPから考えるAWSガバナンスの実践と最適化
nrinetcom
PRO
1
330
カスタムインストラクションでGitHub Copilotをカスタマイズ!
07jp27
4
260
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
18k
Enhancing SRE Using AI
yoshiiryo1
1
260
Redshiftを中心としたAWSでのデータ基盤
mashiike
0
100
トレードオフスライダーにおける品質について考えてみた
suzuki_tada
3
180
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.6k
Visualization
eitanlees
146
15k
Writing Fast Ruby
sferik
628
61k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Invisible Side of Design
smashingmag
299
50k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Typedesign – Prime Four
hannesfritz
40
2.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Designing Experiences People Love
moore
139
23k
Transcript
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. SORACOMのスイッチユーザー機能を 使ってみよう
木村健一郎 2023年8月22日 SORACOM UG Tokyo #16
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. 名前:木村健一郎 所属:株式会社オルターブース
SORACOM UG九州 JAWS-UG福岡 娘ちゃんのパパ(6歳1ヶ月) お仕事:IoT番⾧ 受賞歴:AWS Samurai 2019 SORACOM MVC 2021 好きなSORACOMサービス :Arc、Beam、Funk、あのボタン
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. スイッチユーザーって知ってますか?
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. スイッチユーザー機能とは •
2023年7月6日、SORACOM Discovery2023で発表された新機 能 • ログインし直すことなく、別のSAMユーザーの権限で操作がで きる • 例:普段は読み込み権限のみのSAMユーザーで作業しておき、必要な ときだけ書き込み権限を持ったSAMユーザーで作業したい • ルートユーザーにはスイッチできない • スイッチ元のユーザーはルートユーザーでもSAMユーザーでもOK
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved.
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. スイッチ先のユーザーのオペレーターIDとSAMユーザー名を登録する
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. スイッチしたSAMユーザーの権限でコンソールが操作できるようになる
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. スイッチできる条件は2つ スイッチ先のSAMユーザーの「信頼ポリシー」に、スイッチ元
のユーザーを追加する
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. スイッチ元のユーザーに“Auth:switchUser”と “Operator:generateAuthToken”の2つの権限を付与する
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. 何が嬉しいのか? •WEBコンソールでログインしなおさないで別の権限が扱える
•権限が強いユーザーと弱いユーザーの使い分けが容易にな る •スイッチ先のSAMユーザーの認証情報を共有しないでよい •引き継ぎや外部委託が容易
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. CLIでもやってみた
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. まずはauth/switch-userコマンドでやってみる $
soracom --profile switchb auth switch-user --operator-id OPxxxxxxxxxx --user-name switch-a { "apiKey": "api-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "operatorId": "OPxxxxxxxxxx", "token": "eyXXX...", "userName": "switch-a" }
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. 取得したAPIKEYとTOKENでコマンドを実行する $
soracom sims list --api-key "api-xxxxxxxx-xxxx-xxxx-xxxx- xxxxxxxxxxx" --api-token "eyXX...“ [ { "activeProfileId": "xxxxxxxxxxxxxxxxxx", "arcSessionStatus": { "arcAllowedIPs": [ ... ]
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. 番⾧~、いちいち⾧い TOKENコピペするの
めんどいよ~
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. プロファイルセットアップ~ (大山のぶ代)
$ soracom configure
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. Configureコマンドでスイッチユーザーのプロファイ ルを設定する
$ soracom --profile switch-a configure --- SORACOM CLI セットアップ --- /home/xxxxx/.soracom ディレクトリがなければ作成し、そこ にファイル 'switch-a.json' を作成します。 カバレッジタイプを選択してください。 1. Global 2. Japan
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. 認証方法を選択してください。 1.
AuthKeyId と AuthKey を入力する(推奨) 2. オペレーターのメールアドレスとパスワードを入力する 3. SAM ユーザーの認証情報を入力する(オペレーターID、 ユーザー名、パスワード) 4. スイッチユーザー 選択してください (1-4) > 4
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. Switch destination
operator ID (OP00...): OPxxxxxxxxxx Switch destination user name: switch-a Source profile (switch origin) 1: default 2: switch-b [1-2]: 2
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. 作成したプロファイルで動かしてみる $
soracom –profile switch-a sims list [ { "activeProfileId": "xxxxxxxxxxxxxxxxxx", "arcSessionStatus": { "arcAllowedIPs": [ ... ]
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. 作成したプロファイルの中身はこんな感じ $
cat ~/.soracom/switchb.json | jq { "sandbox":false, "coverageType":"jp", "username":"switch-a", "operatorId":"OPxxxxxxxxxx", "registerPaymentMethod":false, "sourceProfile":"switch-b“ }
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved. まとめ ・スイッチユーザー超便利です
・スイッチ先の認証情報を作る必要すら無いのでセキュリティを 向上させられます ・WEBコンソールでもCLIでも使えます ・CLIはv1.0.0移行で対応してます ・CLIではプロファイルに設定して使いましょう ・詳しくはブログに書いてますので参考にしてください https://zenn.dev/showm001/articles/2023-08-08-01
Copyright © 2015-2023 ALTERBOOTH inc. All Rights Reserved.