refactor: 리펙토링 진행중 의존성 gradle은 얇게 유지, 각 모듈에서 처리하고 있는 부분에 대해서 리펙토링
This commit is contained in:
@@ -54,9 +54,10 @@ nonce and tag. A larger configured value would pass every check above the databa
|
||||
|
||||
## Provider profiles
|
||||
|
||||
Profiles are a map under `providers`, keyed by profile id. There are no environment variables for
|
||||
them, because the keys are deployment-chosen; supply them as YAML or as
|
||||
`CA_SKELETON_NOTIFICATION_PLATFORM_PROVIDERS_<ID>_<FIELD>`.
|
||||
Profiles are a map under `providers`, keyed by profile id. Arbitrary deployment-chosen ids can be
|
||||
supplied as YAML or through Spring relaxed binding (`CA_SKELETON_NOTIFICATION_PLATFORM_PROVIDERS_<ID>_<FIELD>`).
|
||||
The shipped reference profiles `smtp` and `ses` additionally expose explicit `APP_NOTIFICATION_PLATFORM_SMTP_*`
|
||||
and `APP_NOTIFICATION_PLATFORM_SES_*` aliases so operators do not have to invent binding names.
|
||||
|
||||
| Field | Meaning |
|
||||
|---|---|
|
||||
@@ -64,7 +65,7 @@ them, because the keys are deployment-chosen; supply them as YAML or as
|
||||
| `enabled` | A disabled profile is bound and validated but contributes no runtime |
|
||||
| `primary-for-channel` | Exactly one primary per channel |
|
||||
| `environment` | Required when enabled |
|
||||
| `credential-profile` | Resolved through `SecretMaterialProvider`; never an inline secret |
|
||||
| `credential-profile` | Provider credential key id resolved through `SecretMaterialProvider`; never inline secret material |
|
||||
| `topic` | APNs bundle id |
|
||||
| `vapid-public-key` | Web Push application server key |
|
||||
| `callback-signing-secret-ref` | Reference, not material |
|
||||
@@ -75,6 +76,41 @@ them, because the keys are deployment-chosen; supply them as YAML or as
|
||||
A profile pins provider type, environment, credential profile, timeouts, concurrency and rate limit.
|
||||
Sender identity and credential profile are separate concerns.
|
||||
|
||||
### SES profile fields
|
||||
|
||||
An enabled SES profile adds a typed `ses` block:
|
||||
|
||||
| Field | Meaning |
|
||||
|---|---|
|
||||
| `ses.endpoint` | SES API base URI; the mapper appends `/v2/email/outbound-emails` |
|
||||
| `ses.region` | SigV4 region |
|
||||
| `ses.sender-identity` | verified SES From identity |
|
||||
| `ses.access-key-id` | AWS access key id; identifier only, not secret material |
|
||||
| `ses.configuration-set` | optional SES configuration-set name |
|
||||
| `credential-profile` | key id for the secret access-key material; generation 1 is activated at assembly |
|
||||
|
||||
The shipped reference profile is `providers.ses` and is disabled by default. It is controlled by
|
||||
`APP_NOTIFICATION_PLATFORM_SES_*`; its secret material comes from
|
||||
`APP_NOTIFICATION_PLATFORM_PROVIDER_CREDENTIAL_KEY`, whose active key id must match
|
||||
`APP_NOTIFICATION_PLATFORM_SES_CREDENTIAL_KEY_ID`.
|
||||
|
||||
`type` is the closed **provider model**, not a promise that the shipped composition contains a
|
||||
dispatch assembler for every value. Current shipped reachability is:
|
||||
|
||||
| Provider type | Contract/adapter code | Shipped dispatch assembler | Shipped callback assembler | What happens when enabled for dispatch |
|
||||
|---|---|---|---|---|
|
||||
| `SMTP` | yes | **yes** | no | assembles when Spring Mail relay settings are complete |
|
||||
| `SES` | yes | **yes** | **yes** | assembles an EMAIL runtime from the typed `ses` block; SNS callback verification remains available in `INGEST_ONLY` |
|
||||
| `TWILIO` | yes | no | no | dispatch fails startup by profile name |
|
||||
| `FCM` | yes | no | no | dispatch fails startup by profile name |
|
||||
| `APNS` | yes | no | no | dispatch fails startup by profile name |
|
||||
| `WEB_PUSH` | yes | no | no | dispatch fails startup by profile name |
|
||||
| `WEBHOOK` | yes | no | no | dispatch fails startup by profile name |
|
||||
|
||||
This distinction is deliberate: tested provider protocol code is not the same thing as a
|
||||
composition-reachable provider. Adding a family to the shipped runtime requires a
|
||||
`ProviderRuntimeAssembler` plus the settings/secret inputs that adapter actually needs.
|
||||
|
||||
## SMTP relay
|
||||
|
||||
The one provider profile the template ships, off. A deployment that wants the common case sets
|
||||
@@ -98,15 +134,16 @@ already owns them and a second spelling would be a second thing to keep in step.
|
||||
|
||||
| Property | Environment variable | Default | Bound |
|
||||
|---|---|---|---|
|
||||
| `smtp.tls-mode` | `APP_NOTIFICATION_PLATFORM_SMTP_TLS_MODE` | `STARTTLS_REQUIRED` | `STARTTLS_REQUIRED` or `IMPLICIT_TLS` |
|
||||
| `smtp.sender-identity` | `APP_NOTIFICATION_PLATFORM_SMTP_SENDER_IDENTITY` | `no-reply@example.invalid` | address |
|
||||
| `smtp.connect-timeout` | `APP_NOTIFICATION_PLATFORM_SMTP_CONNECT_TIMEOUT` | `5s` | positive, finite |
|
||||
| `smtp.read-timeout` | `APP_NOTIFICATION_PLATFORM_SMTP_READ_TIMEOUT` | `10s` | positive, finite |
|
||||
| `smtp.write-timeout` | `APP_NOTIFICATION_PLATFORM_SMTP_WRITE_TIMEOUT` | `10s` | positive, finite |
|
||||
| `smtp.max-concurrency` | `APP_NOTIFICATION_PLATFORM_SMTP_DISPATCH_CONCURRENCY` | `4` | positive |
|
||||
|
||||
The TLS mode enum has no plaintext member. An unencrypted relay is refused by construction rather
|
||||
than by a validator somebody has to remember to run.
|
||||
SMTP transport configuration has one owner: Spring Mail. The actual `JavaMailSenderImpl` must use required STARTTLS (`mail.smtp.starttls.enable=true` plus `mail.smtp.starttls.required=true`) or implicit TLS (`mail.smtp.ssl.enable=true`). It must also have positive `mail.smtp.connectiontimeout`, `mail.smtp.timeout`, and `mail.smtp.writetimeout` values. SMTP assembly fails before serving traffic when those properties are absent or invalid.
|
||||
|
||||
The native environment contract is `SPRING_MAIL_HOST`, `SPRING_MAIL_PORT`, optional
|
||||
`SPRING_MAIL_USERNAME` / secret `SPRING_MAIL_PASSWORD`, plus the
|
||||
`SPRING_MAIL_PROPERTIES_MAIL_SMTP_*` TLS and timeout keys listed in `.env.example`. These names stay
|
||||
Spring-native because Spring Boot itself owns and consumes `spring.mail.*`; the notification module
|
||||
does not create a second alias for the same relay.
|
||||
|
||||
The default sender is an RFC 2606 reserved domain that resolves nowhere, so a deployment that forgot
|
||||
to set one produces a traceable bounce instead of mail apparently sent from an address it does not
|
||||
|
||||
Reference in New Issue
Block a user