Skip to content

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.

ClassDescriptionExamples in rag-sampleHandling
PublicOpenly 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.

The following are not corpus data but are produced by the system and warrant a note so they are not confused with “public”:

DataClassHandling
DB credentialsSecretAWS 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)OperationalRetention 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 completionsOperationalSubject to AWS Bedrock’s own data-handling terms; not used for model training under default Bedrock settings.
Eval reports (rag-sample-eval)OperationalQA 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 stateOperationalS3 backend with S3-native state locking per environment (RAG001). May contain ARNs and resource IDs; no plaintext secrets.

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:
    1. A new data-classification entry on this page identifying the class and its handling rules.
    2. A re-run of the threat model.
    3. A re-scope of compliance.
    4. Authentication on /query (or removal of public access).
    5. A retention/deletion policy on the relevant CloudWatch log groups and Aurora data.
    6. A KMS review: customer-managed keys instead of AWS-managed, with explicit key policy.
    7. 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.

  • Question text and answer text in the public-/query model are treated as public by virtue of the endpoint. Anyone planning to remove public access should reclassify both before doing so.