Data Classification
rag-sample has one class of data today. This page exists to make that explicit, and to set up governance for adding a second.
Classes
Section titled “Classes”| Class | Description | Examples in rag-sample | Handling |
|---|---|---|---|
| Public | Openly licensed third-party content with no expectation of confidentiality. | The neural-bridge/rag-dataset-12000 corpus (Apache-2.0): documents, embeddings, chunk metadata, and any derived index. The question text submitted to /query and the generated answer (both treated as public because the endpoint is public). | Stored in Aurora with default encryption. No access control beyond IAM on the cluster. The generated answer is never logged, and question text is logged only once #416 lands (see the CloudWatch logs row). Log groups have finite retention: today 30 days for the authorizer log group and 14 days for the API and access log groups; the target is 30 days on every log group from one variable per environment (D-8), set by #416. |
No other class exists today. Personal data, credentials, customer content, and internal documents are out of scope.
Operational data (not corpus)
Section titled “Operational data (not corpus)”The following are not corpus data but are produced by the system and warrant a note so they are not confused with “public”:
| Data | Class | Handling |
|---|---|---|
| DB credentials | Secret | AWS Secrets Manager, KMS-encrypted, readable by each environment’s Lambda roles for that environment’s secret (RAG001 infrastructure) and in QA by the eval CI role rag-sample-qa-eval-role. Each CI deploy role’s direct grants read only its own environment’s secret, named by ARN in bootstrap; the QA smoke check uses that grant to reach the cluster over the Data API. The stack-role boundary still permits reads of the other environment’s secret through a Lambda role the deploy role creates (threat model T4, risk #504). Never logged. |
| CloudWatch logs (API, authorizer and access logs) | Operational | Retention today: 30 days for the authorizer log group, 14 days for the API and access log groups. Logged content today: the authorizer and the API both log the key ID, and the API does not log question text; X-Ray tracing is live until #416 removes it. Target: 30 days on every log group from one variable per environment, and the API logs question text and key label with no answers or citations (D-8); #416 adds the question log and its test. Treated as public because the inputs are public; this assumption breaks the moment auth or PII enters scope. |
| Bedrock prompts and completions | Operational | Subject to AWS Bedrock’s own data-handling terms; not used for model training under default Bedrock settings. |
Eval reports (rag-sample-eval) | Operational | QA only. Answer reports hold each eval question, its ground-truth answer, and the generated answer (all public-class text), plus scores; retrieval reports hold aggregates only. S3 with a customer-managed KMS key, TLS-only, no public access, 90-day expiry; the eval CI role can write but not read. |
| Terraform state | Operational | S3 backend with S3-native state locking per environment (RAG001). May contain ARNs and resource IDs; no plaintext secrets. |
The classification rule
Section titled “The classification rule”A change in data class is a re-architecture event.
- The corpus class is fixed at “public” by the architecture, not by policy. The endpoint is gated only by an operator-issued bearer token with a per-key lifetime request quota (RAG009), one key per recipient; logs retain content for 14 to 30 days today and 30 days once #416 lands (D-8), no per-tenant isolation exists. Pointing ingestion at non-public data would require changing those properties first.
- Adding any non-public class to the corpus requires, before ingestion runs:
- A new data-classification entry on this page identifying the class and its handling rules.
- A re-run of the threat model.
- A re-scope of compliance.
- Authentication on
/query(or removal of public access). - A retention/deletion policy on the relevant CloudWatch log groups and Aurora data.
- A KMS review: customer-managed keys instead of AWS-managed, with explicit key policy.
- An ADR documenting the decision and the controls.
- No automated control prevents bypassing this rule today. It is a process gate, owned by the operator, enforced at code-review time on any change to the ingestion configuration or the corpus reference in
pyproject.toml/ Terraform.
This is the link to T3 in the threat model: the architecture cannot tell one corpus from another. The rule above is what stops a corpus swap from silently changing the product’s data-handling posture.
What is not classified here
Section titled “What is not classified here”- Question text and answer text in the public-
/querymodel are treated as public by virtue of the endpoint. Anyone planning to remove public access should reclassify both before doing so.
© 2026 Benjamin Arunski