-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Redis TLS Connection #12041
Comments
A little update:First of all, I forgot to mention that I tried combining 3 certificates into one pem file, but that does not work. Second, although my workaround works for Authentik server itself, it does not work for parts of authentik written in GO like outposts for example. Authentik server uses python to connect to Redis, outposts, on the other hand, are written in GO Lang, which complicates things even worse. While Authentik server simply append the contents of the TLS Config to connection URL, outposts actually load the file from the path specified in the config, which causes an error that file "/secrets/redis-tls/ca.crt&ssl_keyfile=/secrets/redis-tls/tls.key&ssl_certfile=/secrets/redis-tls/tls.crt" does not exist for obvious reasons. authentik/internal/outpost/proxyv2/application/session.go Lines 47 to 62 in 4b5e66f
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
My Redis server requires client TLS certificates. As of now the authentik and helm chart support CA certificate but I also need to include private key and certificate.
In addition, according to redis python library docs,
ssl_certfile
andssl_keyfile
should be included - linkError from logs:
Version and Deployment (please complete the following information):
Additional context
I created a simple script to test if the lack of key and certificate would cause the same error and it does.
The above gives me the same error:
However, if I add the missing files, everything will work
Proposed Resolution
If I am correct, config.py file needs fixing and also helm chart.
authentik/authentik/lib/config.py
Lines 319 to 336 in 6702f34
If you approve, I can try to work on this over the weekend.
Tasks
Workaround
The simplest workaround I could think of is to add required TLS files into query string. Since
AUTHENTIK_REDIS__TLS_CA_CERT
variable is only used for concatenation of the Redis url, simply addssl_keyfile
ssl_certfile
after theca_certs
file, and point them to the mounted secrets.This is an example for helm chart to deploy Authentik to Kubernetes. Update your
values.yaml
accordingly(this is not a valid nor full config)Using this approach, I was able to deploy Authentik.
The text was updated successfully, but these errors were encountered: