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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
defunty
December 23, 2021
Programming
370
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
More Decks by defunty
See All by defunty
SPAでの認証方法に関するマサカリぶん投げ会場はこちらです
defunty
0
1.1k
CSS Module・CSS in JS抗争の過去と現在
defunty
1
230
アクセシビリティ in 令和
defunty
0
44
Other Decks in Programming
See All in Programming
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
440
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
Java 27新機能 / Java 27 new features
kishida
2
180
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
170
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
380
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
850
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
580
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
540
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
180
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
570
一人だけ、Kiroが静止する日
hideg
0
130
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
For a Future-Friendly Web
brad_frost
183
10k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
KATA
mclloyd
PRO
35
16k
Building Adaptive Systems
keathley
44
3.2k
Transcript
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