Worked Examples
Validate scientifically engagement workspaces — Contact and Engagement Platform
Validate engagement workspaces through controlled tests of inquiry-to-engagement ownership, Sender Portal authorization, private-record visibility, document associations, and cross-client isolation. This scientific validation guide provides reproducible synthetic fixtures, read-only reconciliation, measurable acceptance criteria, and privacy-preserving evidence methods for evaluating workspace reliability.
Application: Contact and Engagement Platform
Component: Secure Client Workspace and Collaboration
Article type: Scientific validation / privacy and access-control procedure
Reviewed source: plugin 2.0.2; workspace schema 1.0.0; source commit 3f246974276a5e582d09f8c48d21628b82626bc7
Evidence status: Source reviewed; independent synthetic checker exercised; staging and production acceptance not executed.
Estimated reading time: 18–22 minutes
Purpose: Test whether engagement-scoped workspaces preserve canonical inquiry ownership and prevent one client from viewing, changing, or inferring another client’s private records. Evidence must include both successful authorized operations and deliberate negative controls, not simply a working staff screen.
Goal
Determine whether controlled collaboration through the Contact and Engagement Platform is correctly associated, confidential, authorized, auditable, and recoverable. The primary acceptance criterion is that cross-client access is denied in the Sender Portal and that workspace child records, protected attachments, and engagement relationships remain confined to the correct canonical inquiry. The scientific claim is about measurable operation of a specified workflow in a defined environment; it is not a claim that the platform is universally secure.
Requirements
- An isolated staging WordPress installation with a recorded plugin commit, schema versions, test date, enabled features, and capability configuration; never run adversarial access tests against real client accounts.
- At least two independent synthetic inquiries (
INQ-AandINQ-B), each with its own contracted proposal or approved staging engagement, Sender Portal access and private workspace. Use synthetic email addresses and documents. - Permission-separated actors: authorized sender A, authorized sender B, sender without workspace permission, permitted staff operator, and staff actor without workspace management capability.
- Record redacted access decisions, HTTP status, response field names, relevant database row IDs represented by fixture aliases, actor/role, test protocol, timestamps, and failure injection notes. Do not export client names, session tokens, document contents, or raw log bodies.
- Check the privacy and data-retention policy, authorizations, consent and contract boundary before touching personal data. Source review is not a legal-compliance determination.
Study design and definitions
Define the unit of analysis as a workspace operation (a read, write, projection or relationship change) associated with a known inquiry and engagement. The population is the selected staging version and its specified permission combinations, not all possible users or deployments. Preserve the full denominator: authorized requests, prohibited requests, failures, and unresolved observations. Re-run negative controls after every relevant plugin or portal change.
Isolation means an operation initiated under inquiry A cannot read or mutate records rooted in inquiry B. Attribution means each child record retains the workspace’s canonical inquiry and follows the governed engagement. Projection means sender-facing output contains only approved fields and published records. Authorization requires an authenticated, authorized portal or WordPress actor and action-specific permission. Availability means legitimate actors can perform allowed operations under normal conditions; confidentiality takes priority when those properties conflict.
Schema precision: The reviewed workspace tables use inquiry_id, engagement_id and workspace_id; they do not provide an independent general-purpose tenant_id or project_id. In this article, “cross-client” refers to inquiry/engagement boundaries. Do not infer isolation across external products or organization-wide multi-tenancy without separate evidence.
Source-reviewed implementation map
| Component / path | Verified implementation | Evidence boundary |
|---|---|---|
class-sc-ei-engagement-repository.php |
Creates engagement handoff from contracted proposal and retains canonical inquiry | Check engagement-to-inquiry relationship in staging |
class-sc-ei-workspace-repository.php |
create_for_engagement(), sender_snapshot(), child-entity methods, privacy redaction and cleanup |
Source guards require runtime negative tests |
class-sc-ei-workspace-schema.php |
Statuses, member-permission vocabulary and sender_projection_keys() |
Vocabulary alone does not prove per-member permission enforcement |
class-sc-ei-portal-public.php |
Sender actions use portal context, CSRF, rate checks and workspace references | Replay and cross-inquiry behavior must be observed |
class-sc-ei-workspace-admin.php |
Admin POST handlers use WordPress capabilities and nonces | Validate actor separation and errors |
class-sc-ei-database.php |
Seven workspace tables and indexed ownership columns | Schema structure is not a substitute for access enforcement |
tests/client-workspace-collaboration.php |
Source-level contract assertions | These are not proof of live privacy isolation |
The source baseline is the pinned Engagement Intake repository commit. Repository visibility may require authorization. The plugin reports version 2.0.2 and workspace schema 1.0.0; the installed version remains unverified.
Workspace ownership and relationship invariants
The intended lineage is inquiry → contracted proposal → governed engagement → client_workspace → children. A client workspace is a collaboration layer delivered through an existing Sender Portal session, not a new public registration system. create_for_engagement() obtains the parent inquiry from the engagement and returns an existing workspace for that engagement, supporting one workspace per engagement. The workspace table has a unique index on engagement_id.
workspace.inquiry_id == engagement.inquiry_id
child.workspace_id == workspace.id
child.inquiry_id == workspace.inquiry_id
workspace.engagement_id is unique
linked_attachment.inquiry_id == workspace.inquiry_id
sender_actor.inquiry_id == workspace.inquiry_id # required on authorized portal read/write
Test each equality as an explicit invariant. For linked documents, link_document() checks that the attachment belongs to the same inquiry. For deliverables, the reviewed add_deliverable() accepts an optional attachment_id without showing that same validation in the local creation method; therefore, add a cross-inquiry attachment negative test and do not assume every attachment relationship is checked identically. Related deliverable references on messages/documents also deserve cross-workspace probes. Any mismatch is an integrity finding requiring a scoped code-path review, not automatic proof of externally exploitable access.
Access and sender projection
The staff-facing administration requires capabilities such as sc_intake_view_client_workspaces, sc_intake_manage_client_workspaces, sc_intake_manage_workspace_milestones, sc_intake_manage_workspace_deliverables, and sc_intake_manage_workspace_documents. Sender actions rely on the authenticated Sender Portal context, CSRF protection, rate limiting, public workspace identifiers, and relevant portal permissions including view_workspace, respond_deliverables, and send_messages.
The sender snapshot selects workspaces for the authorized inquiry and only includes sender-visible workspaces in active, paused or completed states. It filters milestones and messages by sender_visible; deliverables additionally exclude draft, in_review and withdrawn; document metadata requires a non-deleted linked attachment. It omits membership records, internal events and staff-only notes. Inspect the actual projection as a serialized response rather than relying on front-end hiding.
allowed = {
"public_id", "workspace_number", "title", "status", "summary",
"next_step", "milestones", "deliverables", "documents",
"messages", "updated_at"
}
def validate_projection(sender_workspace: dict) -> None:
extra = set(sender_workspace) - allowed
assert not extra, f"Unapproved projection keys: {sorted(extra)}"
# Synthetic positive and negative controls; replace with approved staging observations.
validate_projection({"public_id": "WS-A", "title": "Synthetic", "status": "active"})
try:
validate_projection({"public_id": "WS-A", "email_hash": "forbidden"})
except AssertionError:
print("PASS: a prohibited private key was rejected")
else:
raise AssertionError("Private field was accepted")
The keys above describe the source-reviewed outer sender projection. Nested field lists must be checked separately. File titles, original names, message text and public summaries may themselves contain personal information; a safe field name is not sufficient to guarantee safe content.
Member identity and permission boundaries
The reviewed workspace_members schema stores email_hash, member type, optional staff user ID, role label, permissions JSON, and membership state. The source computes the sender hash as unsalted SHA-256 of a normalized email address, avoiding a raw email column but not making the value anonymous or immune to dictionary inference. Do not publish email hashes in a public validation report.
The membership permission vocabulary is distinct from the Sender Portal session-permission checks. Verify both where relevant; a permissions array recorded in a membership table does not independently prove that every portal action consults that array. Use explicit disabled-member, revoked-session and reduced-permission negative controls. A mismatch between asserted fine-grained role semantics and actual enforcement is a finding to resolve before asserting member-level isolation.
Study hypotheses and counterexamples
| Hypothesis | Counterexample / falsification | Required observation |
|---|---|---|
| H1 — correct ownership | Workspace A points to engagement B, or child A has inquiry B | Database relationship queries and deterministic fixture |
| H2 — cross-client deny | Sender B opens workspace A using copied public ID | Denied request without A-specific fields or side effects |
| H3 — private information protected | Unpublished deliverable, member, internal note or event appears in sender response | Nested field-by-field projection diff |
| H4 — controlled writes | Sender lacking send_messages or respond_deliverables changes A |
Before-and-after record counts and status |
| H5 — document constraints | Attachment from inquiry B linked or disclosed through workspace A | Rejected association and protected download denial |
| H6 — reliable audit | Status or sender response changes without attributable history | Row version, actor, event, and missing-event count |
| H7 — privacy recovery | Redacted workspace still exposes private text or metadata | Post-redaction projections, exports and storage checks |
Method and evidence
Use a pre-registered protocol with at least two distinct synthetic client contexts. Create a baseline of valid operations, then mutate one input or permission at a time. The study requires independent ground truth: a known actor/inquiry mapping, a known workspace/engagement mapping, and an expected response classification (allow, deny or unknown). Preserve raw private evidence only in a restricted staging evidence vault. In the public article, publish aggregated findings, test identifiers and sanitized examples.
A positive test shows a permitted action works. A negative test probes a prohibited relationship. A regression test proves the previously identified failure remains blocked after a code change. A read-only database reconciliation can identify malformed relationships but cannot establish whether an attacker can reach them or whether all public exports, caches and downloads are safe. These are separate evidence channels.
Procedure
- Freeze the test configuration. Record plugin hash, WordPress/PHP versions, workspace and portal schema versions, action/capability matrix, privacy policy, and staging host. Verify that test accounts cannot reach production client data.
- Create two isolated cases. Seed inquiry A and B, distinct engagements, sender sessions, private documents, workspaces, members, milestone, deliverable, communication and audit records. Use unambiguously synthetic values only.
- Verify parent lineage. Reconcile every
client_workspaces.inquiry_idagainst its engagement; reconcile childworkspace_idandinquiry_id; check attachment and related-deliverable relationships. - Capture authorized projections. As sender A, observe workspace A and one deliberately published deliverable; ensure the private membership and internal event records are absent. Repeat with sender B for B.
- Run cross-client read controls. Attempt copied workspace public IDs, direct deliverable IDs, protected document IDs, alternate sender sessions, reduced portal permissions and invalid CSRF tokens; record denial plus no private body disclosure.
- Run cross-client write controls. Attempt sender messages and deliverable responses against the other inquiry, stale revisions, revoked sessions and hidden workspaces. Compare pre/post counts and event trails.
- Exercise lifecycle states. Move a staging workspace through draft/active/paused/completed/archived with appropriate staff authorization; check the source-described projection eligibility and controlled transition evidence.
- Exercise document handling. Test same-inquiry link, cross-inquiry link, deleted attachment, protected download, and a deliverable attachment reference. Capture exact stage outcomes, not assumptions.
- Run privacy and error-path checks. Check authorized export/redaction, denied disclosures, cache boundaries, duplicate writes, error-body PII and partial persistence under injected database errors.
- Re-run after repair. Preserve negative fixtures, compare against prior results, and sign off separately on correctness, confidentiality, data minimization and deployment readiness.
Reproducible synthetic validation
The downloadable package includes workspace_validator.py, two JSON fixtures, a regression test suite, and a 30-day read-only WordPress diagnostic. The validator consumes a purpose-built observation packet with schema: sc-workspace-validation/1.0; this is not an existing WordPress API, database schema, or automatic production export. Construct a packet only from authorized, sanitized staging observations.
python3 -m unittest discover -p 'test_workspace_validator.py' -v
python3 workspace_validator.py fixtures/valid_case.json --report valid_report.json
python3 workspace_validator.py fixtures/adverse_case.json --report adverse_report.json
# The adverse packet deliberately exits 2 because it has findings.
{
"schema": "sc-workspace-validation/1.0",
"workspaces": [{
"id": "WS-A", "inquiry_id": "INQ-A",
"engagement_id": "ENG-A", "engagement_inquiry_id": "INQ-A",
"status": "active", "sender_visible": true,
"projected": true, "projected_fields": ["title", "status"]
}],
"attachments": [], "children": [],
"portal_probes": [{
"id": "DENY-B", "workspace_id": "WS-A",
"actor_inquiry_id": "INQ-B", "permission_granted": true,
"observed": "deny", "observed_fields": []
}]
}
The diagnostic reports codes such as workspace_engagement_inquiry_mismatch, child_inquiry_mismatch, cross_inquiry_attachment, unpublished_deliverable_exposed, unauthorized_portal_allow, portal_private_field_leak and unresolved_probe. A real vulnerability requires independent reproduction and authorization-path analysis. Never use raw personal data as fixture fields.
Read-only database reconciliation
Execute the supplied PHP diagnostic from a private operator directory only after confirming that the installed schema matches the reviewed commit. It resolves WordPress table names using SC_EI_Database::table(), samples workspaces created in the last 30 UTC days, checks canonical inquiry mismatches for six child tables, and checks document/deliverable attachment lineage. It reports suppressed aggregate counts—not record IDs, member data, message bodies, URLs, or document titles.
# Set WP_PATH to the actual authorized WordPress installation.
# Place the diagnostic outside every public webroot.
WP_PATH=/absolute/path/to/wordpress
wp --path="$WP_PATH" eval-file /absolute/private/read_only_workspace_reconciliation.php
Use the result as a triage signal: zero observed row mismatches does not prove non-disclosure through pages, search, APIs, file downloads or caching. A nonzero count needs scoped, authorized record-level inspection in a protected environment. Do not automatically delete or repair rows from a published article.
Quantitative acceptance criteria
Predefine and record two denominators: prohibited attempts (security checks) and eligible authorized attempts (usability checks). For each category, report tested, observed_failures and unknown independently. Do not fold unobserved requests into successes or report a combined rate that hides rare but severe isolation failures.
failure_rate = observed_failures / observed_outcomes
# Report unknown outcomes separately.
# A 95% Wilson upper bound for a binomial rate is computed by:
from workspace_validator import wilson_upper
print(round(wilson_upper(0, 100), 4)) # approx. 0.0370
# Zero observed failures in 100 trials is NOT proof of zero risk.
The minimum acceptance gate for the targeted staging matrix is zero observed cross-inquiry disclosures, zero unauthorized state changes, zero mismatched links, and zero confidential fields in denied responses. This is a decision threshold for the specified test suite, not evidence of an absolute zero risk. All critical scenarios must be executed; unresolved cases block certification. Provide failure counts and confidence bounds by category and environment; report changes to sample selection or any untested population.
Symptoms
- Sender B can see workspace A, its milestone description, a deliverable, a message, a file title or a document download.
- A workspace points to an engagement that belongs to a different canonical inquiry, or child rows disagree with their parent inquiry.
- A draft or withdrawn deliverable appears in an authorized sender response despite publication gating.
- A prohibited update succeeds because only the outer workspace view was access-controlled.
- An attachment or related deliverable comes from a different workspace while the save operation appears successful.
- A privacy redaction hides a workspace while a cached response, export or linked document still exposes content.
- An event cannot be reconciled to a permitted actor, state transition and version, or an authorized sender cannot access a valid visible workspace.
Cause
Possible causes include incorrect inquiry-to-engagement lineage; unsafely trusted numeric object identifiers; a missing parent check in a child write; an access control applied only to view rendering; a mismatch between membership permissions and portal-session permissions; unintended sender visibility flags; stale cached snapshots; missing document restriction checks; or a compensating action that partially failed. The reviewed source contains targeted protections, but a specific symptom cannot be attributed to a particular defect without a reproducible trace.
Troubleshooting
- Identify the tested actor, inquiry alias, workspace public ID, operation and exact expected denial. Confirm the portal session belongs to that inquiry and has the required permission.
- Inspect the workspace engagement and canonical inquiry link. Then inspect the child table and, for documents, the protected attachment ownership. Avoid assuming a matching display title establishes ownership.
- Compare authorized and unauthorized sender response keys and redacted values. Inspect nested arrays and error responses; an HTTP 403 with sensitive body content is still a failure.
- Confirm workspace
sender_visible, state and deliverable publication status. A hidden workspace should not be disclosed simply because the child row has a visibility flag. - Check WordPress capabilities and action nonces for staff operations, and portal session/CSRF/rate guards for sender operations. Do not conflate those independent controls.
- Inspect recent workspace events, version changes and hardening events for timing conflicts. Database counts alone do not prove the event log is complete.
- For a cross-inquiry attachment, inspect all creation and download paths;
link_document()checking ownership does not automatically coveradd_deliverable()attachment references. - For suspected private content in public HTML, caching, analytics or exports, contain the exposure first; preserve minimal internal evidence and scope downstream copies without publishing personal data.
Resolution
Treat any reproducible cross-client disclosure or unauthorized write as a security incident: disable the affected sender-facing operation or projection in the approved staging/production change process, preserve immutable evidence in a restricted store, and obtain owner/security authorization before patching. Fix the authorization check at the data-access boundary rather than hiding a UI element. Apply both parent inquiry validation and reference ownership validation to every read/write path, then add regression cases for other actors and object types.
A correctness repair must not fabricate audit history or silently delete evidence. Where identifiers have been mismapped, use a reviewed migration or compensating operation with before/after reconciliation, backup and rollback. For privacy redaction, coordinate with legal holds and retention policy; redaction in one table does not guarantee file removal or downstream cache erasure.
Validation
Use the full staged access matrix with at least two independent inquiries and separate sender sessions. Execute all critical deny cases, positive controls, stale/revoked-session tests, child-link tests, export/redaction controls, and cache/download checks. After any fix, repeat the prior failing sequence, verify no unintended writes, and independently inspect the result. A clean independently authored fixture is stronger than merely replaying assertions against code that was written to satisfy those assertions.
Verification
- Correct association: Workspace inquiry equals engagement inquiry; every child matches its workspace; attachment and related-deliverable relationships resolve to the same inquiry and appropriate workspace.
- Access protection: All cross-inquiry, unauthenticated, unauthorized, stale and revoked-session probes deny access without sensitive response fields or writes.
- Publication control: Sender snapshots contain only approved top-level and nested fields, eligible workspace states, published deliverables and non-deleted document references.
- Audit: Human transitions, publications, sender replies and privacy operations have attributable evidence and independently reconciled state changes.
- Reproducibility: Record fixture hash, source commit, test commands, environment, expected/observed results and reviewer decision. Each unexplained failure or unknown remains open.
- Deployment: Validate the installed plugin and schema versions, real portal permissions and access paths in staging. Do not mark production certified from a passing offline diagnostic.
Reporting boundary
Publish only sanitized counts, nonidentifying test aliases, methodology, caveats, control failures and remediation status. No private emails, member hashes, sender messages, protected-file names, session values, contract terms, document contents or internal security logs belong in a public Knowledge Base article. Avoid claims of GDPR compliance, complete tenant isolation or independent scientific certification without a separate documented assessment. A deterministic synthetic test demonstrates that the diagnostic behaves as written; it cannot by itself establish causal or empirical reliability of the deployment.
Known limitations and follow-up tests
- The reviewed workspace schema implements inquiry/engagement scoping, not a general multi-tenant policy engine. Cross-product organizations and external projects require separate verification.
- Sender member email hashes use unsalted SHA-256 of normalized email; treat them as sensitive pseudonymous identifiers, not anonymous data.
- The documented portal access path depends on the session model. Verify whether per-member permissions are enforced separately rather than inferring this from the stored
permissions_jsonvocabulary. - Deliverable attachment and related-deliverable references require explicit ownership tests across write and download paths. Source-level guards differ by method.
- The package does not test external networks, real mail, identity infrastructure, file-store retention, WordPress caching, privacy law, or incident processes.
- Installed software, role assignments, production safety, and the staging acceptance matrix have not been inspected or executed.
Technical references
- Secure Client Workspace and Collaboration
- Workspace repository
- Workspace schema
- Workspace admin actions
- Sender Portal public handlers
- Engagement repository
- Database definitions
- Repository source-level workspace test
- Integrated engagement dossier boundaries
- NIST — Attribute Based Access Control (ABAC): Definition and Considerations (background authorization reference; not a claim of implementation)
- OWASP Web Security Testing Guide (methodological reference for access-control testing)
