More Related Content
Similar to [20210519 Security-JAWS] AWS エッジサービス入門ハンズオンの紹介と AWS WAF のアップデートについて (20)
More from Amazon Web Services Japan (20)
[20210519 Security-JAWS] AWS エッジサービス入門ハンズオンの紹介と AWS WAF のアップデートについて
- 1. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
アマゾン ウェブ サービス ジャパン株式会社
Technical Solutions Architect
文珠 啓介/ Keisuke Monju
AWS エッジサービス入門ハンズオンの紹介
と AWS WAF のアップデートについて
2021/05/19 @ Security-JAWS 【第21回】 勉強会
- 2. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
自己紹介
❏ 名前
文珠 啓介 (Keisuke Monju)
❏ ロール
テクニカル ソリューション アーキテクト
❏ 経歴
• オンプレミスのインフラ構築・運用
• AWSへのマイグレーション対応・運用
❏ 好きなAWSサービス
Amazon CloudFront、AWS WAF
- 3. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のアジェンダ
1. 前半は「AWS エッジサービス入門ハンズオンの紹介」
2. 後半は「AWS WAFのアップデートについて」
- 4. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のアジェンダ
1. 前半は「AWS エッジサービス入門ハンズオンの紹介」
2. 後半は「AWS WAFのアップデートについて」
- 5. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Hands-on for Beginners とは
実際に手を動かしながら AWS の各サービスを学んでいただきます
初めてそのサービスをご利用される方がメインターゲットです
お好きな時間、お好きな場所でご受講いただけるオンデマンド形式です
テーマごとに合計1~2時間の内容 & 細かい動画に分けて公開
スキマ時間の学習や、興味のある部分だけの聴講も可能
- 6. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Hands-on for Beginners とは
https://aws.amazon.com/jp/aws-jp-introduction/aws-jp-webinar-hands-on/
- 7. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS WAF Hands On
Amazon CloudFront Hands On 3 and 4
Amazon CloudFront Hands On 1 and 2
本シリーズで構築する内容
ユーザー
- 8. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ユーザーはサーバーからの距離に比例した遅延を感じる
ウェブアプリケーション
(東京のデータセンター内)
少し遅い
快適
結構遅い
東京にいる
ユーザー
アジア圏にいる
ユーザー
ヨーロッパ圏にいる
ユーザー
- 9. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
エッジサービスの導入効果
ウェブアプリケーション
(東京のデータセンター内)
快適
快適
快適
東京にいる
ユーザー
アジア圏にいる
ユーザー
ヨーロッパ圏にいる
ユーザー
エッジロケーション
(ヨーロッパ圏)
エッジロケーション
(アジア圏)
エッジロケーション
(東京)
エッジサービス
の導入により
処理量が軽減
- 10. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
/index.html
/image/gazo.png
/api?input_text=“hello”
Amazon CloudFrontの設定について
(Distribution/Behavior/Origin)
ユーザー
{bucket-name}.s3.
{region}.amazonaws.com
Amazon S3
オリジン
Distribution
Amazon CloudFront
(xxxxxx.cloudfront.net)
Behavior Origin
api
キャッシュポリシー3
オリジンリクエストポリシー3
image/*
キャッシュポリシー2
オリジンリクエストポリシー2
{restapi-id}.execute-api.
{region}.amazonaws.com
デフォルト(*)
キャッシュポリシー1
オリジンリクエストポリシー1
設定A
設定B
設定1
設定2
設定3
- 11. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
画像
HTML
JavaScript
APIの結果(動的コンテンツ)
CSS
Amazon CloudFrontのキャッシュがどこに効いたか?
キャッシュコンテンツ
非キャッシュコンテンツ
非キャッシュコンテンツ
キャッシュ
コンテンツ
- 12. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
環境削除手順
1. Amazon CloudFrontの削除
2. AWS WAFの削除
3. Amazon API Gatewayの削除
4. AWS Lambdaの削除
5. Amazon S3の削除
- 13. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のアジェンダ
1. 前半は「AWS エッジサービス入門ハンズオンの紹介」
2. 後半は「AWS WAFのアップデートについて」
- 14. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS WAF の設定について
Web ACL (Web Access Control List)
· · · Rule Statements · · ·
IP Set Rule Group Regex Set
Sampled
Request
AWS WAF
Amazon
CloudFront
Application
Load Balancer
Amazon API
Gateway
ユーザー
AWS AppSync
- 15. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS WAF が提供する機能
• SQL インジェクション
• クロスサイトスクリプト
• AWS またはパートナー提
供のマネージドルール
• Amazon CloudWatch
• メトリクス / アラーム
• サンプルログ
• Full logs
• カウントアクション
モード(検知モード)
悪意のあるリクエストのブロック カスタムルールに基づいた Web
トラフィックのフィルタ
モニタリングとチューニング
• Rate-based rules
• IP & Geo-IP filters
• 正規表現パターン、文字列
• サイズ制限
• アクション:許可/拒否
- 16. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のご紹介する AWS WAF のアップデート
• [2021/04] AWS WAF Bot Control
• [2021/04] ラベル機能
• [2021/04] スコープダウンステートメント
• [2021/03] カスタムレスポンス
• [2021/03] リクエストヘッダーの追加
• [2021/04] ログフィルタリング
- 17. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のご紹介する AWS WAF のアップデート
• [2021/04] AWS WAF Bot Control
• [2021/04] ラベル機能
• [2021/04] スコープダウンステートメント
• [2021/03] カスタムレスポンス
• [2021/03] リクエストヘッダーの追加
• [2021/04] ログフィルタリング
- 18. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS WAF Bot Control
ボットと判断されるトラフィックを検知して、それに基づいたアクショ
ンを行える
• ボットに特化した AWS Managed Rules を提供
• リクエストによってボットの種別を表すラベルを追加
• ラベル内にカテゴリと特徴(シグナル)を表す情報を付加
AWS WAF を利用する全てのユーザーは、Bot Control を有効にせずとも
、一定の可視性が得られる
• Bot Control を利用した場合の効果を事前に取得し、利用の可否を決
めることができる
https://aws.amazon.com/waf/features/bot-control/
- 19. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ボットの可視化(無料)
AWS WAF をご利用のお客様は Bot Control を利用せずとも、ダッシュボードから
ボットトラフィックの情報が表示される
- 20. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
更に詳細なレポートの表示
Bot Control ルールをご利用の場合、
更に詳細なレポートを参照可能
- 21. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bot Control のルール
• AWS Managed Rule Grop
の 1つとして登録可能
• Web Capacity Unit (WCU)
は 50 を消費
• 時間課金で利用することが
可能
- 22. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のご紹介する AWS WAF のアップデート
• [2021/04] AWS WAF Bot Control
• [2021/04] ラベル機能
• [2021/04] スコープダウンステートメント
• [2021/03] カスタムレスポンス
• [2021/03] リクエストヘッダーの追加
• [2021/04] ログフィルタリング
- 23. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ラベル機能
リクエストに対して追加されるメタデータ
・ラベルの値によってルールを実行させることが可能
・アクションに依存せず設定することが可能
Bad Bot
Suspicious
No Header
No User-
Agent
- 24. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のご紹介する AWS WAF のアップデート
• [2021/04] AWS WAF Bot Control
• [2021/04] ラベル機能
• [2021/04] スコープダウンステートメント
• [2021/03] カスタムレスポンス
• [2021/03] リクエストヘッダーの追加
• [2021/04] ログフィルタリング
- 25. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
スコープダウンステートメント
• Bot Control のリリースと同時
に追加された WAF 機能の1つ
• 適用範囲を限定する機能を提供
• Bot Control 以外の AWS
Managed Rule でも利用するこ
とが可能
- 26. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のご紹介する AWS WAF のアップデート
• [2021/04] AWS WAF Bot Control
• [2021/04] ラベル機能
• [2021/04] スコープダウンステートメント
• [2021/03] カスタムレスポンス
• [2021/03] リクエストヘッダーの追加
• [2021/04] ログフィルタリング
- 27. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
カスタムレスポンスの設定
Rule action を拡大する
Block アクションに対し
てのみ設定可能
Response ボディは
同じ WebACL 内の他の
ルールでも再利用が可能
Response Code や
Response ヘッダーを設定
https://docs.aws.amazon.com/waf/latest/developerguide/limits.html
- 28. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のご紹介する AWS WAF のアップデート
• [2021/04] AWS WAF Bot Control
• [2021/04] ラベル機能
• [2021/04] スコープダウンステートメント
• [2021/03] カスタムレスポンス
• [2021/03] リクエストヘッダーの追加
• [2021/04] ログフィルタリング
- 29. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
リクエストヘッダ追加の設定
Rule action を拡大する
Count または Allow
アクションに対してのみ
設定可能
※WebACL のデフォルト
アクションとしても設定可能
https://docs.aws.amazon.com/waf/latest/developerguide/customizing-the-incoming-request.html
- 30. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のご紹介する AWS WAF のアップデート
• [2021/04] AWS WAF Bot Control
• [2021/04] ラベル機能
• [2021/04] スコープダウンステートメント
• [2021/03] カスタムレスポンス
• [2021/03] リクエストヘッダーの追加
• [2021/04] ログフィルタリング
- 31. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ログフィルタリング
ルールによって取られたアクションまたは
設定されたラベルでログをフィルタリング
例)ブロックされたリクエストのみを
ログとして保存
Kinesis Firehose やストレージコストの削
減に繋がる
AWS WAF の追加費用はなし
https://docs.aws.amazon.com/waf/latest/developerguide/logging.html
フィルタ条件を設定
保存 or 破棄
- 32. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
本日のご紹介する AWS WAF のアップデート
• [2021/04] AWS WAF Bot Control
• [2021/04] ラベル機能
• [2021/04] スコープダウンステートメント
• [2021/03] カスタムレスポンス
• [2021/03] リクエストヘッダーの追加
• [2021/04] ログフィルタリング
- 33. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
参考資料
• AWS Hands-on for Beginners AWS エッジサービス入門ハンズオンを公開しました!
• https://aws.amazon.com/jp/blogs/news/aws-hands-on-for-beginners-12/
• AWS Hands-on for Beginners Amazon CloudFrontおよびAWS WAFを用いて エッジサービスの活用方法を学ぼう
• https://pages.awscloud.com/JAPAN-event-OE-Hands-on-for-Beginners-CF_WAF-2021-reg-event.html
• [AWS Black Belt Online Seminar] Amazon CloudFront deep dive 資料及び QA 公開
• https://aws.amazon.com/jp/blogs/news/webinar-bb-amazon-cloudfront-deep-dive-2020/
• [AWS Black Belt Online Seminar] AWS WAFアップデート 資料及び QA 公開
• https://aws.amazon.com/jp/blogs/news/webinar-bb-aws-waf-update-2020/
• AWS WAF 開発者ガイド
• https://docs.aws.amazon.com/ja_jp/waf/latest/developerguide/waf-chapter.html
- 34. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.