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
AWS IAM で MFA 有効でないユーザを awscli + Mackerel で監視する...
Search
do-su-0805
May 12, 2019
Programming
0
230
AWS IAM で MFA 有効でないユーザを awscli + Mackerel で監視する / Monitoring users who are not MFA enabled with AWS IAM with awscli + Mackerel
#kosen10s LT#14 で発表したネタです。AWS IAM に登録されたユーザで、多要素認証が有効でないユーザを調べて Mackerel で監視するまでです。
do-su-0805
May 12, 2019
Tweet
Share
More Decks by do-su-0805
See All by do-su-0805
元SREのCREが伝えたい、Mackerelをもっと活用するための実践Tips集 / Mackerel Drink Up #11 do-su-0805
dosu0805
0
230
iptables を使って、 2回に1回 ping が落ちる サーバを作る / Use iptables to create a server that pings once every two times
dosu0805
0
1.1k
とある高専生の進路例/Example of a certain college student
dosu0805
1
1.1k
Webアプリケーション初心者が ISUCON 4 予選を通じてパフォーマンスの測定改善をした話 / newcomers of web application improvements in performance measurement through ISUCON 4 qualifying
dosu0805
0
1.3k
Other Decks in Programming
See All in Programming
CSC509 Lecture 11
javiergs
PRO
0
180
cmp.Or に感動した
otakakot
2
130
Macとオーディオ再生 2024/11/02
yusukeito
0
370
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
327
21k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Designing for humans not robots
tammielis
250
25k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Building an army of robots
kneath
302
43k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Optimizing for Happiness
mojombo
376
70k
Transcript
AWS IAM Ͱ MFA ༗ޮͰͳ͍ϢʔβΛ awscli + Mackerel Ͱࢹ͢Δ Kosen10s
LT#14 do_su_0805
ΞδΣϯμ w 5-%3 w ߏਤ w ֤छઃఆ
5-%3 • awscli ͷ `aws iam` Λ͏ͱɺMFA ͕༗ޮͰͳ͍Ϣʔβ͕ൈ͖ग़ͤΔ ◦ ҰൃͰൈ͖ग़ͤͳ͍ͷͰɺΈ߹Θ͍ͤͯ͘
◦ ϋʔυΣΞΩʔͳϢʔβ͚ͩൈ͖ग़͢ͷ͕ͪΐͬͱେม • ͦͷΛ Mackerel ͷϝτϦοΫͱͯ͠ߘ͠ɺࢹ͢Δ ◦ ϝτϦοΫͱͯ͠ඞཁͳ͍ͳΒɺνΣοΫࢹͰಉ͜͡ͱ͕Ͱ͖Δ
ߏਤ ਤߏਤ
BXTDMJʹ͍ͭͯ l"84ίϚϯυϥΠϯΠϯλʔϑΣΠε $-* ɺ"84αʔϏεΛཧ͢ ΔͨΊͷ౷߹πʔϧͰ͢ɻμϯϩʔυ͓Αͼઃఆ༻ͷ୯ҰͷπʔϧͷΈΛ ༻ͯ͠ɺίϚϯυϥΠϯ͔Βෳͷ"84αʔϏεΛ੍ޚ͠ɺεΫϦϓτ Λ༻ͯ͜͠ΕΒΛࣗಈԽ͢Δ͜ͱ͕Ͱ͖·͢ɻz "84ίϚϯυϥΠϯΠϯλʔϑΣΠεIUUQTBXTBNB[PODPNKQDMJ !5
.BDLFSFMʹ͍ͭͯ l.BDLFSFMʢϚΧϨϧʣɺӡ༻தͷΫϥυ͘͠ΦϯϓϨϛεͷαʔ όʹΤʔδΣϯτΛͭೖΕΔ͚ͩͰɺ؆୯ʹαʔόཧΛ࢝ΊΒΕ·͢ɻ ࢹαʔόࣗͷߏஙɾӡ༻ෆཁͰ͢ɻ͞ΒʹෛՙͷϦιʔεঢ়گͳͲͷ ΛάϥϑʹՄࢹԽ͠·͢ɻোൃੜ࣌ʹΞϥʔτ͕ه͞Εɺ༷ʑͳ πʔϧʹ௨Ͱ͖·͢ɻγεςϜӡ༻อकʹ࠷దͳࢹαʔϏεͰ͢ɻz ಛͱػೳಛz l.BDLFSFMʢϚΧϨϧʣ৽ੈͷαʔόཧɾࢹαʔϏε IUUQTNBDLFSFMJPKBGFBUVSFT
!6
ਤ.BDLFSFM IUUQTNBDLFSFMJPKB
BXTDMJΛͬͯใΛऔಘ͢Δ w ొ͢ΔίϚϯυͭ w BXTJBNMJTUVTFST w "84*".ϢʔβͷҰཡΛऔಘ w BXTJBNMJTUWJSUVBMNGBEFWJDFT w
"84*".ʹొ͞Ε͍ͯΔԾ.'"σόΠεҰཡΛऔಘ w BXTJBNMJTUNGBEFWJDFTVTFSOBNF\VTFS^ w "84*".ʹొ͞Ε͍ͯΔɺಛఆϢʔβͷ.'"σόΠεҰཡΛऔಘ
BXTDMJΛͬͯใΛऔಘ͢Δ MJTUVTFSTͰϢʔβҰཡΛग़͢ w BXTJBNMJTUVTFSTcKR6TFST<>cTFMFDU 1BTTXPSE-BTU6TFEOVMM c6TFS/BNFScTPSU w JBNMJTUVTFSTͷ݁Ռ͔ΒɺʮύεϫʔυϩάΠϯͨ͠ϢʔβʯͷҰཡ Λऔಘ
BXTDMJΛͬͯใΛऔಘ͢Δ MJTUWJSUVBMNGBEFWJDFTͰ༗ޮͳԾ.'"σόΠεͷॴ༗ऀΛग़͢ w BXTJBNMJTUWJSUVBMNGBEFWJDFTcKR7JSUVBM.'"%FWJDFT<>cTFMFDU &OBCMF%BUFOVMM a c6TFS6TFS/BNFScTPSU w JBNMJTUWJSUVBMNGBEFWJDFTͷ݁Ռ͔ΒɺԼهͷΑ͏ʹߜΓࠐΉ
w ʮԾ.'"σόΠεҰཡ͔Βʯ w ʮ༗ޮͳσόΠεͷҰཡΛग़͠ʯ w ʮͦͷॴ༗ऀΛऔಘ͢Δʯ
BXTDMJΛͬͯใΛऔಘ͢Δ MJTUNGBEFWJDFTͰಛఆϢʔβʹ༗ޮͳ.'"σόΠε͕͋Δ͔ΛௐΔ w GPSVTFSJO ʮʯͷ݁Ռͱʮʯͷ݁ՌͷࠩϢʔβ EP BXTJBNMJTUNGBEFWJDFTVTFSOBNF\VTFS^cKR.'"%FWJDFT<>a cTFMFDU &OBCMF%BUFOVMM
c6TFS/BNFS EPOF w ʮʯͱʮʯͷ݁Ռͷࠩͱͯ͠දࣔ͞ΕͨϢʔβ͕ɺଞʹσόΠε͕ͳ͍͔ΛௐΔ w ʮʯͷ݁ՌʰԾ.'"σόΠεʱͳͷͰϋʔυΣΞΩʔೖΒͳ͍ w ͔ͱ͍ͬͯɺʮʯͰऔಘͨ͠શϢʔβΛ্هͰݕࡧ͢Δͷͳ͊ɾɾɾ w ௐͯɺݟ͔ͭͬͨΒʮʯಉ༷ʹϢʔβ໊Λऔಘ͢Δ
BXTDMJΛͬͯใΛऔಘ͢Δ औಘ݁ՌΛͱʹ·ͱΊΔ w ʮʯͷ݁ՌશϢʔβʜ" w ʮʯͷ݁ՌԾ.'"σόΠεͰ.'"͍ͯ͠ΔϢʔβʜ# w ʮʯͷ݁ՌϋʔυΣΞσόΠεͰ.'"͍ͯ͠ΔϢʔβʜ$ w
#ͱ$ͷVOJR߹ܭ.'"༗ޮͳϢʔβʜ% w "ͱ%ͷࠩ.'"͕༗ޮͰͳ͍Ϣʔβ
.BDLFSFMͰࢹ͢Δ w ࢼ͠ʹ ϗετϝτϦοΫͱͯ͠.BDLFSFMʹߘ͢Δ w NBDLFSFMBHFOUDPOGʹ͜Μͳײ͡ʹॻ͍ͯ w <QMVHJONFUSJDTBXTJBNNGB> DPNNBOEl ΧϯτεΫϦϓτ
l w ͜Μͳײ͡ʹεΫϦϓτ͕ग़ྗ͢Δͱ ۭനUBC w "84@*".BMMVTFST "84@*".WJSUVBMNGBVTFST "84@*".IBSEXBSFNGBVTFST "84@*".XSPOH@VTFS
.BDLFSFMͰࢹ͢Δ w ࢼ͠ʹ ϗετϝτϦοΫͱͯ͠.BDLFSFMʹߘ͢Δ w ͜͏ͳΔ ਤߘྫ
.BDLFSFMͰࢹ͢Δ w αʔϏεϝτϦοΫͱͯ͠.BDLFSFMʹߘ͢Δͱ͖ w ͖ͬ͞ͷܭࢉ݁ՌΛ"1*ܦ༝Ͱߘͨ͠Γ w BQJWTFSWJDFTTFSWJDF/BNFUTECʹ1045͢Δ w ͖ͬ͞ͷܭࢉ݁ՌΛNLSUISPXͰߘͨ͠Γ w
্ه"1*ͷXSBQQFS
.BDLFSFMͰࢹ͢Δ w νΣοΫࢹͰࢹ͢Δ߹ʢϢʔβ͍Βͳ͍ਓ͚ʣ w NBDLFSFMBHFOUDPOGʹ͜Μͳײ͡ʹॻ͍ͯ w <QMVHJODIFDLTBXTJBNNGB> DPNNBOEl ΧϯτεΫϦϓτ l
w εςʔλε ͱҰॹʹϝοηʔδ Λฦ͢εΫϦϓτΛஔ͘ w ʮ.'"༗ޮ͡Όͳ͍Ϣʔβ͕ʯͳΒ0, FYJU w ʮ.'"༗ޮ͡Όͳ͍Ϣʔβ͕͡Όͳ͍ʯͳΒͩΊ FYJU
.BDLFSFMͰࢹ͢Δ w ࢹϧʔϧͰ͢Δ߹ ϢʔβͷਪҠͳͲཉ͍͠ਓ͚ʣ w ϗετPSαʔϏεϝτϦοΫͱͯ͠ߘ͢Δ w ࢹϧʔϧΛӈͷΑ͏ʹ࡞͢Δ ਤࢹϧʔϧͷઃఆྫ