-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bind port 8096 to 127.0.0.1 #3453
Conversation
CloudStack provides CloudStack API Unauthenticated Access through port 8096. It should not be open to the Internet in any case. If (for some reason) this port gets on the wrong "hands" it could be really serious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM based on code
Port 8096 is disabled by default, it's purpose is for testing CloudStack only. This means if the test client/code is not on the mgmt server host then this PR will block any existing testing frameworks or CI systems that assume the previous behaviour since 4.0. I'm +0 on this PR and have concerns that this may break test and CI systems that assume the old behaviour. @PaulAngus @andrijapanic does Trillian depend on unauthenticated port? I'll check Travis for simulator. @blueorangutan package |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-71 |
@blueorangutan test |
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
@rhtyd port 8096 is not disabled by default. Is there a configuration to disable port 8096? In case we need for tests then I can add on this fix a configuration key to set an IP address to bind with 8096. |
@GabrielBrascher yes, set integration.api.port to 0 to disable it. |
You can also change the unauthenticated port via integration.api.port |
@rhtyd This is weird. Something broke this configuration then. I have it disabled on test environments and I am still able to access the API through 8096. |
@GabrielBrascher tested on 4.11.3.0 rc2, works for me. Do restart if you change setting, this is only enabled with mvn developer mode. On prod or installations this is disabled by default. |
It worked after restarting. Hoever, it was enabled by default. Tested on 4.12 and 4.13-snapshot test environments (some updated from 4.9 -> 4.11 -> 4.12, some installed from scrach with 4.12). |
@GabrielBrascher was it a maven deployed system or installed via rpm/deb packages? It comes disabled by default unless something changed in master or 4.12. |
I think it's not an issue, Can you close this PR and the issue @GabrielBrascher? |
@rhtyd I will close this PR for now then, thanks for the feedback. |
Description
CloudStack provides CloudStack API Unauthenticated Access through port 8096. It should not be open to the Internet in any case. If this port is not properly blocked by a firewall it could be really serious.
Fixes: #3450
Types of changes
How Has This Been Tested?
Using 8080:
http://public.ip.address.acs:8080/client/api?command=listClusters&response=json&listAll=true&page=1&pagesize=20&_=1556128046728
Using 8096:
Before the fix
http://public.ip.address.acs:8096/client/api?command=listClusters&response=json&listAll=true&page=1&pagesize=20&_=1556128046728
With the fix
I was able to retrieve the clusters of the zone only when seding the API call via 127.0.0.1 IPv4 address.