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
プライベートコンテンツのHLS配信 with CloudFront
Search
defunty
December 23, 2021
Programming
380
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
プライベートコンテンツのHLS配信 with CloudFront
LT資料(2021/12/23)
defunty
December 23, 2021
Transcript
10 slides
2021/12/23 プライベートコンテンツのHLS 配信 with CloudFront
本スライドでの「プライベートコンテンツ」の定義 ↓ 個人情報を含む、第三者に公開されるべきではない情報
HLS HTTP Live Streaming. 複数ファイル(インデックスファイル・セグメントファイル)で構成 された規格。 動画ファイルをライブストリーミング用にしたもの。
S3 でシンプルな画像形式のプライベートコン テンツを配信する場合(not HLS ) S3 のパブリックアクセスブロックをON にする EC2 にS3
を制御するポリシーをアタッチする (バックエンド側でのアクセス制御) 署名付きURL の発行 (ブラウザ側でのアクセス制御)
署名付きURL 認証用パラメータのついた有効期限付きのURL 。 S3 の機能で発行できる。 AWS のSDK からも発行可能。 Aws::S3::Object#presigned_url https://docs.aws.amazon.com/sdk-for-
ruby/v3/api/Aws/S3/Object.html#presigned_url-instance_method
署名付きURL -2- 複数ファイルを取り扱うHLS では署名付きURL は適していない。 https://docs.aws.amazon.com/ja_jp/AmazonCloudFront/latest/Develo perGuide/private-content-choosing-signed-urls-cookies.html 次のような場合は、署名付き Cookie を使用します。
・複数の制限されたファイル (HLS 形式の動画のすべてのファイ ルやウェブサイトの購読者の領域にあるすべてのファイルなど) へのアクセスを提供する場合。 “ “
署名付きCookie CloudFront の機能。 S3 にはない。 AWS のSDK からも発行可能。 Aws::CloudFront::CookieSigner#signed_cookie https://docs.aws.amazon.com/sdk-for-
ruby/v3/api/Aws/CloudFront/CookieSigner.html
署名付きCookie -2- signer = Aws::CloudFront::CookieSigner.new( key_pair_id: "cf-keypair-id", private_key_path: "./unit_test_dummy_key" )
cookies = signer.signed_cookie(url, policy: policy.to_json )
CloudFront でプライベートコンテンツをHLS 形式で配信する場合 署名付き Cookie を使用して HLS コンテンツを取得してみた | DevelopersIO
↑ の記事ではルートアカウントでしか取得できない情報を使っている が、ローカルで作成した鍵情報をCloudFront に登録し、利用するのも 可。 [ アップデート] root ユーザー作業が不要に!Amazon CloudFront で署 名付き URL/Cookie 向け公開鍵を IAM ユーザー権限で管理できるよう になりました。 | DevelopersIO
None
More Decks by defunty
See All by defunty
SPAでの認証方法に関するマサカリぶん投げ会場はこちらです
defunty
0
1.1k
CSS Module・CSS in JS抗争の過去と現在
defunty
1
240
アクセシビリティ in 令和
defunty
0
49
Other Decks in Programming
See All in Programming
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
260
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
750
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
Seven New Principles of Software Engineering
yegor256
0
490
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
4.3k
はじめてのPLATEAU
nokonoko1203
1
650
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
320
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2.1k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
180
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
660
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
760
Skip the Path - Find Your Career Trail
mkilby
1
290
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
940
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
480
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590