Skip to content

Remove plain HTTP port 9022 and non-TLS code paths - #5588

Merged
WeiQuan0605 merged 2 commits into
mainfrom
remove-non-tls-port-9022
Nov 20, 2026
Merged

WeiQuan0605 merged 2 commits into
mainfrom
remove-non-tls-port-9022

Conversation

@WeiQuan0605

@WeiQuan0605 WeiQuan0605 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
  • A short explanation of the proposed change:
    Removes the plain HTTP port 9022 listener and all associated non-TLS code paths from Cloud Controller. This includes deleting the deprecated GET /internal/v2/droplets/ endpoint, simplifying DropletUrlGenerator to always emit mTLS/v4 URLs, switching LocalUrlGenerator from HTTP (port 9022) to HTTPS (tls_port), removing dead HTTP upload URL methods, simplifying StagingJobPresenter to always build HTTPS status URLs, and making external_port optional in the worker/clock/deployment-updater schemas. Documentation updated accordingly.

  • An explanation of the use cases your change solves
    Port 9022 is a plain HTTP endpoint only accessible within the CF network. It violates the mTLS-only internal communication policy. All known consumers have either already migrated to the mTLS endpoint (port 9023) or are in the process of doing so. Removing it reduces the attack surface and eliminates a class of unencrypted internal traffic.

  • Links to any other associated PRs

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@WeiQuan0605
WeiQuan0605 marked this pull request as ready for review November 10, 2026 12:47
jochenehret
jochenehret previously approved these changes Nov 12, 2026
Removes the non-TLS (port 9022) endpoint and all associated code:

- Delete GET /internal/v2/droplets/ endpoint (DownloadDropletsController)
- Simplify DropletUrlGenerator to always emit mTLS/v4 URLs; drop external_port and mtls params
- Switch LocalUrlGenerator from http_basic_auth_uri (port 9022) to https_no_auth_uri (tls_port)
- Remove http_basic_auth_uri, http_no_auth_uri, build_http_uri from UrlGeneratorHelpers
- Remove http_droplet_upload_url and http_buildpack_cache_upload_url from UploadUrlGenerator
- Simplify StagingJobPresenter to always build the HTTPS/tls_port status URL; drop scheme param
- Remove blobstore_external_port and mtls from blobstore URL generator connection options
- Make external_port optional in worker/clock/deployment_updater schemas (api_schema retains it as required for the Puma process)
- Update docs/internal/README.md: remove port 9022 listener row, fix SSH access routing, remove deprecated /internal/v2/droplets/ section
LocalUrlGenerator was switched to https_no_auth_uri (no credentials),
but the staging endpoints it targets (/staging/*, /v2/buildpacks/*/download)
still enforce basic auth in-app. Diego passes these URLs directly to
DownloadAction/CachedDependency without adding credentials, so unauthenticated
URLs would 401 on every local-blobstore staging fetch.

Add https_basic_auth_uri to UrlGeneratorHelpers and use it in LocalUrlGenerator
so the URLs carry credentials over HTTPS, matching the old HTTP behaviour
but on tls_port instead of the removed port 9022.
@WeiQuan0605
WeiQuan0605 merged commit c6d269b into main Nov 20, 2026
18 of 19 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Nov 20, 2026
Changes in cloud_controller_ng:

- Remove plain HTTP port 9022 and non-TLS code paths
    PR: cloudfoundry/cloud_controller_ng#5588
    Author: Wei Quan <64415962+WeiQuan0605@users.noreply.github.com>
@moleske
moleske deleted the remove-non-tls-port-9022 branch November 20, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants