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

Send intermediate certificates for API requests #1617

Open
alethiophile opened this issue Oct 16, 2024 · 3 comments
Open

Send intermediate certificates for API requests #1617

alethiophile opened this issue Oct 16, 2024 · 3 comments

Comments

@alethiophile
Copy link

I've got the client API set up to use HTTPS, and I've gotten a certificate from LetsEncrypt to make it visible globally. The certificate is in the client.crt file, and that part works fine.

That certificate file contains the intermediates for LetsEncrypt that tie it to the certificate root. However, hydrus is only serving the first certificate, not the full chain. This means that many clients -- notably including the Python requests/urllib libraries used by hydownloader et al. -- can't verify the certificate. (It still works fine in a Web browser, presumably because they go to find the intermediates on their own.)

Would it be possible to make Hydrus provide the full certificate chain when there's more than one certificate in client.crt?

@floogulinc
Copy link
Collaborator

I'd highly recommend just using a reverse proxy that handles https well like caddy rather than relying on hydrus. (Also I wouldn't expose the hydrus API to the public Internet in general).

@alethiophile
Copy link
Author

It's actually on a Tailscale VPN, which offers LetsEncrypt certificates for ease of browser use.

I'd been hoping to avoid setting up a reverse proxy on this machine, but I guess that probably is the quickest way.

@floogulinc
Copy link
Collaborator

If you're using tailscale you can use the built in reverse proxy: https://github.com/floogulinc/hydrus-web/wiki/Accessing-the-Hydrus-API-with-Tailscale-Serve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants