How to Configure Copilot Studio DynamoDB Data Masking

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up copilot studio dynamodb data masking by filtering fields before the agent reads them. You also apply strict cloud role permissions to limit what attributes the bot can read. Many teams build custom bots that read customer tables for support tasks. Teams often assign broad read permissions to get a quick prototype working. Broad roles let the bot pull full records with emails, phone numbers, and card numbers. If a user prompts the bot for details, those private fields can leak in chat.

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You set up copilot studio dynamodb data masking by filtering fields before the agent reads them. You also apply strict cloud role permissions to limit what attributes the bot can read. Many teams build custom bots that read customer tables for support tasks. Teams often assign broad read permissions to get a quick prototype working. Broad roles let the bot pull full records with emails, phone numbers, and card numbers. If a user prompts the bot for details, those private fields can leak in chat.

How native copilot studio dynamodb data masking works

Notice that the NoSQL table service does not rewrite text inside an attribute on its own. Instead, native copilot studio dynamodb data masking relies on two main design patterns. First, teams use attribute-level permissions inside the cloud identity policy. You write a policy condition that lists the exact attributes the bot role may read. The policy blocks the bot role from reading attributes that hold national IDs or emails. If the bot asks for a blocked attribute, the database rejects the whole read request.

Second, teams build a custom API function between the bot and the table. The bot sends a request to this custom function instead of reading the table. The function assumes an identity role, reads the item, and runs regex rules in code. Those code rules replace emails, phone numbers, and card numbers with placeholder characters. Then the function sends the cleaned payload back to the bot workflow. This keeps raw fields out of the prompt context during a user chat session.

What native role policies solve and what they miss

Native identity policies do a great job of locking down whole attributes or specific item keys. They verify which role can log in and which top-level fields that role may request. This works well when your table stores one piece of data per attribute. If phone numbers live in a single column, the role policy can block that column.

Still, NoSQL tables often hold nested JSON maps, free-text notes, and mixed item shapes. Native role policies cannot look inside a JSON map or a text blob during a query. They either allow the entire attribute or reject the query with an error. If a support note contains a customer email or card number, the role allows it through. Also, maintaining custom scrubbing code for every bot workflow takes a lot of team time. Every time a table schema changes, engineers must update and deploy their custom filtering code. Native permissions decide who logs in, not what individual requests return in flight.

Data Masking (Static) + DynamoDB Fine-Grained Access: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Best practices for scoping bot table permissions

Start by creating a dedicated role for each bot rather than sharing one broad role. Restrict that role to read-only actions on the specific table your bot needs. Never grant scan permissions if the bot only needs to look up single items by key. Use projection expressions in every read request so the bot only asks for safe fields. Separate private customer data like national IDs into a different table with stricter role rules. Log every read call in your cloud audit trail so security teams can review bot activity. Review these logs often to spot unusual query patterns or failed permission checks.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Does the database have a built-in dynamic masking toggle?

No, the database service does not have a native feature that redacts text inside returned fields. You can only block whole attributes with identity policies or filter data in your own code.

What happens if a bot queries an attribute blocked by a role policy?

The database rejects the entire request and returns an error to the bot workflow. Your bot must use a projection expression that excludes the restricted attributes to get a response.

Which private fields can regex masking rules rewrite in query results?

Pattern-based masking rules can match and rewrite structured fields like emails, phone numbers, card numbers, and national IDs. Masking rewrites matched fields in results before the payload reaches the bot or the user.

The query runs. The emails stay hidden.