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
- Use one identity authority. Human users authenticate through the approved identity provider, and public APIs validate signed access tokens before authorization.
- Authorize at every protected boundary. Combine authenticated identity, required roles, and operation-specific permissions; do not rely on network placement as authorization.
- Apply least privilege. Grant the smallest role, scope, data access, model capability, and tool permission needed for a declared purpose.
- Propagate identity safely. Forward verified claims only through explicit security and trace metadata; never copy identity values into application authorization decisions by themselves.
- 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.
- Minimize and classify sensitive data. Collect only required PII, apply classification consistently, and anonymize or redact it before model, log, support, or export boundaries.
- 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
| Boundary | Standard Pattern | Expected Outcome |
|---|---|---|
| Public user ingress | Authenticate the user, validate issuer and audience, then evaluate role and operation policy | Unauthenticated callers receive a denied response; authorized callers receive only permitted operations |
| API-to-API calls | Propagate verified caller context and use least-privilege service identity for infrastructure access | Internal calls remain attributable and cannot bypass endpoint policy |
| Agent-to-agent calls | Use federated workload identity and claims-based isolation | Each agent acts only for the authorized workload and user context |
| Sensitive field handling | Classify data, redact structured logs, and avoid serializing raw command or response values | Support and telemetry remain useful without exposing customer secrets |
| AI model and tool boundaries | Screen input, anonymize PII, isolate untrusted content, and enforce deny-by-default policies | Unsafe prompts, tools, or data are rejected before side effects occur |
Threat Considerations
| Concern | Required Mitigation |
|---|---|
| Spoofing or stolen credentials | Validate signatures, issuer, audience, lifetime, and required claims; prefer short-lived credentials |
| Payload or prompt tampering | Validate inputs, separate instruction data from untrusted content, and verify tool schemas |
| Unauthorized actions | Enforce endpoint and tool policies independently of UI state |
| Data disclosure | Minimize PII, redact logs, mask model prompts and results, and restrict storage or exports |
| Abuse and denial of service | Apply per-source and per-user limits to expensive endpoints and model workflows |
| Agent privilege escalation | Bind 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.
Related Documentation
- 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.