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
社内の全環境をhttpsにした話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Morix
October 28, 2017
Technology
0
1.8k
社内の全環境をhttpsにした話
Created by Shota Omori(@morix1500)
2017-10-28 Rakuten Technology Conference LT
Morix
October 28, 2017
Tweet
Share
More Decks by Morix
See All by Morix
入社後SREチームのミッションや課題の整理をした話
morix1500
1
510
[EC2からKubernetes]楽天ラクマのコンテナ化の歩み
morix1500
23
8.7k
AWS EKSでClusterAutoscalerを使うときはNodeGroupの分け方に気をつけろ!
morix1500
0
970
FirebaseとNetlifyを使ってサーバーレスでサービスを作った話
morix1500
2
3k
オーバーロードで学んだチームマネジメント / Team management learned through overlord
morix1500
1
2.1k
転職をする前にやっておきたいこと / What you want to do before you change your career
morix1500
0
4k
自分を強くするためにやってきたこと
morix1500
7
2.6k
個人事業主になりたい!どうやって?調べてみよう!
morix1500
1
430
負荷試験入門
morix1500
0
1.6k
Other Decks in Technology
See All in Technology
DEVCON 14 Report at AAMSX RU65: V9968, MSX0tab5, MSXDIY etc
mcd500
0
220
AI Agent Agentic Workflow の可観測性 / Observability of AI Agent Agentic Workflow
yuzujoe
7
2.3k
メルカリのAI活用を支えるAIセキュリティ
s3h
5
2.8k
持続可能な開発のためのミニマリズム
sansantech
PRO
4
570
フロントエンド開発者のための「厄払い」
optim
0
170
アウトプットはいいぞ / output_iizo
uhooi
0
140
困ったCSVファイルの話
mottyzzz
2
360
Riverpod3.xで実現する実践的UI実装
fumiyasac0921
2
340
【northernforce#54】SalesforceにおけるAgentforceの位置づけ・事例紹介
yutosatou_kit
0
120
Azure SRE Agent x PagerDutyによる近未来インシデント対応への期待 / The Future of Incident Response: Azure SRE Agent x PagerDuty
aeonpeople
0
170
AI Agent Standards and Protocols: a Walkthrough of MCP, A2A, and more...
glaforge
1
560
さくらのクラウドでのシークレット管理を考える/tamachi.sre#2
fujiwara3
1
220
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
180
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Are puppies a ranking factor?
jonoalderson
1
2.6k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
50
BBQ
matthewcrist
89
10k
GraphQLとの向き合い方2022年版
quramy
50
14k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
180
AI: The stuff that nobody shows you
jnunemaker
PRO
2
200
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
340
Transcript
社内の全環境をhttpsにした話 2017.10.28 Rakuten Technology Conference @morix1500
じこしょうかい ・大森翔太(@morix1500) ・株式会社モブキャスト ・インフラエンジニア ・技術ブログやってます! https://blog.haramishio.xyz/
あじぇんだ ・Let's Encryptについて ・社内の全環境をhttpsにしたはなし
みなさん、 https対応してますか?
高まるhttps対応の波 引用元: https://transparencyreport.google.com/https/overview?hl=ja
httpsじゃないとサービス提供できない時代に ・AppleのATS(App Transport Security) ⇒ そもそも通信ができなくなる ・Chrome62からhttpページで警告が出るように ⇒ サイトの信頼性が下がる
でも… ・証明書って金かかるじゃん? ・なんか発行とかだるそう ・うーんどうしよう
None
Let's Encryptとは ・無料で発行できるSSL証明書 ・httpsの普及を目的として作られた ・名だたるスポンサーたち ⇒ Mozilla/Akamai/Cisco/Chrome etc...
Let's Encryptの特徴 ・無料 ・発行/更新が自動で行える ・証明書の有効期限は3ヶ月
証明書の発行の仕方(例) # 発行 $ certbot certonly --webroot -w /var/www/html -d
example.jp # 更新 $ certbot renew
全開発環境の https対応と運用の 自動化を行った!
要件 ・開発環境なのでWebサーバーは外部からアクセス不可 ・1プロジェクトにつき20個くらいドメインある ・そのプロジェクトは何個もある ・プロジェクトごとにネットワーク(アカウント)が分かれている
採用した方法(アーキテクチャ) Jenkins S3 Route53 EC2 1.証明書リクエスト 2.ワンタイムトークン登録 3.ワンタイムトークン確認 4.証明書発行 5.証明書配置
6.証明書ダウンロード
実装 ・LEクライアント lego(https://github.com/xenolf/lego) ・LE認証方式 DNS-01: 対象ドメインのサブドメインに指定の文字列をTXTレコードに登録しそれ で認証を行うこと
LEの制限 ・同一ドメインの証明書発行は1週間に20個まで! ・下記はすべて同一ドメイン example.com sand.example.com api1.sand.example.com api2.sand.example.com
サブドメインがたくさんある場合は ・SANs(Subject Alternative Names)を使用する 1つの証明書で複数のドメインが対応できる example.com.crt -> example.com -> sand.example.com
-> api1.sand.example.com -> api2.sand.example.com 1つの証明書が いろんなドメインで使 いまわせる!
この仕組みの限界ドメイン数 ・SANsの上限は100ドメインまで ・週に20個まで証明書発行が可能 ・証明書の期限が3ヶ月 ・100 * 20 * 12(week) =
24,000ドメインまで行ける!
この仕組みのいいところ ・DNS認証なのでサーバーのIP制限を気にしなくていい ・発行と更新が同じ仕組みなので、 クライアントは証明書をダウンロードするだけでいい ・Jenkinsに発行/更新を集約しているので 更新スケジュールをコントロールしやすい
まとめ ・証明書はLet’s Encryptでさくっと作れる ・証明書の発行/更新は自動化できる ・大量のサブドメインがある場合はSANsで対応
ワイルドカード来るってよ
Let’s Start https!!