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
MFAの設定で色々失敗した話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuki_Kurono
March 10, 2022
Programming
960
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MFAの設定で色々失敗した話
Yuki_Kurono
March 10, 2022
More Decks by Yuki_Kurono
See All by Yuki_Kurono
Terraform(IaC)と実環境の乖離どうしていますか?
yuki_kurono
0
48
今年のre:inventから学ぶこと
yuki_kurono
0
110
re_invent 2023事前勉強会
yuki_kurono
0
100
CloudFormationの運用が 辛くならない方法を本気で考えてみた
yuki_kurono
0
350
CloudFormationで登場したForEachをちゃんと理解してみる
yuki_kurono
0
900
Turnstileのウィジェット モードとは何者か
yuki_kurono
0
720
CodeGuru Security ってなんだ?
yuki_kurono
0
1.2k
えるしってるか CloudFrontはWAFがあっても カスタムエラーレスポンスを返せる
yuki_kurono
0
450
Cloudflare初心者がIaCから基本構成を学んでみた
yuki_kurono
1
650
Other Decks in Programming
See All in Programming
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
130
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
120
iOSDC2026登壇資料.pdf
riofujimon
0
140
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
270
Jetpack Compose メカニズム
skydoves
0
340
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
120
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
700
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
150
スマート反転とウェブアクセシビリティ
camiha
0
200
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
140
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
460
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
510
Abbi's Birthday
coloredviolet
3
9.9k
Done Done
chrislema
186
16k
Google's AI Overviews - The New Search
badams
0
1.6k
The Invisible Side of Design
smashingmag
301
52k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
840
Amusing Abliteration
ianozsvald
1
300
What's in a price? How to price your products and services
michaelherold
247
13k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
430
Transcript
MFAの設定で色々失敗した話 アイレット株式会社 黒野雄稀 JAWS-UG CLI専門支部 #251R 2022/03/10
自己紹介 名前:黒野 雄稀 趣味:Cookie Clicker AWS歴:3年くらい 所属:アイレット株式会社
• 仮想 MFA デバイス • U2F セキュリティキー • ハードウェア MFA
デバイス • SMS テキストメッセージベース MFA https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/id_credentials_mfa.html 使用できる方法 AWS におけるMFA セキュリティを向上させるには、多要素認証(MFA)を 設定して AWS リソースを保護することを推奨します。 IAM ユーザーまたは AWS アカウント ルートユーザー に 対して MFA を有効にすることができます。 概要
今回お話しする前提 • 環境は稼働中のお客さんのAWS環境 • MFAを必須にするIAMポリシーをアタッチする必要があった • こちらが設計したIAMポリシーで、 お客さんにIAMユーザを作成してもらう状況
MFAを設定する
MFAの設定を中断する キャンセル!
設定中に中断すると… • 「エンティティは既に存在しています」とエラーが発生する • MFAデバイスはコンソールから確認すると「割り当てなし」と表示 される
AWSのドキュメント これは、誰かが以前に IAM コンソールでユーザーに仮想 MFA デバイ スの割り当てを開始し、プロセスをキャンセルした場合に発生する可 能性があります。これにより、IAM のユーザーの MFA
デバイスが作 成されますが、アクティブ化されることはありません。 新しいデバイスをユーザーに関連付ける前に、既存の MFA デバイス を削除する必要があります。 https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/troubleshoot_general.html #troubleshoot_general_access-denied-delete-mfa
MFAのリセット方法(CLI)
コマンド実行手順① 設定に失敗したMFAのSerialNumber確認 root@kurono:~# aws iam list-virtual-mfa-devices { "VirtualMFADevices": [ {
"SerialNumber": "arn:aws:iam::12345678910:mfa/kurono-test-mfa" }, { "SerialNumber": "arn:aws:iam::12345678910:mfa/root-account-mfa-device", "User": { "UserId": "12345678910", "Arn": "arn:aws:iam::12345678910:root", "CreateDate": "2017-07-27T06:47:31+00:00", "PasswordLastUsed": "2017-07-27T06:47:59+00:00" }, "EnableDate": "2017-07-27T07:03:10+00:00" }, ] }
コマンド実行手順② 設定に失敗したMFAの設定削除 root@kurono:~# aws iam delete-virtual-mfa-device --serial-number "arn:aws:iam::12345678910:mfa/kurono-test-mfa"
コマンド実行手順③ 失敗したMFAが削除されているか確認 root@kurono:~# aws iam list-virtual-mfa-devices { "VirtualMFADevices": [ {
"SerialNumber": "arn:aws:iam::12345678910:mfa/root-account-mfa-device", "User": { "UserId": "12345678910", "Arn": "arn:aws:iam::12345678910:root", "CreateDate": "2017-07-27T06:47:31+00:00", "PasswordLastUsed": "2017-07-27T06:47:59+00:00" }, "EnableDate": "2017-07-27T07:03:10+00:00" }, ] }
どうなったか?
アクセスキー発行権限不足 https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/id_credentials_access-keys.html#access- keys_required-permissions
Unable to start the environment. You don't have required permissions.
CloudShell実行権限不足 https://docs.aws.amazon.com/ja_jp/cloudshell/latest/userguide/sec-auth-with-identities.html
まとめ • 検証してからIAMユーザは作成しよう • MFAを設定する時は慎重に。。(戒め)
参考 ・https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/id_credentials_mfa.html AWS での多要素認証 (MFA) の使用 ・https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/troubleshoot_general.html #troubleshoot_general_access-denied-delete-mfa AWS ドキュメント(MFAのリセット方法)
・https://docs.aws.amazon.com/ja_jp/cloudshell/latest/userguide/sec-auth-with-identities.html 管理AWS CloudShell IAM ポリシーでのアクセスと使用