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
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
350
[EC2からKubernetes]楽天ラクマのコンテナ化の歩み
morix1500
16
6.1k
AWS EKSでClusterAutoscalerを使うときはNodeGroupの分け方に気をつけろ!
morix1500
0
850
FirebaseとNetlifyを使ってサーバーレスでサービスを作った話
morix1500
2
2.9k
オーバーロードで学んだチームマネジメント / Team management learned through overlord
morix1500
1
2.1k
転職をする前にやっておきたいこと / What you want to do before you change your career
morix1500
0
3.9k
自分を強くするためにやってきたこと
morix1500
7
2.5k
個人事業主になりたい!どうやって?調べてみよう!
morix1500
1
410
負荷試験入門
morix1500
0
1.3k
Other Decks in Technology
See All in Technology
PO初心者が考えた ”POらしさ”
nb_rady
0
190
OPENLOGI Company Profile
hr01
0
67k
論文紹介:LLMDet (CVPR2025 Highlight)
tattaka
0
310
生成AI時代の開発組織・技術・プロセス 〜 ログラスの挑戦と考察 〜
itohiro73
1
440
ビズリーチが挑む メトリクスを活用した技術的負債の解消 / dev-productivity-con2025
visional_engineering_and_design
3
6.9k
Tech-Verse 2025 Keynote
lycorptech_jp
PRO
0
1.9k
Zephyr RTOSを使った開発コンペに参加した件
iotengineer22
1
200
生成AI開発案件におけるClineの業務活用事例とTips
shinya337
0
240
Lazy application authentication with Tailscale
bluehatbrit
0
180
整頓のジレンマとの戦い〜Tidy First?で振り返る事業とキャリアの歩み〜/Fighting the tidiness dilemma〜Business and Career Milestones Reflected on in Tidy First?〜
bitkey
2
15k
OPENLOGI Company Profile for engineer
hr01
1
34k
事業成長の裏側:エンジニア組織と開発生産性の進化 / 20250703 Rinto Ikenoue
shift_evolve
PRO
2
20k
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
How to train your dragon (web standard)
notwaldorf
94
6.1k
The Language of Interfaces
destraynor
158
25k
Why Our Code Smells
bkeepers
PRO
336
57k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Being A Developer After 40
akosma
90
590k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
A Modern Web Designer's Workflow
chriscoyier
694
190k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Become a Pro
speakerdeck
PRO
29
5.4k
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!!