Support asymmetric mailroom JWT public keys
What does this MR do?
Adds publicKeyFiles to global.appConfig.incomingEmail and global.appConfig.serviceDeskEmail, so Webservice can verify mailroom tokens signed with an ES256 private key, alongside the existing shared authToken.
- The public keys are fields of one secret.
publicKeyFiles.keyslists which fields to trust, so a new key can be trusted before the old one is removed. - Only Webservice mounts the keys, and only for an enabled mailbox using the
webhookdelivery method. This matches howauthTokenis mounted. gitlab.ymllists them underpublic_key_files, next tosecret_file. GitLab picks symmetric or asymmetric verification per token from its key ID, so both work at the same time.- checkConfig fails the render when only one of
secretorkeysis set, since that would silently mount nothing. - Defaults are empty, so nothing changes for existing installs.
This is split out of !5384 (closed), as suggested in !5384 (comment 3917592368), so it can be reviewed on its own while the cells-mailroom packaging is discussed there. The Rails side already supports public_key_files in gitlab-org/gitlab.
Compared to !5384 (closed), this version no longer mounts the keys into the mailroom pod (it never verifies tokens), and skips them for disabled mailboxes and sidekiq delivery.
This MR was prepared with the help of an AI agent.
Related issues
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
- Merge Request Title and Description are up to date, accurate, and descriptive.
- MR targeting the appropriate branch.
- MR has a green pipeline.
- Documentation created/updated.
- Tests added/updated.
- Have you validated that your change works end-to-end on a real cluster deployment?
- Describe how you did it in a comment.
- Equivalent MR/issue for omnibus-gitlab opened.
- When ready for review, MR is marked as ready (not a draft) and assigned to a reviewer.
Reviewers checklist
- As soon as you begin reviewing, select Start a review on your first comment so the MR shows Reviewer started review.
- MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab.
- Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.