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

Add direct TLS support #469

Closed
mperham opened this issue Feb 14, 2024 · 2 comments
Closed

Add direct TLS support #469

mperham opened this issue Feb 14, 2024 · 2 comments

Comments

@mperham
Copy link
Collaborator

mperham commented Feb 14, 2024

TLS is too hard to setup currently and the docs are broken.

Plan

  1. Faktory will look for /etc/faktory/conf.d/private.key and /etc/faktory/conf.d/public.crt and, if found, activate TLS. Users should create soft links from wherever TLS certs are stored into Faktory's config directory.
  2. Certificates should be reloaded upon HUP and the server socket reopened so new connections will use the new TLS certs. Existing connections will continue to run with their existing TLS session. As workers are restarted, those old connections will go away.
@mperham
Copy link
Collaborator Author

mperham commented Feb 14, 2024

    err := http.ListenAndServeTLS(":443", "public.crt", "private.key", nil)

These two files must be an X509 pair and are processed by https://pkg.go.dev/crypto/tls#LoadX509KeyPair.

@mperham
Copy link
Collaborator Author

mperham commented Feb 15, 2024

Keep in mind if this doesn't work for you, there's a million other ways to add TLS "in front of" Faktory. HAProxy, stunnel, or any number of other proxies can provide public TLS and forward unencrypted traffic to Faktory privately.

@mperham mperham closed this as completed May 20, 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

1 participant