goauthentik / goauthentik/authentik
Change default for email StartTLS
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 644
Description
**Is your feature request related to a problem? Please describe.**
The variables `AUTHENTIK_EMAIL__USE_TLS` and `AUTHENTIK_EMAIL__USE_SSL` default to `false`, as does the [docker compose](https://github.com/goauthentik/authentik/blob/main/website/docs/install-config/install/docker-compose.mdx#email-configuration-optional-but-recommended) configuration and [helm chart](https://github.com/goauthentik/helm/blob/main/charts/authentik/values.yaml#L172). This means that a user configuring email by default sends unencrypted credentials across the network.
This affected me, because I copied the defaults and just entered the necessary email credentials. Using Amazon SES, I was sending these credentials over the public internet, as confirmed by doing a `tcpdump`. SES actually responds with "Must issue a STARTTLS command first", but at that point it's too late, as the `AUTH PLAIN` command has sent the username & password already. Yes, that means emails never worked for me, I just didn't notice since this is a homelab instance with just me as a user.
**Describe the solution you'd like**
I understand that changing the default internally might cause problems as it could break existing setups. However, I think updating the defaults also promotes better security practices. I believe for the docker-compose file this could simply be changed in the documentation, as existing users won't be affected. For the helm chart, it could be a breaking change on the next major upgrade when breaking changes will be made anyway.
**Describe alternatives you've considered**
The documentation could just include a warning about this, though I would suggest that's very easy to miss and secure by default would be better.
Alternatively, the application could reject unencrypted communication over non-RFC1918 IPs, but that seems brittle and hard to predict.
Contributor guide
Assessment
This issue has not been assessed yet.