Record and review redaction requests
When you use the redact
method to redact a plain text string, you can also choose to record the request.
The recorded requests are encrypted.
When you make the request, you specify the number of hours to keep the recorded request. After that amount of time elapses, the request is completely purged. Recorded requests are never kept more than 720 hours, regardless of the configured retention time.
From the Request Explorer, you can review your recorded requests to check the results and assess the quality of the redaction. You can also test changes to the redaction configuration.
You cannot view requests from other users.
Recording a redaction request
To record a redaction request, you include the record_options
argument:
The record_options
argument includes the following parameters:
record
- Whether to record the request. The default isFalse
. To record the request, set record toTrue
.retention_time_in_hours
- The number of hours to preserve the recorded request. The default is 1. After the retention time elapses, the request is purged completely.tags
- A list of tags to assign to the request. The tags are mostly intended to make it easier to search for requests on the Request Explorer page.
Viewing the list of recorded requests
The Request Explorer page in Textual contains the list requests that you recorded and that are not yet purged. You cannot view requests from other users.
To display the Request Explorer page, in the Textual navigation bar, click Request Explorer.
For each request, the list includes:
A 255-character preview of the text that was sent for redaction.
The tags assigned to the request.
The date when the request will be purged.
Filtering the requests
You can search for a request based on text that is contained in the redacted text, and by the tags that you assigned to the request.
To search by text from the string, in the search field, begin to type the text.
To search by an assigned tag, in the search field, type tags:
followed by the tag to search for.
Previewing the request results
From the request list, to view the results of a request, click the request row.
By default, the preview uses Identification view. For each detected entity, Identification view displays the value and the entity type.
To instead display only the replacement value, which by default is the entity type, click Replacement.
Testing changes to the redaction configuration
From the preview, you can test how the results change when you:
Change the handling option for entity types.
Add and exclude values for entity types.
Displaying the Edit Request panel
To display the edit panel, from the request preview page, click Edit.
The Edit Request panel displays the full list of the available entity types.
Changing entity type handling options
You can change how Textual handles detected entity values for each entity type.
Note that the handling option changes are not saved when you close the preview and return to the requests list.
Available handling options
The handling options are:
Off - Indicates to ignore values for this entity type.
Redact - This is the default option. Indicates to replace each value with a token that represents the entity type.
Synthesize - Indicates to replace each value with a realistic replacement value.
Changing the handling option for a single entity type
To change the handling option for a single entity type, either:
Click the handling option value for the entity type, then select the handling option.
Click the entity type, then under Generator, click the handling option.
Selecting the same handling option for all entity types
To select the same handling option for all of the entity types:
Click Bulk Edit.
From the Bulk Edit dropdown list, select the handling option.
Configuring added and excluded values for an entity type
To configure added and excluded values for an entity type, click the entity type.
The Edit Request panel expands to display the Add to detection and Exclude from detection lists.
You use the Add to detection list to configure regular expressions to identify additional values to detect as the selected entity type.
You use the Exclude from detection list to configure regular expressions to identify values to not detect as the selected entity type.
Note that the added and excluded values are not saved when you close the preview and return to the requests list.
Creating a regular expression for an added or excluded value
To create a regular expression for added or excluded values:
Click the Add regex option for that list.
In the field, provide a regular expression to identify values to add or exclude.
Press Enter.
Editing a regular expression for added or excluded values
To edit a regular expression:
Click the edit icon for the expression.
In the field, edit the expression.
Click the save icon.
Deleting a regular expression for added or excluded values
To delete a regular expression, click the delete icon for that expression.
Viewing whether an entity type has added or excluded values
When an entity type has added values, the added values icon displays for that entity type.
When an entity type has excluded values, the excluded values icon displays for that entity type.
Replaying the request
To replay the request based on the current configuration, click Replay.
When you replay the request, in addition to the Identification and Replacement options, you use the Diff toggle to indicate whether to compare the original and new results.
For our example, we made the following changes to the configuration:
For Given Name and Family Name, changed the handling option to Synthesize.
For Credit Card, indicated to ignore the value 41111111111.
Replayed results views with the Diff toggle off
When the Diff toggle is in the off position, Identification view only reflects changes to the added and excluded values.
In our example, we configured 41111111111 to not be detected as a credit card number. In the replayed request, it is instead detected as a numeric value.
Replacement view reflects both the added and excluded values and the changes to the handling option.
For our example, in addition to the entity type change for the credit card number 41111111111, the given and family names are now realistic replacement values instead of the entity types.
Replayed results views with the Diff toggle on
When you set the Diff toggle to the on position, the preview displays the original content to the left, and the modified content to the right.
In Identification view, you can see the changes to the entity detection based on the added and excluded values.
In Replacement view, you can also see the changes to the selected handling options for the entity types.
Clearing all of the configuration changes
To clear all of the regular expressions for all of the entity types, click Remove Changes.
Last updated