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
Security Command Center × PagerDuty 自動アラート通知の取り組み
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kyohei Mizumoto
August 04, 2022
Technology
780
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Security Command Center × PagerDuty 自動アラート通知の取り組み
3-shake SRE Tech Talk #4 の登壇資料です。
https://3-shake.connpass.com/event/253028/
Kyohei Mizumoto
August 04, 2022
More Decks by Kyohei Mizumoto
See All by Kyohei Mizumoto
最新の脅威動向から考える、コンテナサプライチェーンのリスクと対策
kyohmizu
1
940
コンテナセキュリティの最新事情 ~ 2026年版 ~
kyohmizu
9
4k
Black Hat USA 2025 Recap ~ クラウドセキュリティ編 ~
kyohmizu
0
960
CTFのためのKubernetes入門
kyohmizu
3
1.2k
クラウドネイティブ環境の脅威モデリング
kyohmizu
3
820
コンテナサプライチェーンセキュリティ
kyohmizu
2
520
サイバーセキュリティの最新動向:脅威と対策
kyohmizu
1
450
コンテナセキュリティの基本と脅威への対策
kyohmizu
4
2.3k
安全な Kubernetes 環境を目指して
kyohmizu
4
1.4k
Other Decks in Technology
See All in Technology
実装だけじゃない! CCA-F取得エンジニアが教えるClaude Code開発プロセス活用術
diggymo
2
780
誤解だらけの開発生産性 / Myths and Misconceptions about Developer Productivity
i35_267
2
720
CIで使うClaude
iwatatomoya
0
280
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
5.6k
SREとQA 二人三脚で進めるSLO運用/sre-qa-slo
sugitak
0
670
kintone の AI コワーカーを、 Anthropic にエージェントを"ホストさせて"作った話 #devkinmeetup
sugimomoto
0
110
ヘルスケア領域における AI 活用と その安全性担保のための取り組み (Leveraging AI in Healthcare and Our Efforts to Ensure Its Safety) - Google I/O Extended Tokyo 2026, July 11, 2026
zettaittenani
0
400
壊して学ぶAWS CDK: そのcdk deployで消えるもの、残るもの
k_adachi_01
1
280
DMM.com 購入改善推進チーム におけるCodeRabbitを用いた レビューフロー改善の一例
ysknsid25
2
640
ファミコンでPHPを動かす / PHP on the Famicom
tomzoh
2
190
SRE依存からの脱却 運用を開 発チームへ移す、 フルサイ クル開 発体制の実践
joooee0000
0
2.8k
【Claude Code】鹿野さんに聞く 私の推しの並行開発環境 大公開 / claude-code-parallel-2026-07-15
tonkotsuboy_com
12
8.2k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.7k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
340
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
Speed Design
sergeychernyshev
33
1.9k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Optimizing for Happiness
mojombo
378
71k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
220
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
Transcript
Security Command Center × PagerDuty 自動アラート通知の取り組み @kyohmizu
Copyrights©3-shake Inc. All Rights Reserved. 2 whoami 水元 恭平 (@kyohmizu)
株式会社スリーシェイク Sreake事業部 SRE/CSIRT - AWS, GCP, kubernetes - 脆弱性評価・セキュリティアラートの基盤構築と運用 - セキュリティ運用改善(IaC, 自動化ツール作成など) - IAM設計、脅威情報の収集、サイバー演習 etc… イベント - 3-shake SRE Tech Talk 運営 - CloudNative Days 実行委員(~2021)
Copyrights©3-shake Inc. All Rights Reserved. 3 モチベーション Security Command Center
(SCC) のアラートを自動通知する仕組みを作る! - AWS では SecurtyHub × PagerDuty の連携を行なっている - インテグレーション機能でサクッと解決 - 同じ仕組みを Google Cloud でも作りたい - …インテグレーションがない??? 思ったより大変だったので、実装する上で必要な設定やハマりポイントをご紹介します。
Copyrights©3-shake Inc. All Rights Reserved. 4 アーキテクチャ
Copyrights©3-shake Inc. All Rights Reserved. 5 実装の手順 1. PagerDuty 側の準備(今回はお話ししません)
a. Service 作成 b. インテグレーションに Custom Event Transformer を追加 c. Jira インテグレーションを追加 2. Security Command Center API の有効化 3. Pub/Sub トピックの作成 4. Cloud Functions のコード実装&デプロイ 5. SCC Notification Config の作成
Copyrights©3-shake Inc. All Rights Reserved. 6 Cloud Functions コード実装 def
scc_to_pd(event, context): webhook_url = os.getenv('WEBHOOK_URL', None) attributes = base64.b64decode(event["data"]).decode("utf-8") headers = { "Content-Type": "application/json; charset=UTF-8" } data = { "Data": json.loads(attributes), } req = urllib.request.Request(webhook_url, data=json.dumps(data).encode("utf-8"), method="POST", headers=headers) try: res = urllib.request.urlopen(req, timeout=5) except Exception as e: print(e) SCC findings の内容を丸ごと送信 - SCC は組織権限がないと参照できないため、対応担当者が見れないケースもある - PagerDuty や Jira チケット管理により権限問題を解消
Copyrights©3-shake Inc. All Rights Reserved. 7 ハマりポイント① Terraform 実装について -
Notification Config は自身のユーザで terraform apply しても失敗する - サービス アカウントの権限借用 (service account impersonation) が必要 - SA のアクセストークンを設定したプロバイダを用意する - https://cloud.google.com/blog/topics/developers-practitioners/using-google-cloud-service-account-imperso nation-your-terraform-code - Pub/Sub, CloudFunctions 等のリソースは通常のプロバイダを使用
Copyrights©3-shake Inc. All Rights Reserved. 8 ハマりポイント① provider "google" {
alias = "impersonation" scopes = [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/userinfo.email", ] } provider "google" { alias = "scc-creator" project = var.project_id access_token = data.google_service_account_access_token.scc_creator.access_token } data "google_service_account_access_token" "scc_creator" { provider = google.impersonation target_service_account = google_service_account.scc_creator.email scopes = ["userinfo-email", "cloud-platform"] lifetime = "1200s" } resource "google_scc_notification_config" "notify_to_pubsub" { provider = google.scc-creator … }
Copyrights©3-shake Inc. All Rights Reserved. 9 ハマりポイント② VPC Service Controls
への対応 - VPC Service Controls を有効化していたため Notification Config の作成に失敗 - 事前に VPC Service Controls の Ingress/Egress 設定を追加する必要がある - ドキュメントの手順通りに行えば OK - https://cloud.google.com/security-command-center/docs/how-to-notifications#grant-perimeter-access - (VPC Service Controls つらい)
Copyrights©3-shake Inc. All Rights Reserved. 10 運用上の課題 アラートのチューニングについて - SCC
の Mute設定 - 個別設定 or Config 作成。設定がやや複雑なのと条件付き - Mute しても通知が来る? - CloudFunctions のコード修正 - コードの複雑化や停止のリスク。都度デプロイの必要あり - PagerDuty のカスタムルール アラート調査のコスト高 - セキュリティ担当者による対応の限界 - 一次対応者をサービス担当者へ振り分ける - チケットの可読性向上の必要性
Copyrights©3-shake Inc. All Rights Reserved. 11 Security Command Center の機能
https://cloud.google.com/security-command-center/pricing 通知設定 https://htayyar.medium.com/pagerduty-google-cloud-security-command-center-6ad92debb026 https://cloud.google.com/security-command-center/docs/how-to-notifications https://cloud.google.com/security-command-center/docs/how-to-api-manage-notifications terraform 関連 https://github.com/hashicorp/terraform-provider-google/issues/10534 https://cloud.google.com/iam/docs/impersonating-service-accounts https://cloud.google.com/blog/topics/developers-practitioners/using-google-cloud-service-account-impersonation-your-terraform-code https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/scc_notification_config 参考