Allow HTTPS for WebSub hub topic operations from gateway-controller

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
47/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
api, backend

調査の方向性

Start with gateway/gateway-controller/pkg/utils/api_deployment.go and trace how the router's WebSub hub listener ports and HTTPS settings are configured. Then read EventGatewayConfig.Validate() and the related configuration and tests to see how options are loaded and checked. Done means the scheme, port and CA settings are covered, HTTPS verifies the router certificate, and invalid or disabled HTTPS configurations are rejected.

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

説明

Aspect/Other Type/Improvement
Please select the area the issue is related to

Gateway, Event Gateway

Please select the aspect the issue is related to

Aspect/Other (Anything else which does not match above categories)

Suggested Improvement

The gateway-controller registers and deregisters WebSub hub topics by sending a request to the router's internal WebSub hub listener. The URL's scheme is hard-coded to http:

// gateway/gateway-controller/pkg/utils/api_deployment.go
targetURL := fmt.Sprintf("http://%s:%d/websubhub/operations", webSubHubHost, webSubPort)

The router already exposes an HTTPS version of this internal listener on port 8446 (WEBSUB_HUB_INTERNAL_HTTPS_PORT) when HTTPS is enabled. Because the scheme is fixed, the controller can't use it. Deployments that want this traffic over TLS have no supported way to do that, for example when the controller and router run as separate containers or pods instead of sharing localhost.

Proposed Change
  1. Add a config option under router.event_gateway that selects the scheme, e.g. websub_hub_listener_scheme = "http" | "https". Default to http so existing deployments behave the same.
  2. When it's set to https:
    • Build the target URL with https:// and default the port to 8446 unless one is configured.
    • Use an HTTP client whose TLS settings trust the router's certificate. Allow a configurable CA bundle, and don't skip certificate verification.
  3. Validate the new option in EventGatewayConfig.Validate(). Reject unknown schemes, and reject https when the router's HTTPS listener isn't enabled.
Related Issues

No response

主要言語
Go
スター
85
フォーク
137
平均マージ
1日 12時間
マージ済み PR(30日)
247

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

wso2/api-platform のほかの issue

wso2/api-platform の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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