cloudfoundry / cloudfoundry/cloud_controller_ng
Deprecate "staging_upload_user" and "staging_upload_password"
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 207
- Forks
- 373
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 56
Description
Issue
Deprecate the staging.auth.user and staging.auth.password credentials. They are used to protect some internal endpoints, but those have been secured with mTLS in the meantime.
Background: We need to ensure that all passwords are rotated regularly. We've enabled a password rotation and detected no downtimes for cf push or any other operation. If the credentials are not really used anymore, it would of course be better to remove them entirely.
Context
The staging_upload_user/staging_upload_password are used to protect the following endpoints with basic authentication:
-
GET /staging/packages/:guid
https://github.com/cloudfoundry/cloud_controller_ng/tree/main/docs/internal#get-stagingpackagesguid -
GET /staging/v3/droplets/:guid/download
https://github.com/cloudfoundry/cloud_controller_ng/tree/main/docs/internal#get-stagingv3dropletsguiddownload -
GET /staging/v3/buildpack_cache/:stack/:app_guid/download
https://github.com/cloudfoundry/cloud_controller_ng/tree/main/docs/internal#get-stagingv3buildpack_cachestackapp_guiddownload
The three endpoints above are only used for the "NFS server mounted on the CC" scenario. Is this still a supported setup?
GET /staging/jobs/:guid
https://github.com/cloudfoundry/cloud_controller_ng/blob/ec8558268aa59131580a050f8870b8a5f5f69c57/app/presenters/api/staging_job_presenter.rb
Looks like dead code as the http scheme is not used anymore.
GET /v2/buildpacks/:guid/download
https://github.com/cloudfoundry/cloud_controller_ng/tree/main/docs/internal#get-v2buildpacksguiddownload
https://github.com/cloudfoundry/cloud_controller_ng/blob/ec8558268aa59131580a050f8870b8a5f5f69c57/app/controllers/runtime/buildpack_bits_controller.rb#L10
Not in use anymore as Diego downloads directly from blobstore?
blobstore_url_generator
https://github.com/cloudfoundry/cloud_controller_ng/blob/ec8558268aa59131580a050f8870b8a5f5f69c57/lib/cloud_controller/dependency_locator.rb#L190
This function is used in different places:
https://github.com/cloudfoundry/cloud_controller_ng/blob/ec8558268aa59131580a050f8870b8a5f5f69c57/app/controllers/runtime/stagings_controller.rb
-> no use of blobstore_url_generator
https://github.com/cloudfoundry/cloud_controller_ng/blob/ec8558268aa59131580a050f8870b8a5f5f69c57/app/controllers/internal/download_droplets_controller.rb#L17
For internal endpoint GET /internal/v4/droplets/:guid/:droplet_checksum/download:
https://github.com/cloudfoundry/cloud_controller_ng/tree/main/docs/internal#get-internalv4dropletsguiddroplet_checksumdownload
-> in use, but without basich auth?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with config/cloud_controller.yml at the staging credentials and trace their uses through the listed staging, buildpack, droplet, and blobstore endpoints, including lib/cloud_controller/dependency_locator.rb and the referenced controllers and presenter. Confirm whether the NFS-mounted CC setup and each endpoint remain supported, then define the deprecation or removal scope and update the affected documentation and behavior accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, backend, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100