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

Service returning Error 500 #3

Open
linus0508 opened this issue Dec 30, 2024 · 2 comments
Open

Service returning Error 500 #3

linus0508 opened this issue Dec 30, 2024 · 2 comments
Assignees

Comments

@linus0508
Copy link

linus0508 commented Dec 30, 2024

After deploying the docker container the service starts as aspected and the webpage is generated.
Bildschirmfoto 2024-12-30 um 12 48 45

On trying to download the public key or generating a shared secrets the web server returns an error 500.
Bildschirmfoto 2024-12-30 um 12 48 55

Most likely an issue on my end but would love to get some help (and maybe add the solution to the documentation :))

@linus0508
Copy link
Author

There seems to be a problem in building & deploying through portainer - possibly some env variables are not handled correctly. When deploying through bare docker everything is working fine! Will investigate further where the problem lies (except Layer 8) and report back for other users :)

Question for @yahesh: Is it expected that the container takes around 10 minutes before actually generating the key? (Still not testes if this persists when giving a key instead of generating it).

Thanks for your great project! Really like the idea and implementation!

@yahesh
Copy link
Owner

yahesh commented Dec 31, 2024

@linus0508 The container does not generate the private key itself. Instead, it has to be generated and provided externally (see here). In the Container Run example (see here) it is transparently generated and passed to the container as an environment variable.

Mind the note below that example:

"Beware: In the example provided above the RSA_PRIVATE_KEYS environment variable is dynamically generated during each execution. In a production setup you want to manually define the RSA keys and manage key rollovers carefully."

The private key is required to retrieve generated secrets. So transparently generating the private key is not a good idea if old(er) secrets shall be readable after a container update. Instead, that private key should be managed elsewhere and only be provided to the container when running it.

P.S.: The only key material the container generates itself are custom Diffie-Hellman parameters for TLS. This can indeed take a while. If you handle TLS externally, you can skip the generation by passing the SKIP_DHPARAM environment variable as well.

@yahesh yahesh self-assigned this Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants