Skip to content

WPB-27175: Add Galley meetings email config plumbing - #5346

Merged
blackheaven merged 6 commits into
developfrom
gdifolco/WPB-27175-meeting-address
Jul 24, 2026
Merged

WPB-27175: Add Galley meetings email config plumbing#5346
blackheaven merged 6 commits into
developfrom
gdifolco/WPB-27175-meeting-address

Conversation

@blackheaven

Copy link
Copy Markdown
Contributor

https://wearezeta.atlassian.net/browse/WPB-27175

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@blackheaven
blackheaven requested review from a team as code owners July 20, 2026 06:49
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jul 20, 2026
Comment thread charts/wire-server/values.yaml Outdated
# # smtpConnType: tls
# # smtpCredentials:
# # smtpUsername: meetings
# # smtpPassword: /etc/wire/galley/secrets/smtp-password.txt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why this needs to be configurable? Are there real alternative values for smtpPassword?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure to get this right:

  • It's how it is done in Brig (we could discuss if it is the right way to do)
  • We will need it to configure a dedicated email address for Wire Meetings emails

Please let me know if one of these answer to your question.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion 馃槄

There are a couple of separate things:

  • I would argue that there is little value in being able to set this path, because it is determined by the way the secret is mounted. However, we could keep this aligned to brig's code, as two ways for one thing would be confusing as well 馃槄 Also, we should probably not change existing Helm values without consulting the downstream teams first... 馃
  • I cannot spot the usage of smtpCredentials.smtpPassword. Could it be that there is some ConfigMap change missing?
  • This still seems to be asymmetric to brig, because for brig's values this is called passwordFile and then used in the ConfigMap like:
          {{- if .smtp.username }}
          smtpCredentials:
            smtpUsername: {{ .smtp.username }}
            smtpPassword: {{ .smtp.passwordFile }}
          {{- end }}
    
    ( )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have aligned on Brig, let me know what you think.

@blackheaven blackheaven changed the title [WPB-27175] Add Galley meetings email config plumbing WPB-27175: Add Galley meetings email config plumbing Jul 20, 2026
Add optional settings.meetings.email to Galley for meeting-invitation emails: a required 'from' sender, optional 'replyTo', and a 'transport' selecting AWS SES or SMTP. When the block is absent, meeting emails are disabled. For SMTP, set galley.secrets.smtpPassword (mounted at /etc/wire/galley/secrets/smtp-password.txt).

Configuration plumbing only; no runtime behaviour yet (_email is Maybe and read by nothing). Email sending itself lands in a follow-up.

The SES/SMTP option types move from Brig.Options into a new shared module Wire.EmailSending.Options so Brig and Galley use one definition; Brig consumers (AWS/App/Run + test integration Run) import the types directly from there.
@blackheaven
blackheaven force-pushed the gdifolco/WPB-27175-meeting-address branch from 89a7118 to c887cdb Compare July 20, 2026 10:24
Address PR #5346 review feedback: the SMTP password handling was
asymmetric to Brig, which renders a dedicated smtp.passwordFile value
into transport.smtpCredentials.smtpPassword.

Replace Galley's toYaml passthrough of settings.meetings with explicit
field-by-field ConfigMap rendering (mirroring brig/configmap.yaml). The
flat Helm values now use a useSES selector with aws/smtp sub-blocks; the
ConfigMap translates these into the nested transport: object that
EmailOpts FromJSON expects (SES = {sesQueue, sesEndpoint}; SMTP =
{smtpEndpoint, smtpConnType, smtpCredentials?}). The SMTP password path
comes from a dedicated email.smtp.passwordFile value (not an inline
string), so the mounted secret value never enters the ConfigMap.

Helm-only keys (useSES, aws, smtp, passwordFile) do not leak into the
rendered galley.yaml. The Haskell types are unchanged;
galley.integration.yaml keeps its nested transport shape (read directly
by Galley, not via the ConfigMap).

- charts/wire-server/templates/galley/configmap.yaml: explicit rendering
- charts/wire-server/values.yaml: flat useSES/aws/smtp/passwordFile example
- hack/helm_vars/wire-server/values.yaml.gotmpl: CI block to flat form
- docs config-options.md + changelog: document the passwordFile mapping
@blackheaven
blackheaven requested a review from supersven July 22, 2026 20:12
`galley.secrets.smtpPassword` holds the value (mounted at
`/etc/wire/galley/secrets/smtp-password.txt`). The Galley ConfigMap injects that
path into `transport.smtpCredentials.smtpPassword`, the same pattern Brig uses
for `smtp.passwordFile`. Email sending itself lands in a follow-up.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for `smtp.passwordFile`. Email sending itself lands in a follow-up.
for `smtp.passwordFile`.

I would drop the last sentence, because things like this are easy to be forgotten. 馃樃

username: {{ .Values.rabbitmqUsername }}
password: {{ .Values.rabbitmqPassword }}
pgPassword: posty-the-gres
smtpPassword: dummy-smtp-password

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this value? Is this used for SES as well? 馃

@supersven supersven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comments are probably worth to check / consider. However, nothing that would block merging.

Drop the stale "follow-up" sentence from config-options.md and remove the unused Galley smtpPassword from the integration gotmpl, which runs meetings-email in SES mode and never consumes it (mirrors Brig's not-useSES guard). Addresses @supersven's comments on PR #5346.
@blackheaven
blackheaven merged commit c6f015b into develop Jul 24, 2026
9 checks passed
@blackheaven
blackheaven deleted the gdifolco/WPB-27175-meeting-address branch July 24, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants