SSL, Hitch, & the API #490
-
Currently the Hitch config allows for TLS with regards to NetBox Docker deployments, BUT it does not send headers to NetBox telling it that their is a secure proxy in front of it. IE API links returned by NetBox API will continue to show http in the url. From the Hitch documentation:
We need a to setup a HTTP Proxy to signal to NetBox in the header that the forwarded protocol is https I threw this discussion up so we can find the simplest configuration for the community. Potential URLs: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
I think we should also look at Caddy. It has automatic certificate management. |
Beta Was this translation helpful? Give feedback.
-
Here is what I propose we add to the wiki to replace the current hitch setup: # Caddyfile netbox.example.com, netbox.prod.example.com { # This line should match your allowed hosts reverse_proxy netbox:8080 # The reverse_proxy endpoint should point to the name of the netbox docker container encode gzip zstd tls /root/certs/cert.crt /root/certs/key.key # Can also combine cert and key into a pem log { level error } } # docker-compose.override.yml services: # ... Include your normal override config but add the tls service & update the existing netbox service to include "expose: ["8080"] netbox: expose: - 8080 tls: image: caddy:2-alpine depends_on: - netbox volumes: - ./certs:/root/certs:z # Change the ./certs to wherever you place your certificate & key files - ./Caddyfile:/etc/caddy/Caddyfile # Change the ./Caddyfile to wherever you place your Caddyfile ports: - 80:80 # Allows for http redirection - 443:443 I welcome feedback to help minimize confusion for people in the wiki. Caddy also can grab Let's Encrypt certificates automatically when providing an email instead. That just might confuse things. |
Beta Was this translation helpful? Give feedback.
-
Feel free to tweak the wording. WIKI - TLS History - Replace Hitch with Caddy I hope did not confuse people with the Let's Encrypt & ZeroSSL auto certificate setup. I hope people do not start opening tickets with this project for connectivity (firewall/proxy) issues from their corporate environment to the required CAs. It may be good to just remove that part in favor of just mkcert. |
Beta Was this translation helpful? Give feedback.
I think we should also look at Caddy. It has automatic certificate management.