email: require STARTTLS and check the SMTP server identity (configurable) #73
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/support#73
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
email/.../impl/apache/CommonsEmailNotificationService.scala:27callssetStartTLSEnabled(true)only. Commons Email then uses STARTTLS when the server offers it and silently falls back to plain text when it does not (a downgrade an attacker on the path can force). The server certificate's host name is not checked.SMTPConfighas no setting for either.MEDECA (production:
mail.cmi.cz:587, authenticated with SMTP_USERNAME/SMTP_PASSWORD) must state encrypted communication between components to its client (ČMI acceptance of MEDH-158, finding 4), so the credentials must never travel in plain text.Proposal
SMTPConfig: addsmtp.starttls.required(Boolean) andsmtp.ssl.checkServerIdentity(Boolean). Default both totrueon port 587; keepfalsepossible for local mock/dev servers on port 25 without TLS.CommonsEmailNotificationService:setStartTLSRequired(...)andsetSSLCheckServerIdentity(...)from the config.required = true, sending fails with a clear error instead of sending in plain text.Related: SUPP-72 (CSRF token in the JS client, Secure session cookie).