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
社内の全環境をhttpsにした話
Search
Morix
October 28, 2017
Technology
1.9k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
社内の全環境をhttpsにした話
Created by Shota Omori(@morix1500)
2017-10-28 Rakuten Technology Conference LT
Morix
October 28, 2017
Transcript
22 slides
社内の全環境を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!!
More Decks by Morix
See All by Morix
AIでAIをテストする - 音声AIエージェントの品質保証戦略
morix1500
1
870
入社後SREチームのミッションや課題の整理をした話
morix1500
1
670
[EC2からKubernetes]楽天ラクマのコンテナ化の歩み
morix1500
27
11k
AWS EKSでClusterAutoscalerを使うときはNodeGroupの分け方に気をつけろ!
morix1500
0
1.1k
FirebaseとNetlifyを使ってサーバーレスでサービスを作った話
morix1500
2
3.1k
オーバーロードで学んだチームマネジメント / Team management learned through overlord
morix1500
1
2.3k
転職をする前にやっておきたいこと / What you want to do before you change your career
morix1500
0
4.2k
自分を強くするためにやってきたこと
morix1500
7
2.8k
個人事業主になりたい!どうやって?調べてみよう!
morix1500
1
480
Other Decks in Technology
See All in Technology
Datadog の権限統制 〜Org 統合に向けて調べた注意点 / JDDUG-Meetup_24
visional_engineering_and_design
1
190
アラートを見直していたら営業組織への理解にちょっとだけ繋がった話
z63d
1
210
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
130
市販IoT機器や自作IoT機器とHomeAssistantを駆使して家の電気代をできる限り見える化する方法の考案
harutiro
0
390
[関西Kaggler会 20261113] 続・コミュニティコンペのススメ
nejumi
0
150
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
3
250
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
720
ノードが消える前提で設計する!Karpenterで金融システムを止めないためのノウハウ大全
daitak
1
110
変更差分を読むために環境を整備しよう
pipepasta
1
470
CloudTrail を推したい
kazzpapa3
1
140
こんなに変わった! AWSネットワークの常識
shotashiratori
16
11k
飯から始まるデータエンジニア
sansantech
PRO
0
110
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Practical Orchestrator
shlominoach
192
12k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
Building AI with AI
inesmontani
PRO
1
1.4k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
380
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
460
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Discover your Explorer Soul
emna__ayadi
2
1.3k