Authenticate the Docent SDK with API keys or AWS workload identity
The Docent SDK supports API keys and two AWS workload-identity protocols. Use
an organization service-account API key for most automation. In AWS-hosted
environments, outbound OIDC avoids storing a Docent secret in the workload.Pass only one of api_key, aws_oidc_identity=True, or
aws_federated_identity=True to a client.
From your project directory, run the setup CLI and paste a key from
Settings → API Keys when prompted:
uvx docent@latest setup
The prompt does not echo the key. Setup validates it before updating the global
config at ~/.docent/docent.env. Use one of the manual options below for CI,
secret managers, profile-formatted config, or project-specific overrides.
AWS outbound OIDC is the preferred AWS authentication method. It mints a
five-minute JWT for the Docent deployment origin and verifies the account’s
issuer, the audience, the exact IAM role, and the token signature.Install the AWS extra:
pip install "docent[aws]"
An organization administrator must first connect the IAM role and its
account-specific outbound OIDC issuer to a Docent service account. The workload
role also needs sts:GetWebIdentityToken, restricted to the Docent API origin
with sts:IdentityTokenAudience.
from docent import Docentclient = Docent( domain="docent.your-company.com", aws_oidc_identity=True,)
The SDK uses the normal AWS credential chain. For a named local profile or an
explicit regional STS endpoint:
GetWebIdentityToken is unavailable on the global STS endpoint, so workloads
must be able to reach a regional endpoint. The Docent API must be able to reach
the issuer’s OIDC discovery and JWKS endpoints.
Use outbound OIDC for new bindings. Both AWS protocols stop authorizing new
requests immediately when the service account is disabled or its IAM role is
disconnected.
The default global config path is ~/.docent/docent.env. The SDK also searches
for project-level docent.env files from the current working directory upward,
so local files can override the global default when present.
You can also specify an explicit path:
The SDK resolves each setting using a priority order. The exact order varies slightly
by setting:
Setting
Priority (highest to lowest)
api_key
Direct parameter → config file → DOCENT_API_KEY env var
api_url / frontend_url
Direct parameter → DOCENT_API_URL / DOCENT_FRONTEND_URL env var → config file
domain
Direct parameter → DOCENT_DOMAIN env var → config file → "docent.transluce.org"
collection_id
Direct parameter → config file
collection_id is not read from environment variables — set it via a direct parameter
or in a discovered docent.env config file (project-level or ~/.docent/docent.env).
AWS authentication uses the same api_url, frontend_url, and domain
resolution. The SDK derives the AWS token audience from the API URL’s origin.Or via environment variables:
Local domains (localhost, 127.0.0.1) require explicit api_url and frontend_url.
The SDK cannot derive URLs from local domains automatically.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Docent","colors":{"primary":"#0f0f0f","light":"#6366f1","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/transluce/QnByW4PX7qHJkjnV/images/docent_final_black.png?fit=max\u0026auto=format\u0026n=QnByW4PX7qHJkjnV\u0026q=85\u0026s=206d8793ba8b8266ad28d96bbd67d6ac","dark":"https://mintcdn.com/transluce/QnByW4PX7qHJkjnV/images/docent_final_white.png?fit=max\u0026auto=format\u0026n=QnByW4PX7qHJkjnV\u0026q=85\u0026s=b625ac7cf07a494751aa4421e2315dcf"},"favicon":"https://mintcdn.com/transluce/QnByW4PX7qHJkjnV/images/favicon.ico?fit=max\u0026auto=format\u0026n=QnByW4PX7qHJkjnV\u0026q=85\u0026s=209427e094d58a3c7975819950c5a886","navbar":{"links":[{"href":"https://transluce.org","label":"About Transluce"},{"href":"https://join.slack.com/t/docentcommunity/shared_invite/zt-39uln1o3q-DObXadOIKN_IGc73ZOjgnA","label":"Slack Community"}],"primary":{"type":"button","label":"Open Docent","href":"https://docent.transluce.org"}},"fonts":{"family":"Open Sans"},"integrations":{"posthog":{"apiKey":"phc_Xvh5cw8HEyhTOOnZWj3bT00NeCPXp2fswJzGvrR5d4w","apiHost":"https://b.transluce.org","sessionRecording":false}},"contextual":{"options":["copy"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"transluce","hasAudioNarration":false,"actualSubdomain":"transluce","customDomains":["docs.transluce.org"],"gitSource":{"type":"github","owner":"transluceai","repo":"docent-platform","deployBranch":"main","contentDirectory":"mint-docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af22aba47e198f0700fd8ca","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"Documentation","count":28},{"language":"default","tag":"SDK Reference","count":19},{"language":"default","tag":"Data Models","count":7},{"language":"default","tag":"Ingestion","count":7},{"language":"default","tag":"Legacy","count":6},{"language":"default","tag":"Analysis Plans","count":5},{"language":"default","tag":"Guides","count":3},{"language":"default","tag":"Integrations","count":3},{"language":"default","tag":"Agent Runs","count":3},{"language":"default","tag":"Getting Started","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"sdk/authentication","slug":"/sdk/authentication","pageMetadata":{"title":"Authentication","description":"Authenticate the Docent SDK with API keys or AWS workload identity","href":"/sdk/authentication"},"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: \"Authenticate the Docent SDK with API keys or AWS workload identity\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The Docent SDK supports API keys and two AWS workload-identity protocols. Use\nan organization service-account API key for most automation. In AWS-hosted\nenvironments, outbound OIDC avoids storing a Docent secret in the workload.`}),`\n`,_jsxs(_components.p,{children:[`Pass only one of `,_jsx(_components.code,{children:`api_key`}),`, `,_jsx(_components.code,{children:`aws_oidc_identity=True`}),`, or\n`,_jsx(_components.code,{children:`aws_federated_identity=True`}),` to a client.`]}),`\n`,_jsx(Heading,{level:`2`,id:`recommended-setup`,children:`Recommended setup`}),`\n`,_jsxs(_components.p,{children:[`From your project directory, run the setup CLI and paste a key from\n`,_jsx(_components.a,{href:`https://docent.transluce.org/settings/api-keys`,children:_jsx(_components.strong,{children:`Settings → API Keys`})}),` when prompted:`]}),`\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:`uvx`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` docent@latest`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` setup`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The prompt does not echo the key. Setup validates it before updating the global\nconfig at `,_jsx(_components.code,{children:`~/.docent/docent.env`}),`. Use one of the manual options below for CI,\nsecret managers, profile-formatted config, or project-specific overrides.`]}),`\n`,_jsx(Heading,{level:`2`,id:`api-key`,children:`API Key`}),`\n`,_jsx(Heading,{level:`3`,id:`1-direct-parameter`,children:`1. Direct Parameter`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` docent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`2-environment-variable`,children:`2. Environment Variable`}),`\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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` DOCENT_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-api-key\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` docent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads DOCENT_API_KEY from environment`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`aws-outbound-oidc`,children:`AWS outbound OIDC`}),`\n`,_jsx(_components.p,{children:`AWS outbound OIDC is the preferred AWS authentication method. It mints a\nfive-minute JWT for the Docent deployment origin and verifies the account’s\nissuer, the audience, the exact IAM role, and the token signature.`}),`\n`,_jsx(_components.p,{children:`Install the AWS extra:`}),`\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:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"docent[aws]\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`An organization administrator must first connect the IAM role and its\naccount-specific outbound OIDC issuer to a Docent service account. The workload\nrole also needs `,_jsx(_components.code,{children:`sts:GetWebIdentityToken`}),`, restricted to the Docent API origin\nwith `,_jsx(_components.code,{children:`sts:IdentityTokenAudience`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` docent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` domain`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"docent.your-company.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` aws_oidc_identity`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The SDK uses the normal AWS credential chain. For a named local profile or an\nexplicit regional STS endpoint:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` domain`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"docent.your-company.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` aws_oidc_identity`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` aws_profile`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sandbox\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` aws_region`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"us-east-1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GetWebIdentityToken`}),` is unavailable on the global STS endpoint, so workloads\nmust be able to reach a regional endpoint. The Docent API must be able to reach\nthe issuer’s OIDC discovery and JWKS endpoints.`]}),`\n`,_jsx(Heading,{level:`2`,id:`legacy-aws-signed-request-authentication`,children:`Legacy AWS signed-request authentication`}),`\n`,_jsx(_components.p,{children:`Existing service-account bindings without an OIDC issuer can continue using\nthe earlier audience-bound signed STS proof:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` domain`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"docent.your-company.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` aws_federated_identity`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Use outbound OIDC for new bindings. Both AWS protocols stop authorizing new\nrequests immediately when the service account is disabled or its IAM role is\ndisconnected.`}),`\n`,_jsx(Heading,{level:`3`,id:`3-config-file`,children:`3. Config File`}),`\n`,_jsxs(_components.p,{children:[`By default, create a global config file at `,_jsx(_components.code,{children:`~/.docent/docent.env`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.docent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cat`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`'EOF'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.docent/docent.env`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`DOCENT_API_KEY=your-api-key`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`DOCENT_COLLECTION_ID=my-default-collection`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`EOF`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The default global config path is `,_jsx(_components.code,{children:`~/.docent/docent.env`}),`. The SDK also searches\nfor project-level `,_jsx(_components.code,{children:`docent.env`}),` files from the current working directory upward,\nso local files can override the global default when present.\nYou can also specify an explicit path:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`config_file`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/path/to/my-config.env\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-priority`,children:`Configuration Priority`}),`\n`,_jsx(_components.p,{children:`The SDK resolves each setting using a priority order. The exact order varies slightly\nby setting:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Setting`}),_jsx(_components.th,{children:`Priority (highest to lowest)`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key`})}),_jsxs(_components.td,{children:[`Direct parameter → config file → `,_jsx(_components.code,{children:`DOCENT_API_KEY`}),` env var`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`api_url`}),` / `,_jsx(_components.code,{children:`frontend_url`})]}),_jsxs(_components.td,{children:[`Direct parameter → `,_jsx(_components.code,{children:`DOCENT_API_URL`}),` / `,_jsx(_components.code,{children:`DOCENT_FRONTEND_URL`}),` env var → config file`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`domain`})}),_jsxs(_components.td,{children:[`Direct parameter → `,_jsx(_components.code,{children:`DOCENT_DOMAIN`}),` env var → config file → `,_jsx(_components.code,{children:`\"docent.transluce.org\"`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`collection_id`})}),_jsx(_components.td,{children:`Direct parameter → config file`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`collection_id`}),` is not read from environment variables — set it via a direct parameter\nor in a discovered `,_jsx(_components.code,{children:`docent.env`}),` config file (project-level or `,_jsx(_components.code,{children:`~/.docent/docent.env`}),`).`]})}),`\n`,_jsx(Heading,{level:`2`,id:`environment-variables`,children:`Environment Variables`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DOCENT_API_KEY`})}),_jsx(_components.td,{children:`API key for authentication when AWS identity is not enabled`}),_jsx(_components.td,{children:`None`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DOCENT_API_URL`})}),_jsx(_components.td,{children:`Direct API server URL`}),_jsx(_components.td,{children:`Derived from domain`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DOCENT_FRONTEND_URL`})}),_jsx(_components.td,{children:`Direct frontend URL`}),_jsx(_components.td,{children:`Derived from domain`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DOCENT_DOMAIN`})}),_jsx(_components.td,{children:`Docent instance domain`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`docent.transluce.org`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`config-file-format`,children:`Config File Format`}),`\n`,_jsx(_components.p,{children:`The config file uses dotenv format. Supported keys:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`DOCENT_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-api-key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`DOCENT_API_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`https://api.docent.transluce.org`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`DOCENT_FRONTEND_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`https://docent.transluce.org`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`DOCENT_DOMAIN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docent.transluce.org`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`DOCENT_COLLECTION_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`my-collection`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`self-hosted-instances`,children:`Self-Hosted Instances`}),`\n`,_jsx(_components.p,{children:`For self-hosted Docent instances, set both the API and frontend URLs:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Docent(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.my-docent.example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` frontend_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://my-docent.example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`AWS authentication uses the same `,_jsx(_components.code,{children:`api_url`}),`, `,_jsx(_components.code,{children:`frontend_url`}),`, and `,_jsx(_components.code,{children:`domain`}),`\nresolution. The SDK derives the AWS token audience from the API URL’s origin.`]}),`\n`,_jsx(_components.p,{children:`Or via environment variables:`}),`\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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` DOCENT_API_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.my-docent.example.com\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` DOCENT_FRONTEND_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://my-docent.example.com\"`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Local domains (`,_jsx(_components.code,{children:`localhost`}),`, `,_jsx(_components.code,{children:`127.0.0.1`}),`) require explicit `,_jsx(_components.code,{children:`api_url`}),` and `,_jsx(_components.code,{children:`frontend_url`}),`.\nThe SDK cannot derive URLs from local domains automatically.`]})})]})}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":"Authentication","description":"Authenticate the Docent SDK with API keys or AWS workload identity","href":"/sdk/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Recommended setup","slug":"recommended-setup","depth":2,"children":[]},{"title":"API Key","slug":"api-key","depth":2,"children":[{"title":"1. Direct Parameter","slug":"1-direct-parameter","depth":3,"children":[]},{"title":"2. Environment Variable","slug":"2-environment-variable","depth":3,"children":[]}]},{"title":"AWS outbound OIDC","slug":"aws-outbound-oidc","depth":2,"children":[]},{"title":"Legacy AWS signed-request authentication","slug":"legacy-aws-signed-request-authentication","depth":2,"children":[{"title":"3. Config File","slug":"3-config-file","depth":3,"children":[]}]},{"title":"Configuration Priority","slug":"configuration-priority","depth":2,"children":[]},{"title":"Environment Variables","slug":"environment-variables","depth":2,"children":[]},{"title":"Config File Format","slug":"config-file-format","depth":2,"children":[]},{"title":"Self-Hosted Instances","slug":"self-hosted-instances","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"transluce","siteName":"Docent","title":"Authentication - Docent","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-26T01:23:01.156Z","originalFileLocation":"sdk/authentication.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=\"Authenticate the Docent SDK with API keys or AWS workload identity\">\u003cmeta data-mint-head name=\"application-name\" content=\"Docent\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/transluce/k6WCamiKCDPPLdq5/_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/transluce/k6WCamiKCDPPLdq5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/transluce/k6WCamiKCDPPLdq5/_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/transluce/k6WCamiKCDPPLdq5/_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/transluce/k6WCamiKCDPPLdq5/_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/transluce/k6WCamiKCDPPLdq5/_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/transluce/k6WCamiKCDPPLdq5/_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/transluce/k6WCamiKCDPPLdq5/_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/transluce/k6WCamiKCDPPLdq5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Docent\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate the Docent SDK with API keys or AWS workload identity\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Docent\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.transluce.org/sdk/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://transluce.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Authentication\u0026amp;description=Authenticate+the+Docent+SDK+with+API+keys+or+AWS+workload+identity\u0026amp;theme=f7432b2f43ad2d99b0f048f9\u0026amp;signature=6cd642248857b9412439f6f0147cd28594830246d73475bb432af5f92011abeb\">\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=\"Authentication - Docent\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate the Docent SDK with API keys or AWS workload identity\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://transluce.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Authentication\u0026amp;description=Authenticate+the+Docent+SDK+with+API+keys+or+AWS+workload+identity\u0026amp;theme=f7432b2f43ad2d99b0f048f9\u0026amp;signature=6cd642248857b9412439f6f0147cd28594830246d73475bb432af5f92011abeb\">\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/transluce/k6WCamiKCDPPLdq5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Docent\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0f0f0f\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.transluce.org/sdk/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.transluce.org/#organization\",\"name\":\"Docent\",\"url\":\"https://docs.transluce.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/transluce/QnByW4PX7qHJkjnV/images/docent_final_black.png?fit=max\u0026auto=format\u0026n=QnByW4PX7qHJkjnV\u0026q=85\u0026s=206d8793ba8b8266ad28d96bbd67d6ac\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.transluce.org#website\",\"name\":\"Docent\",\"url\":\"https://docs.transluce.org\",\"publisher\":{\"@id\":\"https://docs.transluce.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.transluce.org/sdk/authentication#webpage\",\"url\":\"https://docs.transluce.org/sdk/authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate the Docent SDK with API keys or AWS workload identity\",\"dateModified\":\"2026-08-26T01:23:01.156Z\",\"isPartOf\":{\"@id\":\"https://docs.transluce.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.transluce.org/sdk/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.transluce.org/sdk/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Getting Started\",\"item\":\"https://docs.transluce.org/sdk/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.transluce.org/sdk/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.transluce.org/sdk/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate the Docent SDK with API keys or AWS workload identity\",\"url\":\"https://docs.transluce.org/sdk/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.transluce.org/sdk/authentication#webpage\"},\"dateModified\":\"2026-08-26T01:23:01.156Z\",\"publisher\":{\"@id\":\"https://docs.transluce.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.transluce.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Docent\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Docent\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/sdk/authentication.md","siteName":"Docent","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"SDK Reference","groups":[{"group":"Getting Started","pages":[{"title":"SDK Overview","description":"Install and get started with the Docent Python SDK","href":"/sdk/overview"},{"title":"Authentication","href":"/sdk/authentication"},{"title":"Client","description":"Initialize and configure the Docent client","href":"/sdk/client"}]},{"group":"Collections","pages":[{"title":"Manage Collections","href":"/sdk/collections/manage"},{"title":"Collection Metadata","href":"/sdk/collections/metadata"}]},{"group":"Organizations","pages":[{"title":"Organization administration","href":"/sdk/organizations"},{"title":"Permissions \u0026 Sharing","href":"/sdk/permissions"}]},{"group":"Agent Runs","pages":[{"title":"Query Agent Runs","href":"/sdk/agent-runs/query"},{"title":"Append to Agent Runs","href":"/sdk/agent-runs/append"},{"title":"Agent Run Metadata","href":"/sdk/agent-runs/metadata"}]},{"group":"DQL","pages":[{"title":"Execute DQL Queries","href":"/sdk/dql/execute"},{"title":"DQL Schema","href":"/sdk/dql/schema"}]},{"group":"Feedback \u0026 Labels","pages":[{"title":"Labels, General Labels, Tags \u0026 Comments","href":"/sdk/feedback/labels"}]},{"group":"More","pages":[{"title":"Ingestion Job Management","href":"/sdk/jobs"},{"title":"Browser Integration","href":"/sdk/ui"},{"title":"Error Handling","href":"/sdk/errors"}]},{"group":"Legacy","pages":[{"title":"Manage Rubrics","href":"/sdk/rubrics/manage"},{"title":"Run Evaluations","href":"/sdk/rubrics/evaluate"},{"title":"Clustering","href":"/sdk/rubrics/clustering"}]}]}]},"basePath":"","title":"Authentication - Docent","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":[],"chunks":[]}