AES-256-GCM encrypted secrets - versioned, audited, and never logged.
What are secrets?
Secrets are sensitive values - API keys, database passwords, TLS certificates - that need to be encrypted at rest and tightly access-controlled.In Nexus, secrets are:
Encrypted with AES-256-GCM at rest
Never returned in plaintext via the audit log
Versioned - every write creates a new version; a previous version can be promoted to become the current value
Scoped to a service and an environment
Only available to backend services (secret keys); frontend services (public keys) never receive secrets
Key names
Secret keys follow the pattern ^[a-zA-Z]([a-zA-Z0-9_.:-]*[a-zA-Z0-9])?$ - letters, digits, dots, underscores, hyphens, and colons.Examples: stripe.secret_key, db:password, TLS_CERT
Secret types
Type
Description
text
Plain string value - the default
file
Binary or multi-line content (PEM certs, JSON key files). The SDK writes the value to a temp file and returns the path.
Reading secrets
All backend SDKs provide a typed accessor. Calling GetSecret with a public key or on a frontend-kind service raises an error - secrets are never sent to frontend services.
value = client.get_secret('stripe.key')path = client.get_secret_file_path('TLS_CERT')
var value = client.GetSecret("stripe.key");var path = client.GetSecretFilePath("TLS_CERT");
GetSecret raises ErrPublicKeyRestricted (Go) / NexusPublicKeyError (Node) if called with a public key.
It raises ErrServiceKindMismatch / NexusServiceKindMismatchError on a kind=frontend service regardless of key type.
Using secrets in configs
Configs can reference secrets by key using the {{secret:KEY}} template syntax. The value is resolved server-side at sync time and delivered as the resolved string - the secret value is never stored in plaintext in the config.
A config whose value references a secret that has no value - or a secret that does not exist - is
not delivered to the application until the reference resolves. See
A secret without a value.
A secret without a value
A secret can be declared without a value. It has a key, a type and a description, and it shows in
the console as Not set with an Add value action. Importing from develop into a personal
environment creates secrets this way: a secret value never leaves its environment, so only the key
travels, and a secret that already exists in the personal environment is never changed.What the application sees:
The secret is not delivered. The SDK reports it the way it reports any secret that is not
there - an error or an absent value, depending on the SDK - never as an empty string.
A config that references it with {{secret:KEY}} is not delivered either, so the application
never receives a half-rendered value.
The sync response lists what was left out in an errors array: secret_not_set for the secret,
config_unresolved_secret for each config that references it, each with the key and a readable
explanation.
All SDKs log each omission as a warning (when logging is enabled) and expose the list via GetSyncErrors() / getSyncErrors() / get_sync_errors().westyx dev run names every secret without a value before it starts your process, and
westyx secret list shows it as (not set).Adding the first value makes it version 1. From then on it is an ordinary secret.
Versioning
Every write to a secret creates a new version. You can:
View version history in the console
Promote an older version to become the current value
See the diff between versions
Live updates
Backend SDKs receive secret changes over SSE (secret.created, secret.updated, secret.deleted, secret.renamed) and trigger a fresh sync within milliseconds - including refreshing temp files on disk for file-type secrets. See Quickstart -> Enable live updates.
Audit log
The following actions are recorded in the audit log for secrets:
Action
Trigger
secret_written
Secret created or updated (new version written)
secret_deleted
Secret removed
secret_version_deleted
Specific secret version deleted
secret_promoted
Previous secret version promoted to current
secret_renamed
Secret key renamed
secret_revealed
Value viewed via the admin API - the audit log records who, when, and version only; the plaintext itself is never written to the audit log
secret_listed
Secret list fetched via the admin API
secret_read
Individual secret metadata fetched via the admin API
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Westyx Nexus","colors":{"primary":"#a855f7","light":"#a855f7","dark":"#a855f7"},"logo":{"light":"https://mintcdn.com/westyx/SZvVVOurEPriggFG/nexus-logo.webp?fit=max\u0026auto=format\u0026n=SZvVVOurEPriggFG\u0026q=85\u0026s=6ffbf78ce14ec5ee73fe3b569f8953a9","dark":"https://mintcdn.com/westyx/SZvVVOurEPriggFG/nexus-logo.webp?fit=max\u0026auto=format\u0026n=SZvVVOurEPriggFG\u0026q=85\u0026s=6ffbf78ce14ec5ee73fe3b569f8953a9"},"favicon":"https://mintcdn.com/westyx/SZvVVOurEPriggFG/nexus-logo.webp?fit=max\u0026auto=format\u0026n=SZvVVOurEPriggFG\u0026q=85\u0026s=6ffbf78ce14ec5ee73fe3b569f8953a9","appearance":{"default":"dark"},"navbar":{"links":[],"primary":{"type":"button","label":"Go to Console","href":"https://app.westyx.dev"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/westyx"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"westyx","hasAudioNarration":false,"actualSubdomain":"westyx","customDomains":["docs.westyx.dev"],"gitSource":{"type":"gitlab","owner":"westyx/nexus","repo":"public-documentation","projectId":82540509,"deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aff1d0c144212df22539fef","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"SDKs","count":153},{"language":"default","tag":"Backend SDKs","count":115},{"language":"default","tag":"Browser SDKs","count":33},{"language":"default","tag":".NET","count":21},{"language":"default","tag":"Reference","count":15},{"language":"default","tag":"Platform","count":15},{"language":"default","tag":"Node.js","count":15},{"language":"default","tag":"Python","count":15},{"language":"default","tag":"Go","count":13},{"language":"default","tag":"Kotlin","count":13}]},"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":"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":"site-roles","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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"features/secrets","slug":"/features/secrets","pageMetadata":{"title":"Secrets","description":"AES-256-GCM encrypted secrets - versioned, audited, and never logged.","icon":"lock","href":"/features/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: \"AES-256-GCM encrypted secrets - versioned, audited, and never logged.\"\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={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`what-are-secrets`,children:`What are secrets?`}),`\n`,_jsx(_components.p,{children:`Secrets are sensitive values - API keys, database passwords, TLS certificates - that need to be encrypted at rest and tightly access-controlled.`}),`\n`,_jsx(_components.p,{children:`In Nexus, secrets are:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Encrypted with `,_jsx(_components.strong,{children:`AES-256-GCM`}),` at rest`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Never returned in plaintext`}),` via the audit log`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Versioned`}),` - every write creates a new version; a previous version can be promoted to become the current value`]}),`\n`,_jsxs(_components.li,{children:[`Scoped to a `,_jsx(_components.strong,{children:`service`}),` and an `,_jsx(_components.strong,{children:`environment`})]}),`\n`,_jsxs(_components.li,{children:[`Only available to `,_jsx(_components.strong,{children:`backend services`}),` (secret keys); frontend services (public keys) never receive secrets`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`key-names`,children:`Key names`}),`\n`,_jsxs(_components.p,{children:[`Secret keys follow the pattern `,_jsx(_components.code,{children:`^[a-zA-Z]([a-zA-Z0-9_.:-]*[a-zA-Z0-9])?$`}),` - letters, digits, dots, underscores, hyphens, and colons.`]}),`\n`,_jsxs(_components.p,{children:[`Examples: `,_jsx(_components.code,{children:`stripe.secret_key`}),`, `,_jsx(_components.code,{children:`db:password`}),`, `,_jsx(_components.code,{children:`TLS_CERT`})]}),`\n`,_jsx(Heading,{level:`2`,id:`secret-types`,children:`Secret types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:`Plain string value - the default`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`file`})}),_jsx(_components.td,{children:`Binary or multi-line content (PEM certs, JSON key files). The SDK writes the value to a temp file and returns the path.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`reading-secrets`,children:`Reading secrets`}),`\n`,_jsxs(_components.p,{children:[`All backend SDKs provide a typed accessor. Calling `,_jsx(_components.code,{children:`GetSecret`}),` with a public key or on a `,_jsx(_components.code,{children:`frontend`}),`-kind service raises an error - secrets are never sent to frontend services.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Go`,numberOfLines:`3`,language:`go`,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:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetSecret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stripe.key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// file-type:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetSecretFilePath`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TLS_CERT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`2`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getSecret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'stripe.key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getSecretFilePath`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'TLS_CERT'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// temp file path`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`2`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`value `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.get_secret(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'stripe.key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`path `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.get_secret_file_path(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'TLS_CERT'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`.NET`,numberOfLines:`2`,language:`csharp`,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:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetSecret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stripe.key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetSecretFilePath`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TLS_CERT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GetSecret`}),` raises `,_jsx(_components.code,{children:`ErrPublicKeyRestricted`}),` (Go) / `,_jsx(_components.code,{children:`NexusPublicKeyError`}),` (Node) if called with a public key.\nIt raises `,_jsx(_components.code,{children:`ErrServiceKindMismatch`}),` / `,_jsx(_components.code,{children:`NexusServiceKindMismatchError`}),` on a `,_jsx(_components.code,{children:`kind=frontend`}),` service regardless of key type.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`using-secrets-in-configs`,children:`Using secrets in configs`}),`\n`,_jsxs(_components.p,{children:[`Configs can reference secrets by key using the `,_jsx(_components.code,{children:`{{secret:KEY}}`}),` template syntax. The value is resolved server-side at sync time and delivered as the resolved string - the secret value is never stored in plaintext in the config.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,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:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`database.url = postgresql://user:{{secret:DB_PASSWORD}}@host:5432/mydb`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`A config whose value references a secret that has no value - or a secret that does not exist - is\nnot delivered to the application until the reference resolves. See\n`,_jsx(_components.a,{href:`#a-secret-without-a-value`,children:`A secret without a value`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`a-secret-without-a-value`,children:`A secret without a value`}),`\n`,_jsxs(_components.p,{children:[`A secret can be declared without a value. It has a key, a type and a description, and it shows in\nthe console as `,_jsx(_components.strong,{children:`Not set`}),` with an `,_jsx(_components.strong,{children:`Add value`}),` action. Importing from `,_jsx(_components.code,{children:`develop`}),` into a personal\nenvironment creates secrets this way: a secret value never leaves its environment, so only the key\ntravels, and a secret that already exists in the personal environment is never changed.`]}),`\n`,_jsx(_components.p,{children:`What the application sees:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The secret is `,_jsx(_components.strong,{children:`not delivered`}),`. The SDK reports it the way it reports any secret that is not\nthere - an error or an absent value, depending on the SDK - never as an empty string.`]}),`\n`,_jsxs(_components.li,{children:[`A config that references it with `,_jsx(_components.code,{children:`{{secret:KEY}}`}),` is not delivered either, so the application\nnever receives a half-rendered value.`]}),`\n`,_jsxs(_components.li,{children:[`The sync response lists what was left out in an `,_jsx(_components.code,{children:`errors`}),` array: `,_jsx(_components.code,{children:`secret_not_set`}),` for the secret,\n`,_jsx(_components.code,{children:`config_unresolved_secret`}),` for each config that references it, each with the key and a readable\nexplanation.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`All SDKs log each omission as a warning (when logging is enabled) and expose the list via `,_jsx(_components.code,{children:`GetSyncErrors()`}),` / `,_jsx(_components.code,{children:`getSyncErrors()`}),` / `,_jsx(_components.code,{children:`get_sync_errors()`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`westyx dev run`}),` names every secret without a value before it starts your process, and\n`,_jsx(_components.code,{children:`westyx secret list`}),` shows it as `,_jsx(_components.code,{children:`(not set)`}),`.`]}),`\n`,_jsx(_components.p,{children:`Adding the first value makes it version 1. From then on it is an ordinary secret.`}),`\n`,_jsx(Heading,{level:`2`,id:`versioning`,children:`Versioning`}),`\n`,_jsx(_components.p,{children:`Every write to a secret creates a new version. You can:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`View version history in the console`}),`\n`,_jsx(_components.li,{children:`Promote an older version to become the current value`}),`\n`,_jsx(_components.li,{children:`See the diff between versions`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`live-updates`,children:`Live updates`}),`\n`,_jsxs(_components.p,{children:[`Backend SDKs receive secret changes over SSE (`,_jsx(_components.code,{children:`secret.created`}),`, `,_jsx(_components.code,{children:`secret.updated`}),`, `,_jsx(_components.code,{children:`secret.deleted`}),`, `,_jsx(_components.code,{children:`secret.renamed`}),`) and trigger a fresh sync within milliseconds - including refreshing temp files on disk for `,_jsx(_components.code,{children:`file`}),`-type secrets. See `,_jsx(_components.a,{href:`/quickstart#4-enable-live-updates-recommended`,children:`Quickstart -> Enable live updates`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`audit-log`,children:`Audit log`}),`\n`,_jsx(_components.p,{children:`The following actions are recorded in the audit log for secrets:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Action`}),_jsx(_components.th,{children:`Trigger`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secret_written`})}),_jsx(_components.td,{children:`Secret created or updated (new version written)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secret_deleted`})}),_jsx(_components.td,{children:`Secret removed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secret_version_deleted`})}),_jsx(_components.td,{children:`Specific secret version deleted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secret_promoted`})}),_jsx(_components.td,{children:`Previous secret version promoted to current`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secret_renamed`})}),_jsx(_components.td,{children:`Secret key renamed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secret_revealed`})}),_jsx(_components.td,{children:`Value viewed via the admin API - the audit log records who, when, and version only; the plaintext itself is never written to the audit log`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secret_listed`})}),_jsx(_components.td,{children:`Secret list fetched via the admin API`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secret_read`})}),_jsx(_components.td,{children:`Individual secret metadata fetched via the admin API`})]})]})]})]})}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":"AES-256-GCM encrypted secrets - versioned, audited, and never logged.","icon":"lock","href":"/features/secrets"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What are secrets?","slug":"what-are-secrets","depth":2,"children":[]},{"title":"Key names","slug":"key-names","depth":2,"children":[]},{"title":"Secret types","slug":"secret-types","depth":2,"children":[]},{"title":"Reading secrets","slug":"reading-secrets","depth":2,"children":[]},{"title":"Using secrets in configs","slug":"using-secrets-in-configs","depth":2,"children":[]},{"title":"A secret without a value","slug":"a-secret-without-a-value","depth":2,"children":[]},{"title":"Versioning","slug":"versioning","depth":2,"children":[]},{"title":"Live updates","slug":"live-updates","depth":2,"children":[]},{"title":"Audit log","slug":"audit-log","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"westyx","siteName":"Westyx Nexus","title":"Secrets - Westyx Nexus","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T16:00:27.104Z","originalFileLocation":"features/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=\"dark\"}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=\"AES-256-GCM encrypted secrets - versioned, audited, and never logged.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Westyx Nexus\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/westyx/XN0iyph2fdpbzBTn/_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/westyx/XN0iyph2fdpbzBTn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/westyx/XN0iyph2fdpbzBTn/_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/westyx/XN0iyph2fdpbzBTn/_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/westyx/XN0iyph2fdpbzBTn/_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/westyx/XN0iyph2fdpbzBTn/_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/westyx/XN0iyph2fdpbzBTn/_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/westyx/XN0iyph2fdpbzBTn/_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/westyx/XN0iyph2fdpbzBTn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Secrets - Westyx Nexus\">\u003cmeta data-mint-head property=\"og:description\" content=\"AES-256-GCM encrypted secrets - versioned, audited, and never logged.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Westyx Nexus\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.westyx.dev/features/secrets\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://westyx.mintlify.site/_mintlify/api/og/v2?division=Core\u0026amp;title=Secrets\u0026amp;description=AES-256-GCM+encrypted+secrets+-+versioned%2C+audited%2C+and+never+logged.\u0026amp;theme=2bda145bf35d10a16e63e692\u0026amp;signature=3f42fabfa050a7750726fe4c5192b6f4398bc6b4e94305d3e942f790fa32d8cc\">\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=\"Secrets - Westyx Nexus\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"AES-256-GCM encrypted secrets - versioned, audited, and never logged.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://westyx.mintlify.site/_mintlify/api/og/v2?division=Core\u0026amp;title=Secrets\u0026amp;description=AES-256-GCM+encrypted+secrets+-+versioned%2C+audited%2C+and+never+logged.\u0026amp;theme=2bda145bf35d10a16e63e692\u0026amp;signature=3f42fabfa050a7750726fe4c5192b6f4398bc6b4e94305d3e942f790fa32d8cc\">\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/westyx/XN0iyph2fdpbzBTn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Westyx Nexus\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#a855f7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.westyx.dev/features/secrets\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/features/secrets.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.westyx.dev/#organization\",\"name\":\"Westyx Nexus\",\"url\":\"https://docs.westyx.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/westyx/SZvVVOurEPriggFG/nexus-logo.webp?fit=max\u0026auto=format\u0026n=SZvVVOurEPriggFG\u0026q=85\u0026s=6ffbf78ce14ec5ee73fe3b569f8953a9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.westyx.dev#website\",\"name\":\"Westyx Nexus\",\"url\":\"https://docs.westyx.dev\",\"publisher\":{\"@id\":\"https://docs.westyx.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.westyx.dev/features/secrets#webpage\",\"url\":\"https://docs.westyx.dev/features/secrets\",\"name\":\"Secrets\",\"description\":\"AES-256-GCM encrypted secrets - versioned, audited, and never logged.\",\"dateModified\":\"2026-11-19T16:00:27.104Z\",\"isPartOf\":{\"@id\":\"https://docs.westyx.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.westyx.dev/features/secrets#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.westyx.dev/features/secrets#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Westyx Nexus\",\"item\":\"https://docs.westyx.dev\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Secrets\",\"item\":\"https://docs.westyx.dev/features/secrets\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.westyx.dev/features/secrets#article\",\"headline\":\"Secrets\",\"name\":\"Secrets\",\"description\":\"AES-256-GCM encrypted secrets - versioned, audited, and never logged.\",\"url\":\"https://docs.westyx.dev/features/secrets\",\"mainEntityOfPage\":{\"@id\":\"https://docs.westyx.dev/features/secrets#webpage\"},\"dateModified\":\"2026-11-19T16:00:27.104Z\",\"publisher\":{\"@id\":\"https://docs.westyx.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.westyx.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Westyx Nexus\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Westyx Nexus\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/features/secrets.md","siteName":"Westyx Nexus","nav":{"global":null,"tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":""}]},{"tab":"Features","groups":[{"group":"Core","pages":[{"title":"Secrets","icon":"lock","href":"/features/secrets"},{"title":"Configs","description":"Typed, per-environment configuration with template references.","icon":"sliders","href":"/features/configs"},{"title":"Feature Flags","icon":"toggle-on","href":"/features/feature-flags"},{"title":"Environment promotion","icon":"arrow-up-right","href":"/features/environment-promotion"}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli"}]}]},"basePath":"","title":"Secrets - Westyx Nexus","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}