Add ciphertext-safe Postbox search source

This commit is contained in:
2026-08-04 03:03:27 +02:00
parent a97eb3bcef
commit 889b5e61f0
4 changed files with 490 additions and 0 deletions
+32
View File
@@ -44,9 +44,11 @@ from govoplan_core.core.postbox import (
CAPABILITY_POSTBOX_MESSAGES,
CAPABILITY_POSTBOX_ROUTING,
)
from govoplan_core.core.search import SearchSourceProviderRegistration
from govoplan_core.core.views import ViewSurface
from govoplan_core.db.base import Base
from govoplan_postbox.backend.db import models as postbox_models
from govoplan_postbox.backend.search_source import create_postbox_search_source
MODULE_ID = "postbox"
@@ -222,6 +224,7 @@ manifest = ModuleManifest(
"portal",
"views",
"workflow_engine",
"search",
),
required_capabilities=(
CAPABILITY_AUTH_PRINCIPAL_RESOLVER,
@@ -266,9 +269,21 @@ manifest = ModuleManifest(
version_max_exclusive="2.0.0",
optional=True,
),
ModuleInterfaceRequirement(
name="search.source",
version_min="1.0.0",
version_max_exclusive="2.0.0",
optional=True,
),
),
permissions=PERMISSIONS,
role_templates=ROLE_TEMPLATES,
search_sources=(
SearchSourceProviderRegistration(
id="postbox.messages",
factory=create_postbox_search_source,
),
),
nav_items=(
NavItem(
path="/postbox",
@@ -363,6 +378,23 @@ manifest = ModuleManifest(
CAPABILITY_POSTBOX_ROUTING: _configure,
},
documentation=(
DocumentationTopic(
id="postbox.search.messages",
title="Search authorized Postbox messages",
summary="Expose Postbox subjects and permitted plaintext content to permission-aware platform Search.",
body=(
"When Search is installed, Postbox contributes message subjects, sender labels, and plaintext "
"content only. Ciphertext and key material are never indexed. Every result is tenant-bounded and "
"rechecks current function assignment, Postbox binding, classification, acting context, and generic "
"read authority without recording a message read. Committed deliveries and message changes update "
"the derived index through the durable platform event path."
),
layer="configured",
documentation_types=("admin", "user"),
audience=("administrator", "user", "campaign_manager"),
related_modules=("search", "idm", "encryption"),
order=34,
),
DocumentationTopic(
id="postbox.function-bound-containers",
title="Function-bound Postboxes",