Secrets use envelope encryption with AES-256-GCM, providing strong confidentiality and integrity.
Each project has a dedicated Data Encryption Key (DEK) wrapped by a root Key Encryption Key (KEK) managed by AWS KMS, creating strict
isolation boundaries.Secrets remain encrypted at rest and are only decrypted in-memory on dataplane machines running workflows
that requires those secrets, with all communication secured through mutual TLS (mTLS).
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Tensorlake","colors":{"primary":"#047857","light":"#047857","dark":"#0D1117"},"logo":{"light":"https://mintcdn.com/tensorlake-35e9e726/pfTs6FweN5gDe2IY/logo/TL-Light.svg?fit=max\u0026auto=format\u0026n=pfTs6FweN5gDe2IY\u0026q=85\u0026s=de3c3b6e814425b1be6902f8af88b719","dark":"https://mintcdn.com/tensorlake-35e9e726/pfTs6FweN5gDe2IY/logo/TL-Dark.svg?fit=max\u0026auto=format\u0026n=pfTs6FweN5gDe2IY\u0026q=85\u0026s=b08c049d9fabd32c205f6e8d9f621ba3"},"favicon":"https://mintcdn.com/tensorlake-35e9e726/fVE8-oNRlpqs-U2A/logo/favicon.png?fit=max\u0026auto=format\u0026n=fVE8-oNRlpqs-U2A\u0026q=85\u0026s=15a7031809c3f949e46d8b9c926c28f4","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"},"server":"https://api.tensorlake.ai/"}},"appearance":{"default":"system"},"navbar":{"links":[{"href":"https://tensorlake.ai/blog","label":"Blog"},{"href":"https://join.slack.com/t/tensorlakecloud/shared_invite/zt-32fq4nmib-gO0OM5RIar3zLOBm~ZGqKg","label":"Slack"},{"href":"https://github.com/tensorlakeai/tensorlake","label":"GitHub"}],"primary":{"type":"button","label":"Dashboard","href":"https://cloud.tensorlake.ai/login"}},"footer":{"socials":{"website":"https://www.tensorlake.ai/","x":"https://x.com/tensorlake","github":"https://github.com/tensorlakeai","linkedin":"https://linkedin.com/company/tensorlake","bluesky":"https://bsky.app/profile/tensorlake.bsky.social"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Tensorlake Documentation","og:title":"Tensorlake Documentation","og:description":"Build with Tensorlake: secure and stateful sandboxes for AI agents, durable orchestration for long-running workflows","og:url":"https://docs.tensorlake.ai","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@tensorlake","twitter:creator":"@tensorlake","twitter:title":"Tensorlake Documentation","twitter:description":"Sandboxes and orchestration for AI agents.","og:image":"https://docs.tensorlake.ai/images/og-preview.png","og:image:width":"2400","og:image:height":"1260","twitter:image":"https://docs.tensorlake.ai/images/og-preview.png","description":"Tensorlake Documentation— secure and stateful sandboxes for AI agents, durable workflow orchestration for long-running workflows, covers in Python and TypeScript SDKs plus CLI","keywords":"AI agents, sandboxes, stateful sandboxes, durable execution, agent orchestration, agentic workflows","author":"Tensorlake","robots":"index, follow, max-image-preview:large, max-snippet:-1","googlebot":"index, follow"},"indexing":"all"},"fonts":{"family":"Inter"},"integrations":{"ga4":{"measurementId":"G-EBFHHWKKQM"}},"contextual":{"options":["claude","chatgpt","cursor","grok","copy","view"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tensorlake-35e9e726","hasAudioNarration":false,"actualSubdomain":"tensorlake-35e9e726","customDomains":["docs.tensorlake.ai"],"gitSource":{"type":"github","owner":"tensorlakeai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad946de658b2a79ae61e3f2","collectionId":"cb2581eb-838e-4e8e-afb0-11cd88dd423c","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad946de658b2a79ae61e3f2"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ad946de658b2a79ae61e3f2","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Sandboxes","count":90},{"language":"default","tag":"API Reference","count":48},{"language":"default","tag":"Guides","count":41},{"language":"default","tag":"Overview","count":25},{"language":"default","tag":"Orchestrate","count":24},{"language":"default","tag":"Use Cases","count":23},{"language":"default","tag":"Process Management","count":15},{"language":"default","tag":"Life Cycle Management","count":13},{"language":"default","tag":"Platform Features","count":13},{"language":"default","tag":"Cloud Volumes","count":9}]},"assistantConfig":{},"hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"editor-v7-file-tree","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":"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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"applications/secrets","slug":"/applications/secrets","pageMetadata":{"title":"Secrets","description":"Providing secrets to Tensorlake functions","icon":"user-secret","og:image":"https://docs.tensorlake.ai/images/og/applications-secrets.png","twitter:image":"https://docs.tensorlake.ai/images/og/applications-secrets.png","href":"/applications/secrets"},"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: \"Providing secrets to Tensorlake functions\"\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`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Secrets allow providing sensitive values to your Tensorlake functions in a secure manner without having to put them into your code.`}),`\n`,_jsx(Heading,{level:`2`,id:`storing-secrets`,children:`Storing secrets`}),`\n`,_jsx(_components.p,{children:`You can store secrets on Tensorlake Cloud using the CLI:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`tl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secrets`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` set`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` AWS_ACCESS_KEY=MY_AWS_ACCESS_KEY`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`tl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secrets`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` set`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` OPENAI_API_KEY=MY_OPENAI_API_KEY`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`using-secrets`,children:`Using secrets`}),`\n`,_jsx(_components.p,{children:`Stored secrets are available as environment variables within your Tensorlake functions:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`7`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`@application()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`@function(secrets=[\"AWS_ACCESS_KEY\", \"OPENAI_API_KEY\"])`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`def my_function() -> str:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` aws_access_key = os.environ[\"AWS_ACCESS_KEY\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` openai_api_key = os.environ[\"OPENAI_API_KEY\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`secrets-and-application-deployment`,children:`Secrets and application deployment`}),`\n`,_jsx(_components.p,{children:`When you add or update a secret used by an already deployed application, it needs to get redeployed for the new secret values to take effect.`}),`\n`,_jsx(Heading,{level:`2`,id:`cli-commands`,children:`CLI Commands`}),`\n`,_jsx(Heading,{level:`3`,id:`list-secrets`,children:`List Secrets`}),`\n`,_jsx(_components.p,{children:`List secrets that have been previously set. Values are not shown for security reasons.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` tl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secrets`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` Name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` Created`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` At`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` -----------`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` ----------`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` SECRET_NAME`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` Date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`set-a-secret`,children:`Set a Secret`}),`\n`,_jsx(_components.p,{children:`Set a secret will create or update a secret.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` tl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secrets`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` set`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`SECRET_NAM`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`E`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`SECRET_VALU`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`E`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [\u003cSECRET_NAME>=\u003cSECRET_VALUE>]`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`unset-a-secret`,children:`Unset a Secret`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`tl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secrets`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` unset`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`SECRET_NAM`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`E`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [\u003cSECRET_NAME>]`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`security`,children:`Security`}),`\n`,_jsx(_components.p,{children:`Secrets use envelope encryption with AES-256-GCM, providing strong confidentiality and integrity.\nEach project has a dedicated Data Encryption Key (DEK) wrapped by a root Key Encryption Key (KEK) managed by AWS KMS, creating strict\nisolation boundaries.`}),`\n`,_jsx(_components.p,{children:`Secrets remain encrypted at rest and are only decrypted in-memory on dataplane machines running workflows\nthat requires those secrets, with all communication secured through mutual TLS (mTLS).`})]})}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":"Secrets","description":"Providing secrets to Tensorlake functions","icon":"user-secret","og:image":"https://docs.tensorlake.ai/images/og/applications-secrets.png","twitter:image":"https://docs.tensorlake.ai/images/og/applications-secrets.png","href":"/applications/secrets"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Storing secrets","slug":"storing-secrets","depth":2,"children":[]},{"title":"Using secrets","slug":"using-secrets","depth":2,"children":[{"title":"Secrets and application deployment","slug":"secrets-and-application-deployment","depth":3,"children":[]}]},{"title":"CLI Commands","slug":"cli-commands","depth":2,"children":[{"title":"List Secrets","slug":"list-secrets","depth":3,"children":[]},{"title":"Set a Secret","slug":"set-a-secret","depth":3,"children":[]},{"title":"Unset a Secret","slug":"unset-a-secret","depth":3,"children":[]}]},{"title":"Security","slug":"security","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/tensorlake-35e9e726/1373ae293ad67675/plausible.js"],"subdomain":"tensorlake-35e9e726","siteName":"Tensorlake","title":"Tensorlake Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-22T22:10:37.085Z","originalFileLocation":"applications/secrets.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=\"Providing secrets to Tensorlake functions\">\u003cmeta data-mint-head name=\"keywords\" content=\"AI agents, sandboxes, stateful sandboxes, durable execution, agent orchestration, agentic workflows\">\u003cmeta data-mint-head name=\"application-name\" content=\"Tensorlake\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow, max-image-preview:large, max-snippet:-1\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tensorlake-35e9e726/jzD554Nmq8Zqors6/_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/tensorlake-35e9e726/jzD554Nmq8Zqors6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tensorlake-35e9e726/jzD554Nmq8Zqors6/_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/tensorlake-35e9e726/jzD554Nmq8Zqors6/_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/tensorlake-35e9e726/jzD554Nmq8Zqors6/_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/tensorlake-35e9e726/jzD554Nmq8Zqors6/_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/tensorlake-35e9e726/jzD554Nmq8Zqors6/_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/tensorlake-35e9e726/jzD554Nmq8Zqors6/_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/tensorlake-35e9e726/jzD554Nmq8Zqors6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Tensorlake Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build with Tensorlake: secure and stateful sandboxes for AI agents, durable orchestration for long-running workflows\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Tensorlake Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tensorlake.ai/applications/secrets\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.tensorlake.ai/images/og/applications-secrets.png\">\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=\"Tensorlake Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Sandboxes and orchestration for AI agents.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.tensorlake.ai/images/og/applications-secrets.png\">\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/tensorlake-35e9e726/jzD554Nmq8Zqors6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Tensorlake\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#047857\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@tensorlake\">\u003cmeta data-mint-head name=\"author\" content=\"Tensorlake\">\u003cmeta data-mint-head name=\"googlebot\" content=\"index, follow\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tensorlake.ai/applications/secrets\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/applications/secrets.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tensorlake.ai/#organization\",\"name\":\"Tensorlake\",\"url\":\"https://docs.tensorlake.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tensorlake-35e9e726/pfTs6FweN5gDe2IY/logo/TL-Light.svg?fit=max\u0026auto=format\u0026n=pfTs6FweN5gDe2IY\u0026q=85\u0026s=de3c3b6e814425b1be6902f8af88b719\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tensorlake.ai#website\",\"name\":\"Tensorlake\",\"url\":\"https://docs.tensorlake.ai\",\"publisher\":{\"@id\":\"https://docs.tensorlake.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tensorlake.ai/applications/secrets#webpage\",\"url\":\"https://docs.tensorlake.ai/applications/secrets\",\"name\":\"Secrets\",\"description\":\"Providing secrets to Tensorlake functions\",\"dateModified\":\"2026-06-22T22:10:37.085Z\",\"isPartOf\":{\"@id\":\"https://docs.tensorlake.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tensorlake.ai/applications/secrets#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tensorlake.ai/applications/secrets#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.tensorlake.ai/applications/cron-scheduler\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Secrets\",\"item\":\"https://docs.tensorlake.ai/applications/secrets\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.tensorlake.ai/applications/secrets#article\",\"headline\":\"Secrets\",\"name\":\"Secrets\",\"description\":\"Providing secrets to Tensorlake functions\",\"url\":\"https://docs.tensorlake.ai/applications/secrets\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tensorlake.ai/applications/secrets#webpage\"},\"image\":\"https://docs.tensorlake.ai/images/og/applications-secrets.png\",\"dateModified\":\"2026-06-22T22:10:37.085Z\",\"publisher\":{\"@id\":\"https://docs.tensorlake.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tensorlake.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Tensorlake\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Tensorlake","nav":{"global":null,"tabs":[{"tab":"Sandboxes","pages":[{"title":"Sandboxes","href":"/sandboxes/introduction"}]},{"tab":"GitHub Actions","pages":[{"title":"GitHub Actions","href":"/github-actions/quickstart"}]},{"tab":"Cloud Volumes","pages":[{"title":"Cloud Volumes","href":"/filesystems/introduction"}]},{"tab":"Git Repositories","pages":[{"title":"Git Repositories","href":"/git/introduction"}]},{"tab":"Orchestrate","groups":[{"group":"Overview","icon":"book-open","pages":[{"title":"Introduction","icon":"robot","href":"/applications/introduction"},{"title":"SDK Reference","icon":"rectangle-code","href":"/applications/concepts"},{"title":"Public Endpoints","icon":"globe","href":"/applications/public-endpoints"},{"title":"Architecture","icon":"cubes","href":"/applications/architecture"}]},{"group":"Guides","icon":"robot","pages":[{"title":"Cron Scheduler","icon":"clock","href":"/applications/cron-scheduler"},{"title":"Autoscaling","icon":"chart-line-up","href":"/applications/scaling-agents"},{"title":"Progress Updates","icon":"signal-stream","href":"/applications/guides/streaming-progress"},{"title":"Observability","icon":"chart-line","href":"/applications/observability"},{"title":"Timeouts","icon":"clock","href":"/applications/timeouts"},{"title":"Container Images","icon":"box","description":"Define per-function container images declaratively with Tensorlake's `Image` API. Set the base image, install Python and system packages, and customize per-deploy.","href":"/applications/images"},{"title":"Secrets","icon":"user-secret","href":"/applications/secrets"},{"title":"Error handling","icon":"triangle-exclamation","description":"How errors propagate in Tensorlake Applications, covering function exceptions, timeouts, retries, and patterns for building resilient agentic workflows.","href":"/applications/error-handling"},{"title":"Async Functions","icon":"shuffle","href":"/applications/async-functions"},{"title":"Logging","icon":"cabin","href":"/applications/guides/logging"},{"title":"Troubleshooting","icon":"wrench","href":"/applications/production/troubleshooting"}]},{"group":"Scale Out","icon":"chart-line-up","pages":[{"title":"Futures","icon":"shuffle","href":"/applications/futures"},{"title":"Map-Reduce","icon":"diagram-project","href":"/applications/map-reduce"}]},{"group":"Use Cases","icon":"lightbulb","pages":[{"title":"Agent with Tool Calling","icon":"screwdriver-wrench","href":"/examples/agentic-applications/agent-with-tools"},{"title":"Code Interpreter Agent","icon":"code","href":"/examples/agentic-applications/code-interpreter"},{"title":"Deep Research Agent","icon":"magnifying-glass","href":"/examples/agentic-applications/deep-research"},{"title":"Web Scraper to MongoDB Atlas","icon":"spider-web","href":"/examples/agentic-applications/web-scraper"},{"title":"Personal Finance Manager","icon":"wallet","href":"/examples/agentic-applications/personal-finance-manager"},{"title":"Weather Agent","icon":"cloud-sun","href":"/examples/agentic-applications/weather-agent"}]}]},{"tab":"Platform Features","pages":[{"title":"Platform Features","href":"/platform/authentication"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/v2/introduction"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/faqs/sandboxes-faq"}]}]},"title":"Tensorlake Documentation","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":[],"chunks":[]}