feat: provision SMTP profiles from deployment receipts
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@ from govoplan_core.core.provider_governance import (
|
||||
from govoplan_core.core.search import SearchSourceProviderRegistration
|
||||
from govoplan_core.core.views import ViewSurface
|
||||
from govoplan_core.db.base import Base
|
||||
from govoplan_mail.backend.configuration_provider import MAIL_CONFIGURATION_CAPABILITY
|
||||
from govoplan_mail.backend.documentation import (
|
||||
documentation_configuration_states,
|
||||
documentation_topics,
|
||||
@@ -95,6 +96,13 @@ def _mail_retirement_provider(session: object | None, module_id: str):
|
||||
)
|
||||
|
||||
|
||||
def _configuration_provider(context: ModuleContext) -> object:
|
||||
del context
|
||||
from govoplan_mail.backend.configuration_provider import SqlMailConfigurationProvider
|
||||
|
||||
return SqlMailConfigurationProvider()
|
||||
|
||||
|
||||
def _permission(scope: str, label: str, description: str) -> PermissionDefinition:
|
||||
module_id, resource, action = scope.split(":", 2)
|
||||
return PermissionDefinition(
|
||||
@@ -432,6 +440,7 @@ manifest = ModuleManifest(
|
||||
),
|
||||
),
|
||||
capability_factories={
|
||||
MAIL_CONFIGURATION_CAPABILITY: _configuration_provider,
|
||||
"mail.campaign_delivery": lambda context: __import__("govoplan_mail.backend.capabilities", fromlist=["campaign_capability"]).campaign_capability(context),
|
||||
CAPABILITY_MAIL_DELIVERY_OUTBOX: lambda context: __import__(
|
||||
"govoplan_mail.backend.capabilities",
|
||||
@@ -447,6 +456,57 @@ manifest = ModuleManifest(
|
||||
).SqlMailBounceProcessingProvider(),
|
||||
},
|
||||
documentation=(
|
||||
DocumentationTopic(
|
||||
id="mail.configuration-package.smtp-profile",
|
||||
title="Provision SMTP profiles from deployment receipts",
|
||||
summary="Review and apply an idempotent Mail profile without moving plaintext credentials through a package.",
|
||||
body=(
|
||||
"The Mail configuration provider reads the validated mail.smtp deployment capability and derives authoritative endpoint metadata. "
|
||||
"Missing non-secret transport fields are collected by preflight; authentication is represented only by an existing credential-envelope id. "
|
||||
"Tenant scope is the default, system scope requires system authority, conflicting profiles are preserved unless update is explicitly reviewed, "
|
||||
"and an unchanged second apply is a no-op. SMTP reachability remains a separate Mail profile test."
|
||||
),
|
||||
layer="configured",
|
||||
documentation_types=("admin",),
|
||||
audience=("mail_admin", "administrator", "operator"),
|
||||
related_modules=("core", "ops", "access"),
|
||||
conditions=(
|
||||
DocumentationCondition(
|
||||
required_modules=("mail", "access"),
|
||||
any_scopes=("admin:settings:read", "system:settings:read"),
|
||||
),
|
||||
),
|
||||
links=(
|
||||
DocumentationLink(
|
||||
label="Configuration packages",
|
||||
href="/admin?section=configuration-packages",
|
||||
kind="runtime",
|
||||
),
|
||||
DocumentationLink(
|
||||
label="Mail handbook",
|
||||
href="govoplan-mail/docs/MAIL_HANDBOOK.md",
|
||||
kind="repository",
|
||||
),
|
||||
),
|
||||
translations={
|
||||
"de": {
|
||||
"title": "SMTP-Profile aus Bereitstellungsnachweisen einrichten",
|
||||
"summary": "Ein idempotentes Mail-Profil prüfen und anwenden, ohne Klartext-Zugangsdaten durch ein Konfigurationspaket zu übertragen.",
|
||||
"body": (
|
||||
"Der Mail-Konfigurationsprovider liest die validierte Bereitstellungsfähigkeit mail.smtp und übernimmt deren maßgebliche Endpunktdaten. "
|
||||
"Fehlende nicht geheime Transportangaben werden im Preflight abgefragt; Authentifizierung wird ausschließlich durch die ID eines vorhandenen Zugangsdaten-Umschlags referenziert. "
|
||||
"Mandantenbezug ist der Standard, Systembezug erfordert Systemberechtigung, abweichende vorhandene Profile bleiben ohne ausdrücklich geprüfte Aktualisierung unverändert, "
|
||||
"und eine unveränderte zweite Anwendung bleibt wirkungslos. Die SMTP-Erreichbarkeit wird weiterhin separat im Mail-Profil getestet."
|
||||
),
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"kind": "workflow",
|
||||
"route": "/admin?section=configuration-packages",
|
||||
"help_contexts": ["admin.configuration-packages", "mail.admin.profiles"],
|
||||
},
|
||||
order=4,
|
||||
),
|
||||
DocumentationTopic(
|
||||
id="mail.quick-access-and-product-area",
|
||||
title="Mail in Communication and Messages",
|
||||
|
||||
Reference in New Issue
Block a user