Repository navigation
feat(settings): add auth and tls to the email sender - #122
Merged
Merged
Conversation
This was referenced Oct 8, 2026
lizzy-liang-bigstack
marked this pull request as ready for review
October 8, 2026 23:59
EmailSenderResponse, EmailSenderPostRequest and EmailSenderPatchRequest carry auth (boolean) and tls (EmailSenderTls: none | opportunistic | mandatory), the field names and values of bigstack-dependency-go pkg/email/v2. username is no longer required in the response, so an anonymous relay is representable. The POST and PATCH examples add an anonymous relay without TLS. An unset tls on a request means mandatory; an unset auth on POST means "a username was given", and on PATCH keeps the current value. The tls description records that alert mail, sent by Kapacitor, always upgrades to STARTTLS when offered and only uses the policy for certificate verification. Part of bigstack-oss/cubecos#1236 and bigstack-oss/cubecos#1239. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lizzy Liang <lizzy.liang@bigstack.co>
lizzy-liang-bigstack
force-pushed
the
1236-smtp-anonymous-tls
branch
from
October 9, 2026 00:24
b22e829 to
a6e964b
Compare
Contributor
|
The backend code will be reviewed by @arasHi87. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
feature
Which issue(s) this PR fixes?
Part of bigstack-oss/cubecos#1239 (and the story bigstack-oss/cubecos#1236)
What this PR does?
Let the email sender describe an anonymous relay and an explicit TLS policy. Today
EmailSenderResponserequiresusername, and no sender schema has a notion of authentication or transport encryption, so a site whose internal relay accepts anonymous submission and/or has no TLS cannot be represented.EmailSenderTlsenum:none/opportunistic/mandatory. The names and values matchbigstack-dependency-go/pkg/email/v2, which CMP already uses, so COS and CMP share one vocabulary.EmailSenderResponse,EmailSenderPostRequestandEmailSenderPatchRequesteach gainauth(boolean) andtls(EmailSenderTls). The response requires both.usernameis no longer required inEmailSenderResponse.tlsunset →mandatory, matching the v2 helper, so an old client never silently downgrades.authunset on POST → true if ausernameis given; on PATCH → the current value is kept.tlsdescription states the alert-path limit: alert mail is sent by Kapacitor 1.5.7, which always upgrades to STARTTLS when the relay advertises it, so for alert mail the policy only decides whether the relay certificate is verified (mandatory) or not (none,opportunistic).anonymousRelayexample (auth: false,tls: none); the existing examples showauth: true,tls: mandatory.Related PRs (same branch name
1236-smtp-anonymous-tls): bigstack-oss/cube-cos-api#682, bigstack-oss/cube-cos-ui#892 and bigstack-oss/cubecos#1810 — this spec lands first, and both consumers point theircube-cos-openapisubmodule at it.Test results (optional)
scripts/validate.sh(openapi-generator 7.11.0):No validation issues detected.openapi-spec-validator docs.yaml: OKauth: false,tls: noneround-trips through the API and UI, and its test mail reaches the relay with no AUTH (screenshots and relay log in those PRs).developmerged in (b22e829) to carry the bps ranking examples, so cube-cos-api can point at one commit with both.typescript-axios, its templates) builds, and the web-app'stsc -band tests pass against it.🤖 Generated with Claude Code