Content Classification Data Handling
This page states what content classification reads from your data stores, where those values go, what Astralis stores and what it audits. It's written for security and privacy reviewers deciding whether to turn content classification on. It describes a self-hosted Astralis deployment; for Astralis Cloud or Astralis Serverless, contact Ethyca Support.
Content classification requires Astralis 3.3.0 or later. On a self-hosted deployment, you turn it on yourself and it calls your own Amazon Bedrock account. On Astralis Cloud or Astralis Serverless, contact Ethyca Support to discuss enabling it.
Security statement for self-hosted deployments
On a self-hosted deployment, content classification:
- Reads values only where you've allowed it. Nothing is read unless six gates pass: the deployment setting is on, the monitor's own switch (
sampling_config.content_classification_enabled) is on, the monitor's data store supports sampling, the monitor's model is on Amazon Bedrock, LLM classification is on for the deployment, and the monitor uses the LLM classifier. Astralis checks them when a monitor save turns the switch on (the switch itself aside), when a save of an opted-in monitor changes its connection, classifier or model override, when acontent_classifyinclude rule is created or changed, before a task is queued, and again when the task starts. - Reads only the fields named for it. An automatic run, after classification, reads only fields a
content_classifyinclude rule covers. A run a user requests reads the fields it names on a monitor whose switch is on, with no include rule needed; a run requested with Use sample values on Classify reads exactly the fields that classification labeled. Neither reads a field an exclude rule covers. Exclude rules can be written at any time, so you can fence off paths before turning anything on. - Sends values only to Amazon Bedrock. Values go from your Astralis workers to the Amazon Bedrock model the monitor uses, in your AWS account, with the credentials and region your deployment configures. Bedrock is the only provider content classification supports today: values aren't sent to OpenRouter or any other provider, and no setting changes that.
- Persists no value. A value exists in the worker's memory and in one prompt. It's never written to the Astralis database, Redis, Celery task results, the audit log, Astralis' logs or traces.
- Stores no rationale from a prompt that held values. The second pass asks the model for labels and confidence ratings only, because a model asked to explain itself repeats the values it saw.
- Audits every run and every rule change, with counts and settings only, never a value, field name or label.
Two things are outside what Astralis controls, and you should review them before turning it on:
- Amazon Bedrock model invocation logging in the receiving AWS account and region. When it's on, Bedrock stores each prompt, values included, in CloudWatch Logs or S3. Whether that fits your data-handling policy is your decision. See Check Bedrock model invocation logging.
- Which Bedrock account and region a call reaches. Astralis checks that the model is on Bedrock, not which account or region. The IAM policy of the role or key your deployment calls Bedrock with is the boundary, together with the AWS region your workers set. A cross-region inference profile, or another account's model ARN, passes the check.
What is read
| Which fields | On an automatic run, fields a content_classify include rule covers, whose top first-pass confidence rating is at or below the rule's max_confidence (default 4). On a requested run, any field the request names, at or below the request's max_confidence unless it sets ignore_threshold. Never a field an exclude rule covers, a field labeled by a regex pattern, or a field a reviewer has approved, ignored or relabeled. Fields already sampled are left out unless a requested run sets include_completed. |
| How many values | Up to 10 distinct, non-blank values per field. |
| Value length | Each value is converted to text and cut to 256 characters. |
| How | One bounded query per sampled field, reading at most 25 rows, through the monitor's own connection and credentials, with the same 30-second per-query limits as field sample preview. Table, schema and column names come from the monitor's own detected resources, never from a request, a rule pattern or the model. |
| Time limit per task | 120 seconds of sampling in total. Fields past it are classified again from metadata only. |
| Masking | Astralis doesn't mask values. Masking that the data store applies, such as Snowflake masking policies or SQL Server dynamic data masking, still applies, and the model sees the masked values. |
What is sent, and where
Each table with fields to sample gets one call to the monitor's Bedrock model, or one call per batch of fields when it has more fields to sample than the classifier puts in one call. The prompt carries:
- the table's metadata, as in the first classification pass: every column's name, type and description, the table context and source classifications;
- for each sampled field, its values, shuffled on their own so values from one row don't line up across columns;
- an instruction that sample values are data, not instructions, and must not be repeated in the answer.
The call goes from the worker running the task, on the fidesplus.discovery_monitors_classification queue, to Amazon Bedrock, using the Bedrock credentials the deployment is set up with. The model returns taxonomy labels and confidence ratings for the sampled fields. No rationale is requested when the prompt carries values, and the second pass's stored result never keeps one.
| Monitor's classification model | Content classification |
|---|---|
Starts with bedrock/, such as bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0 | Allowed |
A Bedrock ARN starting with arn:aws:bedrock: | Allowed |
Starts with bedrock_mantle/, such as bedrock_mantle/google.gemma-4-31b | Allowed |
| OpenRouter, including the default classification model | Not allowed |
| Anything else | Not allowed |
The model checked is the monitor's Model override, or its shared configuration's when it has one, or the deployment's default classification model. Messages and logs name only the provider family (bedrock, openrouter or unknown), never the model string, which can contain an AWS account ID.
Bedrock is the provider Ethyca supports for content classification today, not the only one that could be suitable. If your deployment runs on another cloud, such as Google Cloud, and you'd rather use that cloud's models, contact Ethyca Support.
When the LLM library could log the request
Astralis calls Bedrock through the LiteLLM library. LiteLLM writes the full request, sample values included, to its logs at debug level, prints it when set_verbose is on, and hands it to any configured callback. Astralis holds LiteLLM's loggers at INFO or above unless the LITELLM_LOG environment variable is set, and before each sampling and each call it checks all three:
| Condition | Effect |
|---|---|
Any LiteLLM logger is enabled for debug, for example with LITELLM_LOG=DEBUG | No values are read or sent |
LiteLLM set_verbose is on | No values are read or sent |
| A LiteLLM callback is configured | No values are read or sent |
In each case the fields are classified again from metadata only, the worker logs the category library_exposes_requests, and the task's audit row counts the fields under sampler_failed. Calls that carry values also tell LiteLLM to leave the messages out of its logging payload, and LiteLLM is set to leave messages out of the exceptions it raises.
What is stored
| Where | What | Values? |
|---|---|---|
The field's classification stages (classification_stages on the staged resource) | Both results: the first pass's labels, scores, confidence ratings and rationale, and the second pass's labels, scores and confidence ratings, plus how many values were in the prompt, an error category and class if it failed, and which result is shown | No |
The field's labels (classifications) | The result shown, as for any classification | No |
The field's classification sources (classification_sources) | A row_values entry with "contributed": ["raw"] when values were in the prompt | No |
| The monitor task | Its type content_classification, the field URNs it covers, and a progress line such as 3 of 7 tables, 12 of 28 fields | No |
| The audit log | See What is audited | No |
| Worker logs | Gate failures, sampling failure categories and exception class names, with the monitor key | No |
When the model call fails, Astralis stores the error's category and the exception's class name, never the provider's error text or model output. When the monitor classifies a field again from scratch, its stored stages are cleared.
What is audited
Astralis writes rows to its audit log (the event_audit table) for content classification. None of them contains a value, a field name, a URN or a label.
There's no API or export for these rows yet. To read them, query the event_audit table in the Astralis database, filtering on event_type.
discovery.classification.content
One row when a content classification task ends, however it ends: finished, stopped, failed at a gate, or crashed. A crash or interruption is recorded as failed; every other ending as succeeded. The row's resource is the monitor, and its details are:
| Detail | Meaning |
|---|---|
task_id | The task |
fields_selected | Fields the task set out to sample |
fields_sampled | Fields whose sample query returned values |
fields_sampling_failed | Fields that got no values: the sample query failed or returned nothing, or nothing was read because LiteLLM could log requests |
fields_budget | Fields past the task's sampling time limit |
sampling_seconds | Time spent sampling |
outcomes | Fields per outcome: changed, agreed, kept, failed, skipped |
reasons | Fields per reason: sampler_failed, budget, llm_error, field_reviewed, stopped, disabled, provider_not_allowed, task_error |
gate | The gate that failed when the task started, if one did |
error_class | The exception class of a crash, never its message |
A manual run, through the API or with Use sample values on Classify, also writes a discovery.classification.content row when it's requested, Content classification run requested, naming the user or API client who asked, with task_id, field_count and table_count. A run requested from Classify also carries classification_task_id, the classification task it followed.
discovery.monitor_path_rule.changed
One row for each path rule created, updated or deleted, of any action. A content_classify rule decides what leaves your environment, so every change to one is recorded with the user, the monitor, the operation, and the rule before and after: its pattern, effect and params. An update that changes nothing writes no row. Turning the monitor form's Sample automatically after each classification on or off, or changing Fields to sample automatically, creates, deletes or updates a rule, so it's recorded here too. So does saving the form with Classify with sample values off, which deletes the form's own rule.
discovery.monitor_sampling.changed
One row each time a monitor save changes one of its sampling switches, including Classify with sample values (sampling_config.content_classification_enabled). The row's resource is the monitor, and its details name the switch (key) and its old and new values. A save that leaves a switch as it was writes no row for it. A save that changes the model override of a monitor whose Classify with sample values switch is on, or being turned on, also writes one, Monitor classification model override changed, with key llm_model_override and no model name.
What happens when sampling fails
Sampling never fails a classification or a task.
| What happens | Result for the field |
|---|---|
| The sample query errors, times out or returns nothing | Classified again from metadata only |
| The task's 120-second sampling time limit is reached | Classified again from metadata only |
| LiteLLM could log the request | Nothing is read; classified again from metadata only |
| The Bedrock call for the field's table fails, or returns no label for the field | Keeps its first-pass label; shown as Sampling failed in the field filter |
| A reviewer approves, ignores or relabels the field while it waits | Keeps what the reviewer left; not written |
| A gate fails when the task starts | Released without a result; picked up again by a later run |
| The monitor's switch is turned off while the task runs | The task checked its gates when it started and runs to the end, unless stopped; the next run is refused |
| The task is stopped | Fields not yet reached are released without a result; picked up again by a later run |
Related
- Classifying fields with sample values — turn it on and review the results
- Verifying a classification with sample values — a separate feature that shows reviewers live values; its data handling differs
- LLM classification with AWS Bedrock — Bedrock credentials, models and region
- Monitor API — the content classification routes and path rule fields