SlideShare a Scribd company logo
1 of 46
1
コンテナ時代の体系的情報セキュリティ対策入門
アジェンダ
• 情報セキュリティについて
• リスクとユーザー保護のトレンド
• 体系的な情報セキュリティ対策
• コンテナを利用した対策の例
• まとめ
2
情報セキュリティについて
• 情報セキュリティとは
情報の機密性、完全性及び可用性を維持すること
注記
さらに、真正性、責任追跡性、否認防止、信頼性などの特性を維持することを含めることもある
機密性:許可されていない個人、エンティティ又はプロセスに対して、情報を使用させず、また、
開示しない特性
完全性:正確さ及び完全さの特性
可用性:認可されたエンティティが要求したときに、アクセス及び使用が可能である特性
JIS Q 27000より
3
• ゲートウェイのセキュリティ対策
https://www.ipa.go.jp/security/vuln/websitecheck.html
4
アジェンダ
• 情報セキュリティについて
• リスクとユーザー保護のトレンド
• 体系的な情報セキュリティ対策
• コンテナを利用した対策の例
• まとめ
5
リスクとユーザー保護のトレンド
• 情報システムにおける被害例
• サイバー攻撃による被害
WannaCryによる身代金要求
コインチェック社の仮想通貨流出
• サービス事業者の違反による被害
ケンブリッジ・アナリティカ社とフェイスブック社の個人情報保護違反
6
• リスクのトレンド
https://www.owasp.org/images/2/23/OWASP_Top_10-2017%28ja%29.pdf p.4
7
• ユーザー保護のトレンド
• 改正個人情報保護法 2017年5月30日施工
5,000人分以下の個人情報を取り扱う小規模な事業者も対象
個人情報を取得する場合は、あらかじめ本人に、利用目的を明示する必要がある
個人情報を他企業などに第三者提供する場合、あらかじめ本人から同意を得る必要がある
• PCI DSS 2018年3月末までに準拠
加盟店のカード情報「非保持化」
• GDPR 2018年5月25日から適用
EUの個人データの処理と移転に関するルールを定めた規則
8
• 情報セキュリティ標準・ガイドライン
OWASP
ウェブアプリケーションセキュリティ課題の解決を目的とする国際的なオープンなコミュニティ
脆弱性診断の標準や規格などを策定
経済産業省 システム管理基準
効果的な情報セキュリティマネジメント体制を構築し適切な管理策の整備運用のための規範
IPA 情報セキュリティ
情報セキュリティ対策のガイドラインや学習用ドキュメント等
9
アジェンダ
• 情報セキュリティについて
• リスクとユーザー保護のトレンド
• 体系的な情報セキュリティ対策
• コンテナを利用した対策の例
• まとめ
10
• 体系的な情報セキュリティ対策
https://www.owasp.org/images/2/23/OWASP_Top_10-2017%28ja%29.pdf p.4
11
A3.機微な情報(他人に知られたくない情報)の露出
概要
多くのウェブアプリケーションやAPIでは、財務情報、健康情報や個人情報といった機微な情報を適切
に保護していません
攻撃者は、このように適切に保護されていないデータを窃取または改ざんして、クレジットカード詐欺
、個人情報の窃取やその他の犯罪を行う可能性があります
機微な情報は特別な措置を講じないでいると損なわれることでしょう
保存や送信する時に暗号化を施すことや、ブラウザ経由でやり取りを行う際には安全対策を講じること
などが必要です
影響
個人情報、クレジットカード番号、認証情報等の情報の漏洩
12
A9.既知の脆弱性のあるコンポーネントの使用
概要
ライブラリ、フレームワークやその他ソフトウェアモジュールといったコンポーネントは、アプリケー
ションと同等の権限で動いています
脆弱性のあるコンポーネントが悪用されると、深刻な情報損失やサーバの乗っ取りにつながります
既知の脆弱性があるコンポーネントを利用しているアプリケーションやAPIは、アプリケーションの防
御を損ない、様々な攻撃や悪影響を受けることになります
影響
コンポーネントは通常、アプリケーション自体と同じ権限で実行されるため、どんなコンポーネントに
存在する欠陥も、深刻な影響を及ぼす可能性があります
13
A10.不十分なロギングとモニタリング
概要
不十分なロギングとモニタリングは、インシデントレスポンスに組み込まれていないか、非効率なイン
テグレーションになっていると、攻撃者がシステムをさらに攻撃したり、攻撃を継続できるようにし、ほ
かのシステムにも攻撃範囲を拡げ、データを改竄、破棄、破壊することを可能にします
ほとんどのデータ侵害事件の調査によると、侵害を検知するのに200日以上も要してお り、また内部機
関のプロセスやモニタリングからではなく、外部機関によって検知されています
影響
不十分なロギングとモニタリングの悪用が、ほぼすべての重大なインシデントの背後にあります
14
アジェンダ
• 情報セキュリティについて
• リスクとユーザー保護のトレンド
• 体系的な情報セキュリティ対策
• コンテナを利用した対策の例
コンテナとコンテナオーケストレーション概要
コンポーネントの脆弱性対応 A9.既知の脆弱性のあるコンポーネントの使用
暗号化キーの保管 A3.機微な情報の露出
ロギング A10.不十分なロギングとモニタリング
• まとめ
15
コンテナとコンテナオーケストレーション概要
• コンテナ概要
• コンテナのベストプラクティス
1コンテナに1プロセス
最小限のパッケージで構成する
よくメンテナンスされたベースイメージを利用する
• コンテナランタイム
Docker、rkt
16
PHP-FPM
PHP
コンテナ
PHP実行できるサーバー PHP実行できないサーバー
実行可 実行可
• コンテナオーケストレーション概要
コンテナ間の連携や監視、スケーリング等、統合的に運用管理する
• コンテナオーケストレーションツール
Kubernetes(GKE、OpenShift等)
Docker Swarm
• Pod
複数で機能を提供するコンテナをまとめたもの
17
PHP-FPM
PHP
Nginx
Pod(フロントエンドの機能)
• Kubernetes概要
https://www.xenonstack.com/blog/devops/kubernetes-overview-monitoring-security/
18
コンポーネントの脆弱性対応
• セキュリティパッチ(EOL)の傾向
PHPのEOL
※5.6.x => 7.0.x、7.0.x => 7.1.x、7.1.x => 7.2.xの各バージョン間でも多少互換性がない
Java SEのEOL
Java 8無償版は2019年1月でEOL
Java SE無償版(相当)はJava 11以降でOpen JDKに
※Oracle Javaのコンテナ利用はライセンス上の注意が必要
19
コンポーネントの更新手順の比較
フロントエンドサーバーの更新例
20
従来の手順の例
開発環境を更新
開発環境でテスト
最終動作確認
本番環境を
一台ずつ(手動)更新
コンテナ環境の手順の例
開発環境にデプロイ
開発環境でテスト
最終動作確認
本番環境にデプロイ
Dockerイメージ更新
環境構築手順作成
Dockerイメージの更新
Dockerfile
21
FROM alpine:3.7
RUN apk —update add 
…
ENV PHP_VERSION 7.2.5 => 7.2.6
RUN wget http://$PHP_VERSION
…
RUN make …
…
本番環境へのデプロイ
デプロイ実行
$ kubectl …
deployment.yml (kubernetesのデプロイ設定ファイル)
22
spec:
replicas: 5
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
…
デプロイ時の動作
https://codefresh.io/kubernetes-tutorial/continuous-deployment-strategies-kubernetes-2/
23
1台目を新しいコンテナに切り替えて、古いコンテナを1台削除
https://codefresh.io/kubernetes-tutorial/continuous-deployment-strategies-kubernetes-2/
24
2台目の切り替え
https://codefresh.io/kubernetes-tutorial/continuous-deployment-strategies-kubernetes-2/
25
3台目の切り替え完了
https://codefresh.io/kubernetes-tutorial/continuous-deployment-strategies-kubernetes-2/
26
カナリアリリース
https://codefresh.io/kubernetes-tutorial/continuous-deployment-strategies-kubernetes-2/
27
暗号化キーの保管
• データ保護の対策
個人情報等の機微な情報を暗号化して保存
必要に応じて復号化
• ありがちな運用例
暗号化キーがアプリケーションコンフィグに書かれてリポジトリで保管している
別の場所に保管しているが誰がアクセスしているか分からない
=> 予期せず機密情報と機微な情報が漏えいするリスクがある
28
• 解決策
機密情報管理ツールを導入する
暗号化キーやデータベースのユーザー名/パスワード、APIキー等の機密情報を集中的に管理
29
30
config
‘encryption_key‘ => ‘abcdefg‘;
リポジトリ
config
‘encryption_key‘ => ‘/path/to‘;
リポジトリ
abcdefg encrypted
不正なアクセス
AP
• 機密情報管理ツールの比較
31
ツール名/機能 機密情報の分離 機密情報の暗号化 監査ログ
HashiCorp Vault ○ ○ ○
Ansible Vault ○ ○ ×
Docker Secrets ○ ○ ×
Kubernetes Secrets ○ ○ ?
(advanced audit)
• HashiCorp Vault
独立したサーバーとして稼働し、REST APIでやりとりできる
32
オープンソース版の主な機能
Secure storage ストレージに書き込む前に暗号化、復号にはVaultが必要
Credential leasing &
revocation
機密情報の利用期限の設定と失効
Detailed Audit Logs
全ての処理に対し詳細な監査ログを保存
Access control policies アクセス制御のポリシー設定
Encryption as a service プレインテキストを暗号化する
Pro版の主な機能
Disaster Recovery
Replication
データセンター間でVaultをフェイルオーバーする機能
Premium版の主な機能
HSM Autounseal HSM(Hardware Security Module)との連携
• 検証環境の構成図
33
DB
個人情報入力
暗号化キー要求/取得
暗号化キーの
暗号化/復号化
暗号化された
暗号化キー保存
暗号化された
個人情報保存
暗号化キー
の分離
暗号化された通信
内部ネットワーク
AP
Vaultサーバー ファイル
• Vaultのアーキテクチャ
https://www.vaultproject.io/docs/internals/architecture.html
34
• 暗号化の仕組み
暗号化アルゴリズム
AES 256
暗号化キー(マスターキー)の管理
Vaultは初期状態で暗号復号化できない状態(密封状態)
開封操作(複数の分散キーを入力)をすることで暗号復号化できるようになる
マスターキー自体は永続化しない
開封後も運用状況に応じて密封可能
35
シャミアの秘密分散法
36
• 認証
AppRole(Vault独自の仕組み)
AWS
Google Cloud
Kubernetes
認証トークン
ユーザー名とパスワード
37
ロギング
• Dockerの標準ログ出力
ホストOS内に保存される
標準出力と標準エラー出力がファイルに保存される
/var/lib/docker/containers/${container-id}/${container-id}-json.log
アプリケーションがファイルに出力しているとここには出力されない
オプションでローテートと破棄もできる(デフォルトは1ファイル無制限)
38
docker run …
--log-opt max-size=10m
—log-opt max-file=3
• ロギングドライバー
ドライバーは標準で提供、ログコレクタは個別にセットアップ必要
https://jaxenter.com/docker-logging-gotchas-137049.html
39
• ログ管理の要件例
ログが損失しないか
複数行のログ(アプリケーションのスタックトレース等)を塊として扱えるか
ログコレクタの動作不良時に影響を受けないか
40
• Dockerロギングベストプラクティス
アプリケーションでのロギング
アプリケーションでファイルにログ出力(従来の方法)
Dockerロギングドライバー
前述の内容
データボリューム
ホストサーバーのファイルにログを出力する
ロギング専用コンテナ
ロギング専用のコンテナを用意してサードパーティにログを転送する
サイドカーアプローチ
各コンテナにペアとなるロギング用のコンテナを用意して、ログ集約サーバーにログを送信する
41
• サイドカーコンテナによるロギング
https://dzone.com/articles/containers-5-docker-logging-best-practices
42
• EFKスタックのログ管理
43
• OWASP TOP 10以降の対策
10まででやめない
OWASP Developer's GuideやOWASP Cheat Sheet Series、OWASP Testing Guideに進む
定期的に変更する
OWASP Top 10はこれからも変化し続けます
積極的に思考する
OWASP Proactive ControlsやOWASP Application Security Verification Standardに進む
賢くツールを活用する(ツールだけに依存しない)
脆弱性を発見して排除する最も費用対効果の高いアプローチは、高度なツールを手元に備えている専門家
左へ右へ、どこへでも進める
OWASP Software Assurance Maturity Modelに進む
https://www.owasp.org/images/2/23/OWASP_Top_10-2017%28ja%29.pdf p.3
44
まとめ
• OWASPをベースにした体系的なセキュリティ対策の実践例
• コンテナ環境での効果的な対策と注意点
45
ご清聴ありがとうございました
46

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

コンテナ時代の体系的情報セキュリティ対策入門