Skip to main content

Redaction Engine Service (Python)

This document describes the Flask application serving as a microservice for redacting sensitive information from text.

Overview

This Flask application provides an API to redact sensitive information from text. It can redact PII, proprietary identifiers, financial specifics, and customer-specific data. The redaction rules can be customized for each tenant.

Key Functionalities Exposed:

  • Receiving text and a tenant ID.
  • Redacting sensitive information from the text based on tenant-specific rules.
  • Returning the sanitized text and other information, such as the sensitivity score and the types of information that were redacted.

Technology Stack:

  • Flask: For creating the web server and API endpoints.

API Endpoints

POST /redact

Redacts sensitive information from text.

Request Body:

{
"text": "The text to be redacted.",
"tenant_id": "The ID of the tenant."
}

Responses:

  • 200 OK: A JSON object with the sanitized text and other information.
  • 400 Bad Request: If the request body is invalid.