Skip to content

Require authentication when changing broker URL origin - #5477

Open
WeiQuan0605 wants to merge 1 commit into
cloudfoundry:mainfrom
sap-contributions:fix-url-origin-auth-required
Open

WeiQuan0605 wants to merge 1 commit into
cloudfoundry:mainfrom
sap-contributions:fix-url-origin-auth-required

Conversation

@WeiQuan0605

Copy link
Copy Markdown
Contributor
  • A short explanation of the proposed change:
    Add a validation in ServiceBrokerUpdate#enqueue_update that rejects a URL-only PATCH request when the new URL has a different origin (scheme + host + port) from the current broker URL, unless authentication is also provided in the same request.

  • An explanation of the use cases your change solves
    A SpaceDeveloper with access to a space-scoped broker could send PATCH /v3/service_brokers/:guid with only a new url pointing to an attacker-controlled server. Cloud Controller would preserve the old Basic credentials and send them to the new URL during the background catalog sync job, leaking the broker credentials to the attacker before any rollback could occur.

    This fix prevents the credential exfiltration by requiring authentication to be re-supplied whenever the broker URL origin changes.

  • 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

@jochenehret jochenehret left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on a bbl env, works.

This branch has not been deployed

No deployments
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