A human reads the output and needs to recognise the record
Tokenization is the one that keeps agents useful: alice@example.com always becomes the same tok_…, so the agent can group, join, and refer to it — and can hand the token back to Warden in a later operation — without the address ever entering its context.
Masking applied to result rows is defeated by one expression:
SELECT upper(email) FROM customers; -- not the column, so not maskedSELECT c.email AS contact FROM customers c; -- renamed, so not matched
So where the engine allows it, masking happens inside the statement. Each governed table is replaced by a subquery in which the column is already masked, and the agent’s own SQL can only reach the masked value — through an alias, a function, a join, or anything else it writes. The certification suite attacks exactly these paths.Masking keys come from masking_salt, so tokens are stable across restarts and consistent everywhere the same value appears. Treat the salt as a secret: it is what stops a token being reversed by someone who can guess likely inputs.
If a masking rule cannot be applied, the entire result set is discarded and the operation returns masking_failed. Returning partially masked rows would leak precisely the values the rule exists to protect.
Masking transforms a value the agent may see. Column restriction means the column is not in the projection at all — SELECT * returns the permitted columns, and naming an unpermitted one is refused. Use restriction for columns the agent has no business reading, and masking for ones it needs to work with but must not read.
It is not encryption, and it is not a substitute for not storing the data. A determined agent that can read enough masked values and correlate them with data it already has can sometimes infer the original. Masking raises the cost and removes the accident — an agent pasting a customer list into a prompt — which is the realistic threat.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Warden","description":"The warden between your agents and your database. Governed data access for AI agents.","colors":{"primary":"#1F6F5C","light":"#3BA88A","dark":"#12453A"},"logo":{"light":"https://mintcdn.com/buildlab/dUwtnXQEzOkmdfAr/logo/warden-light.svg?fit=max\u0026auto=format\u0026n=dUwtnXQEzOkmdfAr\u0026q=85\u0026s=5c916c3897998322e4d8e61a772aa361","dark":"https://mintcdn.com/buildlab/dUwtnXQEzOkmdfAr/logo/warden-dark.svg?fit=max\u0026auto=format\u0026n=dUwtnXQEzOkmdfAr\u0026q=85\u0026s=1123f32f05cf0449b100aa2061be7fcb","href":"https://buildlab.mintlify.site/"},"favicon":"https://mintcdn.com/buildlab/dUwtnXQEzOkmdfAr/favicon.svg?fit=max\u0026auto=format\u0026n=dUwtnXQEzOkmdfAr\u0026q=85\u0026s=70271017cbd28ff18501d6f71f3f7667","navbar":{"links":[{"href":"https://github.com/Abhishek-Mallick/warden-dist/releases","label":"Releases"}],"primary":{"type":"button","label":"Quickstart","href":"/quickstart"}},"footer":{"socials":{"github":"https://github.com/Abhishek-Mallick/warden-dist"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"buildlab","hasAudioNarration":false,"actualSubdomain":"buildlab","customDomains":["warden.buildlab.in"],"gitSource":{"type":"github","owner":"abhishek-mallick","repo":"warden","deployBranch":"main","contentDirectory":"web","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ab93fc6a3c670255a7c1586","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Documentation","count":25},{"language":"default","tag":"Concepts","count":12},{"language":"default","tag":"How Warden works","count":7},{"language":"default","tag":"Offerings","count":7},{"language":"default","tag":"Configure","count":5},{"language":"default","tag":"Engines","count":5},{"language":"default","tag":"Install","count":5},{"language":"default","tag":"Operate","count":5},{"language":"default","tag":"API","count":3},{"language":"default","tag":"Reference","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"concepts/masking","slug":"/concepts/masking","pageMetadata":{"title":"Masking","description":"Keep customer data out of a model's context, without making the agent useless.","href":"/concepts/masking"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Keep customer data out of a model’s context, without making the agent useless.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Rows an agent reads become text in a model’s context. Masking decides which values it may see.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`masking`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` customers.email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`tokenize`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` customers.phone`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`partial`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` payments.card_number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`redact`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Result`}),_jsx(_components.th,{children:`Use it when`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`redact`})}),_jsx(_components.td,{children:`A fixed marker`}),_jsx(_components.td,{children:`The agent never needs the value`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`hash`})}),_jsx(_components.td,{children:`A deterministic digest`}),_jsx(_components.td,{children:`Equality matters, the value does not`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tokenize`})}),_jsx(_components.td,{children:`A deterministic token that round-trips`}),_jsxs(_components.td,{children:[`The agent must `,_jsx(_components.em,{children:`refer`}),` to the value later`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`partial`})}),_jsx(_components.td,{children:`A recognisable fragment`}),_jsx(_components.td,{children:`A human reads the output and needs to recognise the record`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Tokenization is the one that keeps agents useful: `,_jsx(_components.code,{children:`alice@example.com`}),` always becomes the same `,_jsx(_components.code,{children:`tok_…`}),`, so the agent can group, join, and refer to it — and can hand the token back to Warden in a later operation — without the address ever entering its context.`]}),`\n`,_jsx(Heading,{level:`2`,id:`masked-inside-the-statement`,children:`Masked inside the statement`}),`\n`,_jsx(_components.p,{children:`Masking applied to result rows is defeated by one expression:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` upper`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(email) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` customers; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- not the column, so not masked`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`email`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` contact `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` customers c; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- renamed, so not matched`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`So where the engine allows it, masking happens `,_jsx(_components.strong,{children:`inside`}),` the statement. Each governed table is replaced by a subquery in which the column is already masked, and the agent’s own SQL can only reach the masked value — through an alias, a function, a join, or anything else it writes. The certification suite attacks exactly these paths.`]}),`\n`,_jsxs(_components.p,{children:[`Masking keys come from `,_jsx(_components.code,{children:`masking_salt`}),`, so tokens are stable across restarts and consistent everywhere the same value appears. Treat the salt as a secret: it is what stops a token being reversed by someone who can guess likely inputs.`]}),`\n`,_jsx(Heading,{level:`2`,id:`failure-discards-the-result`,children:`Failure discards the result`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If a masking rule cannot be applied, `,_jsx(_components.strong,{children:`the entire result set is discarded`}),` and the operation returns `,_jsx(_components.code,{children:`masking_failed`}),`. Returning partially masked rows would leak precisely the values the rule exists to protect.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`column-restriction-is-separate`,children:`Column restriction is separate`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`kind`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`table`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`customers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`columns`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`tenant_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`tier`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Masking transforms a value the agent may see. Column restriction means the column is not in the projection at all — `,_jsx(_components.code,{children:`SELECT *`}),` returns the permitted columns, and naming an unpermitted one is refused. Use restriction for columns the agent has no business reading, and masking for ones it needs to work with but must not read.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-masking-is-not`,children:`What masking is not`}),`\n`,_jsx(_components.p,{children:`It is not encryption, and it is not a substitute for not storing the data. A determined agent that can read enough masked values and correlate them with data it already has can sometimes infer the original. Masking raises the cost and removes the accident — an agent pasting a customer list into a prompt — which is the realistic threat.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Masking","description":"Keep customer data out of a model's context, without making the agent useless.","href":"/concepts/masking"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Masked inside the statement","slug":"masked-inside-the-statement","depth":2,"children":[]},{"title":"Failure discards the result","slug":"failure-discards-the-result","depth":2,"children":[]},{"title":"Column restriction is separate","slug":"column-restriction-is-separate","depth":2,"children":[]},{"title":"What masking is not","slug":"what-masking-is-not","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"buildlab","siteName":"Warden","title":"Masking - Warden","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-23T07:57:23.486Z","originalFileLocation":"concepts/masking.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Keep customer data out of a model\u0026#x27;s context, without making the agent useless.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Warden\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Masking - Warden\">\u003cmeta data-mint-head property=\"og:description\" content=\"Keep customer data out of a model\u0026#x27;s context, without making the agent useless.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Warden\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://warden.buildlab.in/concepts/masking\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://buildlab.mintlify.site/_mintlify/api/og/v2?division=How+Warden+works\u0026amp;title=Masking\u0026amp;description=Keep+customer+data+out+of+a+model%27s+context%2C+without+making+the+agent+useless.\u0026amp;theme=e77cba30ec62e899ed9fdfd5\u0026amp;signature=5dfbd26beb0415db1bd20f7c5a04c814a1a4ba7e8b0ff4f05db2bc4e1a842e42\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Masking - Warden\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Keep customer data out of a model\u0026#x27;s context, without making the agent useless.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://buildlab.mintlify.site/_mintlify/api/og/v2?division=How+Warden+works\u0026amp;title=Masking\u0026amp;description=Keep+customer+data+out+of+a+model%27s+context%2C+without+making+the+agent+useless.\u0026amp;theme=e77cba30ec62e899ed9fdfd5\u0026amp;signature=5dfbd26beb0415db1bd20f7c5a04c814a1a4ba7e8b0ff4f05db2bc4e1a842e42\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/buildlab/4rM301cFHivaFqFN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Warden\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1F6F5C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://warden.buildlab.in/concepts/masking\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/concepts/masking.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://warden.buildlab.in/#organization\",\"name\":\"Warden\",\"url\":\"https://warden.buildlab.in\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/buildlab/dUwtnXQEzOkmdfAr/logo/warden-light.svg?fit=max\u0026auto=format\u0026n=dUwtnXQEzOkmdfAr\u0026q=85\u0026s=5c916c3897998322e4d8e61a772aa361\"}},{\"@type\":\"WebSite\",\"@id\":\"https://warden.buildlab.in#website\",\"name\":\"Warden\",\"url\":\"https://warden.buildlab.in\",\"publisher\":{\"@id\":\"https://warden.buildlab.in/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://warden.buildlab.in/concepts/masking#webpage\",\"url\":\"https://warden.buildlab.in/concepts/masking\",\"name\":\"Masking\",\"description\":\"Keep customer data out of a model's context, without making the agent useless.\",\"dateModified\":\"2026-09-23T07:57:23.486Z\",\"isPartOf\":{\"@id\":\"https://warden.buildlab.in#website\"},\"breadcrumb\":{\"@id\":\"https://warden.buildlab.in/concepts/masking#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://warden.buildlab.in/concepts/masking#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"How Warden works\",\"item\":\"https://warden.buildlab.in/concepts/architecture\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Masking\",\"item\":\"https://warden.buildlab.in/concepts/masking\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://warden.buildlab.in/concepts/masking#article\",\"headline\":\"Masking\",\"name\":\"Masking\",\"description\":\"Keep customer data out of a model's context, without making the agent useless.\",\"url\":\"https://warden.buildlab.in/concepts/masking\",\"mainEntityOfPage\":{\"@id\":\"https://warden.buildlab.in/concepts/masking#webpage\"},\"dateModified\":\"2026-09-23T07:57:23.486Z\",\"publisher\":{\"@id\":\"https://warden.buildlab.in/#organization\"},\"isPartOf\":{\"@id\":\"https://warden.buildlab.in#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Warden\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Warden","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Concepts","groups":[{"group":"How Warden works","pages":[{"title":"Architecture","href":"/concepts/architecture"},{"title":"The capability ladder","href":"/concepts/capability-ladder"},{"title":"Blast radius","href":"/concepts/blast-radius"},{"title":"Previews and fences","href":"/concepts/previews-and-fences"},{"title":"Leases","description":"Agent access with an expiry attached, issued on demand and revocable.","href":"/concepts/leases"},{"title":"Masking","href":"/concepts/masking"},{"title":"Reliability","description":"Circuit breakers, idempotency, loud failures, and per-agent pools.","href":"/concepts/reliability"}]},{"group":"Engines","pages":[{"title":"PostgreSQL","href":"/engines/postgresql"},{"title":"MongoDB","href":"/engines/mongodb"},{"title":"Neo4j","href":"/engines/neo4j"},{"title":"In-memory engine","href":"/engines/memory"},{"title":"Roadmap","href":"/engines/roadmap"}]}]},{"tab":"API","pages":[{"title":"API","href":"/api/data-plane"}]}]},"basePath":"","title":"Masking - Warden","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":[],"chunks":[]}