Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Security and Privacy

Identity, authorization, and sensitive-data protections at BookWorm's API, AI, and logging boundaries.

Cross-cutting Concept

Purpose and Scope

Security and privacy govern every entry point, delegated identity, internal service call, and external model or tool integration. These rules protect customer, staff, operational, and AI-processing data while allowing independent teams to own and evolve their capabilities.

Visual Reference

Security and Trust Boundaries

Loading graph...

Core Rules and Standards

  1. Use one identity authority. Human users authenticate through the approved identity provider, and public APIs validate signed access tokens before authorization.
  2. Authorize at every protected boundary. Combine authenticated identity, required roles, and operation-specific permissions; do not rely on network placement as authorization.
  3. Apply least privilege. Grant the smallest role, scope, data access, model capability, and tool permission needed for a declared purpose.
  4. Propagate identity safely. Forward verified claims only through explicit security and trace metadata; never copy identity values into application authorization decisions by themselves.
  5. Keep secrets out of code and logs. Use managed identities or short-lived credentials for hosted integrations, and prohibit credentials and raw customer payloads in telemetry.
  6. Minimize and classify sensitive data. Collect only required PII, apply classification consistently, and anonymize or redact it before model, log, support, or export boundaries.
  7. Deny unsafe AI actions by default. AI agents may call only explicitly allowed tools and may not substitute conversational confidence for authorization.
Warning

The presence of a shared authentication or redaction helper is not evidence that a service enabled it. Each host and endpoint must register and verify the controls required for its trust boundary.

Mechanism / How It Works

BoundaryStandard PatternExpected Outcome
Public user ingressAuthenticate the user, validate issuer and audience, then evaluate role and operation policyUnauthenticated callers receive a denied response; authorized callers receive only permitted operations
API-to-API callsPropagate verified caller context and use least-privilege service identity for infrastructure accessInternal calls remain attributable and cannot bypass endpoint policy
Agent-to-agent callsUse federated workload identity and claims-based isolationEach agent acts only for the authorized workload and user context
Sensitive field handlingClassify data, redact structured logs, and avoid serializing raw command or response valuesSupport and telemetry remain useful without exposing customer secrets
AI model and tool boundariesScreen input, anonymize PII, isolate untrusted content, and enforce deny-by-default policiesUnsafe prompts, tools, or data are rejected before side effects occur

Threat Considerations

ConcernRequired Mitigation
Spoofing or stolen credentialsValidate signatures, issuer, audience, lifetime, and required claims; prefer short-lived credentials
Payload or prompt tamperingValidate inputs, separate instruction data from untrusted content, and verify tool schemas
Unauthorized actionsEnforce endpoint and tool policies independently of UI state
Data disclosureMinimize PII, redact logs, mask model prompts and results, and restrict storage or exports
Abuse and denial of serviceApply per-source and per-user limits to expensive endpoints and model workflows
Agent privilege escalationBind sessions to caller claims and require explicit allow rules for tools and mutations

Verification and Governance

  • Review the role, scope, resource, and secret requirements for every new endpoint, worker, model, or agent.
  • Exercise unauthorized, expired, malformed, and over-privileged requests in automated tests.
  • Audit secret, PII, and prompt handling; verify managed credentials and log redaction in deployed environments.
  • Treat a control as compliant only after runtime registration and an effective policy decision are demonstrated.
  • AI GovernanceCustom DocAI GovernanceInput screening, privacy middleware, policy enforcement, and tool boundaries for BookWorm's AI workflows.Ownerai-capabilities-teamOpen doc — AI screening, policy, and human-oversight controls.
  • Identity, Entra Agent Identities & RBAC MatrixCustom DocIdentity, Entra Agent Identities & RBAC MatrixReference for Microsoft Entra ID app registrations, Agent Identities for OBO token exchange, and per-service Managed Ide...Ownerplatform-engineering-teamOpen doc — Identity and infrastructure permission assignments.
  • Production Hardening & Compliance ChecklistCustom DocProduction Hardening & Compliance ChecklistPre-production SecOps and reliability checklist for locking down network perimeters, scaling limits, backup drills, and ...Ownerplatform-engineering-teamOpen doc — Production security verification.