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

webserver nginx proxy config incorrect #1082

Open
chriswue opened this issue Jul 23, 2023 · 1 comment
Open

webserver nginx proxy config incorrect #1082

chriswue opened this issue Jul 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@chriswue
Copy link

Describe the bug

When running the official clearml docker image with the webserver argument then an nginx instance is spun up. The proxy config rewrites /api paths to forward to the apiserver instance. As part of that it sets the proxy forward Host header to $host which is incorrect because $host refers to the original Host header or original server name (http://nginx.org/en/docs/http/ngx_http_core_module.html#var_host). Instead the variable $proxy_host should be used.

Why is this important: We have ClearML deployed as an Azure Container App and the ingress controller will see a request that goes to the IP of the apiserver container but with a Host header of the webserver and will deny access with a 403.
Setting the header like this instead: proxy_set_header Host $proxy_host; solves this problem.

I suspect that this wasn't noticed until now because in a docker-compose environment there is no ingress controller that performs sanity checking an the apiserver doesn't care about the Host either.

Environment

  • Server type (self hosted \ app.clear.ml): self-hosted via Azure Container Apps
  • ClearML SDK Version: N/A
  • ClearML Server Version (Only for self hosted). 1.11.0-373
  • Python Version: 3.9
  • OS (Windows \ Linux \ Macos): Linux
@chriswue chriswue added the bug Something isn't working label Jul 23, 2023
@chriswue
Copy link
Author

Sorry, I should probably raise these issues against the clearml-server repo. Closing this in favor of allegroai/clearml-server#209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant