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
S3からオブジェクトをCMKで暗号化して沼にハマった話
Search
Kento Suzuki
August 24, 2022
Technology
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
S3からオブジェクトをCMKで暗号化して沼にハマった話
JAWS-UG 名古屋 LT未経験者にも登壇して貰いたいLT会の資料
Kento Suzuki
August 24, 2022
More Decks by Kento Suzuki
See All by Kento Suzuki
こんなに安く なっちゃっていいの? コスト最適化の進め方と、課金リスクの回避
kentosuzuki
0
110
Netflix の裏側に何があるのか...その謎を解明すべく、我々は Amazon の奥地へと向かった
kentosuzuki
0
130
コミュニティが変えるキャリアの地平線:コロナ禍新卒入社のエンジニアがAWSコミュニティで見つけた成長の羅針盤
kentosuzuki
0
330
バッドプラクティスから学ぶハワイアン航空で行く re:Invent
kentosuzuki
0
570
上流工程に挑戦!「俺の考えた最強サーバレス構成」が一瞬で敗北した件
kentosuzuki
2
440
S3から始めるAWS 〜S3の簡単なユースケースの紹介〜
kentosuzuki
1
850
AWS のポリシー言語 “Cedar” で実現するアクセス制御
kentosuzuki
0
550
探せぇ!お薦めAWSセキュリティワークショップ!!〜 怒涛のワークショップ 48 連戦 〜
kentosuzuki
1
860
SIEM って何?〜 Amazon OpenSearch で始める SIEM 〜
kentosuzuki
0
1.2k
Other Decks in Technology
See All in Technology
Optunaの最新リリースv5.0について
pfn
PRO
0
110
しろおびから始める!ログ活用の第一歩
shumei_ito
0
940
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1k
FOSS4Gを活用した自治体業務DXの試み
470715
0
160
今さら理解するウェブフォントver.2026
takanorip
3
710
Classmethod Company Deck
satoshi7
1
540
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
400
オントロジーって 結局なにもの? AI エージェントに「意味」を渡す知識設計の話
greenmidori
0
120
Local CI × GitHub Actions
gogutan
2
140
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
450
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
130
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
180
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Code Review Best Practice
trishagee
74
20k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
780
Claude Code のすすめ
schroneko
67
230k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Site-Speed That Sticks
csswizardry
13
1.6k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Designing for Timeless Needs
cassininazir
1
520
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
Transcript
S3からオブジェクトをCMKで暗号化して沼に ハマった話 Kento Suzuki 2022/08/24 (水) JAWS-UG 名古屋 LT未経験者にも登壇して貰いたいLT会
自己紹介 名前:鈴木健斗 (@k_suzuki_pnx) 所属:アイレット株式会社 経歴: ・東京都在住 ・新卒3年目(エンジニア歴 = 社会人歴) ・2022
APN ALL AWS Certifications Engineer ・2022 APN AWS Top Engineer
本題 ある日のこと、 特定のIAMでS3のオブジェクトをダウンロードしようとすると The ciphertext refers to a customer master
key that does not exist, does not exist in this region, or you are not allowed to access. 訳)このリージョンに存在していない、 もしくはアクセス許可のないカスタマーマスターキー(CMK)で暗号化されています というエラーが発生
実際の構成 アクセス制限をしている箇所 ・IAMユーザ ・KMS ・S3
どこが原因か分からねぇーよ!!
1つずつポリシードキュメントを紐解く その後
犯人を特定
解説 IAMへの接続元IPを制限したい場合、 IAMポリシーへ「aws:SourceIp」を用いたCondition句を設定
ドキュメントにはこのような記載がある https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceip
解決策 Condition句に "Null": {"kms:ViaService": "true"} を追加
図示するとこうなる
まとめ AWSの権限まわりは本当に沼 「aws:SourceIp」を用いたCondition句を使うときは要注意!