Reload the TLS certificate without a restart

オープン
#438 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
backend, security

調査の方向性

Start with cmd/fanout/main.go and internal/server/http.go to trace how TLS is configured, then read internal/server/clientca.go and the TLS guide at site/src/content/docs/docs/guides/tls.mdx. Check the existing server tests for certificate loading and connection behavior. Done when the acceptance criteria pass, including keeping the last good certificate on invalid or mismatched file updates, and the TLS guide explains the client CA restart requirement.

索引モデルが issue の本文から書いたものです。

説明

What

Fanout reads FANOUT_TLS_CERT_FILE and FANOUT_TLS_KEY_FILE once, through ListenAndServeTLS, so a renewed certificate needs a restart. A restart interrupts ingest on a single-node product, and anyone renewing with certbot or a similar tool hits this at every renewal.

Serve the certificate through a tls.Config.GetCertificate callback that picks up changed files, with no new settings.

Acceptance criteria

  • A new handshake uses the renewed certificate after the files change, with no restart
  • Existing connections, including long-lived gRPC streams, are not dropped by a reload
  • A partial or invalid pair on disk keeps the last good certificate and logs an error that names the path, never file contents
  • A cert and key written at slightly different times never produce a mismatched pair
  • Startup still fails on an unreadable or invalid pair
  • TLS 1.3, ALPN h2, and FANOUT_TLS_CLIENT_CA_FILE behave as before
  • The file check does not add file reads to every handshake without a bound
  • TLS guide updated, including that the client CA bundle still needs a restart

References

  • cmd/fanout/main.go (ListenAndServeTLS)
  • internal/server/http.go
  • internal/server/clientca.go
  • site/src/content/docs/docs/guides/tls.mdx

One pull request. Use the latest stable version of any dependency added, verified against its registry and pinned exactly.

主要言語
Go
スター
11
フォーク
0
平均マージ
7時間 5分
マージ済み PR(30日)
112

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

labstack/fanout のほかの issue

labstack/fanout の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。