Obtain and renew certificates automatically with ACME

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

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

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

評価

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

調査の方向性

Start with cmd/fanout/main.go, internal/server/http.go, and internal/config/config.go to trace TLS configuration and how the HTTP, MCP, OTLP/HTTP, and gRPC services share the listener. Check the existing TLS tests and identify how to run a local ACME test server. Done means the acceptance criteria pass, including renewal, error handling, and the documentation updates.

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

説明

What

Direct TLS requires bringing your own certificate today, so most public installs need Caddy or nginx in front. Add built-in ACME so one setting gives a single binary real HTTPS.

Use golang.org/x/crypto/acme/autocert with the TLS-ALPN-01 challenge, which runs on the existing port 443 listener and needs no port 80. Settings are something like FANOUT_TLS_ACME_DOMAIN and FANOUT_TLS_ACME_EMAIL. Certificates are cached under the data directory.

Acceptance criteria

  • With the ACME settings and a publicly reachable :443, Fanout obtains a certificate and serves HTTPS, API, MCP, OTLP/HTTP, and gRPC on the one listener
  • Certificates renew with no restart and no dropped connections
  • The host policy accepts only the configured domain
  • The cached account key and certificates are stored with owner-only permissions and survive restarts
  • Startup fails with an error naming the settings when ACME is combined with FANOUT_TLS_CERT_FILE, FANOUT_TLS_KEY_FILE, or FANOUT_TLS_CLIENT_CA_FILE; requiring client certificates would fail the ACME challenge handshake
  • Startup fails with a clear error when the listener is not on port 443
  • A failed issuance is logged with the reason and retried with backoff, without rate-limit loops
  • Tests run against a local ACME test server, with no calls to a public certificate authority
  • Configuration reference, TLS guide, and backup docs updated, including that the cache belongs to the data directory

References

  • cmd/fanout/main.go
  • internal/server/http.go
  • internal/config/config.go
  • site/src/content/docs/docs/guides/tls.mdx
  • RFC 8737: ACME TLS-ALPN-01

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 を短くまとめたダイジェスト。