Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API access broken on v280.1.11 on using hostname. Host header blocked. #2587

Closed
renelehmann opened this issue Nov 28, 2024 · 3 comments
Closed
Assignees

Comments

@renelehmann
Copy link

After an update to bosh v280.1.11, login to the bosh-director is not possible on using the hostname.

With calling the director API /info endpoint on using the hostname url it shows the same error:
curl https://bosh-bosh.service.consul:25555/info
Host not permitted

On the bosh vm itself all monit jobs are running in a healthy state and a local curl to the API
is accepted and looks fine:

bosh/65ff9923-5195-4335-99a0-30ee807588b3:~# curl -k https://localhost:25555/info
{"name":"bosh-bosh","uuid":"2413ef39-947a-47f9-b16b-d61c4e5ed8c5","version":"280.1.11 (00000000)","user":null,"cpi":"vsphere_cpi","stemcell_os":"-","stemcell_version":"1.639","user_authentication":{"type":"uaa","options":{"url":"https://bosh-bosh.service.consul:8443/","urls":["https://bosh-bosh.service.consul:8443/"]}},"features":{"local_dns":{"status":true,"extras":{"domain_name":"bosh"}},"snapshots":{"status":false},"config_server":{"status":true,"extras":{"urls":["https://bosh-bosh.service.consul:8844/api/"]}}}}

Also calling the endpoint on using the bosh VM IP is succesful.
curl https://1.2.3.4:25555/info

Comparing to bosh v280.1.10, the behaviour with the same call on using the hostname is successful:

curl https://bosh-bosh.service.consul:25555/info
{"name":"bosh-bosh","uuid":"2413ef39-947a-47f9-b16b-d61c4e5ed8c5","version":"280.1.10 (00000000)","user":null,"cpi":"vsphere_cpi","stemcell_os":"-","stemcell_version":"1.639","user_authentication":{"type":"uaa","options":{"url":"https://bosh-bosh.service.consul:8443/","urls":["https://bosh-bosh.service.consul:8443/"]}},"features":{"local_dns":{"status":true,"extras":{"domain_name":"bosh"}},"snapshots":{"status":false},"config_server":{"status":true,"extras":{"urls":["https://bosh-bosh.service.consul:8844/api/"]}}}}

This issue was discussed on slack:

https://cloudfoundry.slack.com/archives/C02HPPYQ2/p1732707019069449

Initial investigations show the cause in the Sinatra version used, which was fixed for a CVE.

@rajathagasthya
Copy link
Contributor

We added a fix for this in f853c0b. This should allow hostnames again.

@selzoc
Copy link
Member

selzoc commented Dec 6, 2024

@renelehmann we believe this is fixed as of https://github.com/cloudfoundry/bosh/releases/tag/v280.1.12, can you verify?

Thanks,
Chris

@renelehmann
Copy link
Author

@rajathagasthya, @selzoc Thanks for fixing, implementing and the notification.
Tested v280.1.12 and all just works fine again.

@github-project-automation github-project-automation bot moved this from Pending Merge | Prioritized to Done in Foundational Infrastructure Working Group Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants