feat: add governed Files DSAR coverage

This commit is contained in:
2026-08-20 22:40:33 +02:00
parent 6c3cf1c55e
commit ce4eaefbfd
6 changed files with 1481 additions and 1 deletions
+78
View File
@@ -54,6 +54,7 @@ from govoplan_files.backend.configuration_provider import (
)
from govoplan_files.backend.db import models as file_models # noqa: F401 - populate Files ORM metadata
from govoplan_files.backend.documentation import documentation_topics
from govoplan_files.backend.dsar_provider import FILES_DSAR_CAPABILITY
from govoplan_files.backend.form_evidence import (
CAPABILITY_FORM_EVIDENCE_FILES,
create_files_form_evidence_provider,
@@ -440,6 +441,13 @@ REMOTE_STORAGE_PROVIDER = ExternalProviderDeclaration(
)
def _dsar_provider(context: ModuleContext) -> object:
del context
from govoplan_files.backend.dsar_provider import FilesDsarProvider
return FilesDsarProvider()
manifest = ModuleManifest(
id="files",
name="Files",
@@ -456,6 +464,7 @@ manifest = ModuleManifest(
ModuleInterfaceProvider(name=CAPABILITY_FILES_POSTBOX_REFERENCES, version="1.0.0"),
ModuleInterfaceProvider(name=CAPABILITY_RECORD_SOURCE_FILES, version="1.0.0"),
ModuleInterfaceProvider(name=CAPABILITY_FORM_EVIDENCE_FILES, version="1.0.0"),
ModuleInterfaceProvider(name=FILES_DSAR_CAPABILITY, version="0.1.0"),
),
requires_interfaces=(
ModuleInterfaceRequirement(
@@ -1180,6 +1189,69 @@ manifest = ModuleManifest(
],
},
),
DocumentationTopic(
id="files.privacy.data-subject-requests",
title="Review Files data in a data-subject request",
summary="Collect safe Files metadata and keep retention, evidence, and byte-erasure decisions explicit.",
body=(
"The Files DSAR provider searches only the effective tenant and requires a direct membership or namespaced Files user reference. "
"It exports bounded file, version, folder, sharing, evidence, connector-configuration, and integrity metadata without raw file bytes, storage locations, tokens, passwords, secret references, or encrypted credential values. "
"Plans may revoke an active share aimed at the subject or detach a mutable actor reference. Legal hold, active retention, Form evidence, Campaign delivery evidence, configuration history, and integrity evidence remain retained with a reason. File content, ownership, names, and paths require manual review. Approved physical erasure must use the separately authorized Files purge and blob-garbage-collection workflow so DSAR execution cannot bypass evidence blockers, approval, audit, or recovery controls."
),
layer="configured",
documentation_types=("admin",),
audience=("privacy_officer", "file_admin", "records_manager", "operator"),
order=47,
conditions=(
DocumentationCondition(
required_modules=("files", "access"),
any_scopes=(
"access:privacy:read",
"access:privacy:manage",
"access:privacy:erase",
),
),
),
links=(
DocumentationLink(
label="Data-subject requests",
href="/admin?section=tenant-data-subject-requests",
kind="runtime",
),
DocumentationLink(
label="Files handbook",
href="govoplan-files/docs/FILES_HANDBOOK.md",
kind="repository",
),
),
related_modules=("access", "audit", "campaigns", "forms-runtime", "ops"),
metadata={
"kind": "workflow",
"route": "/admin?section=tenant-data-subject-requests",
"screen": "Data-subject requests",
"help_contexts": ["admin.privacy.data-subject-requests"],
"prerequisites": [
"The request has been authorized and contains a direct tenant membership or Files subject reference.",
"The privacy reviewer can distinguish access export from erasure authority and Files purge authority.",
],
"steps": [
"Run the provider search and confirm Files reports complete coverage rather than a failed or absent provider.",
"Review file/version metadata, evidence retention reasons, and the source path for manual content review.",
"Generate the erasure plan and execute only the approved reversible share-revocation or subject-reference actions.",
"For approved byte erasure, resolve every lifecycle blocker and use Files purge preview, execution, and blob garbage collection separately.",
],
"limitations": [
"Email, account, or identity selectors alone cannot be resolved by Files because Files does not own the Access directory; supply the corroborated membership reference.",
"The provider does not embed raw file content in the JSON export and never performs physical blob deletion as a DSAR side effect.",
],
"outcome": "Files-owned subject references are reviewed or removed without silently destroying retained content or evidence.",
"verification": "Confirm every Files record has a retain, review, revoke, or detach disposition and inspect any separate purge through its audit and recovery evidence.",
"related_topic_ids": [
"files.workflow.restore-retain-and-purge",
"files.reference.integrity-recovery-and-fail-closed-transports",
],
},
),
DocumentationTopic(
id="files.governed-connectors-and-provenance",
title="Govern file connections and credential deletion",
@@ -1635,6 +1707,7 @@ manifest = ModuleManifest(
).campaign_capability(context),
CAPABILITY_RECORD_SOURCE_FILES: create_files_record_source,
CAPABILITY_FORM_EVIDENCE_FILES: create_files_form_evidence_provider,
FILES_DSAR_CAPABILITY: _dsar_provider,
},
capability_documentation={
CAPABILITY_RECORD_SOURCE_FILES: CapabilityDocumentation(
@@ -1647,6 +1720,11 @@ manifest = ModuleManifest(
summary="Issues one-time managed attachment grants and verifies exact Form evidence versions.",
contract_version="1.0.0",
),
FILES_DSAR_CAPABILITY: CapabilityDocumentation(
label="Files data-subject request provider",
summary="Finds safe Files metadata and classifies reversible references, manual file review, and retained evidence.",
contract_version="0.1.0",
),
},
operational_check_providers=(
OperationalCheckProviderRegistration(