Skip to content

Clarify BYOK token usage and limitations#402

Merged
patniko merged 1 commit intomainfrom
byok-docs
Feb 7, 2026
Merged

Clarify BYOK token usage and limitations#402
patniko merged 1 commit intomainfrom
byok-docs

Conversation

@patniko
Copy link
Contributor

@patniko patniko commented Feb 7, 2026

No description provided.

@patniko patniko requested a review from a team as a code owner February 7, 2026 22:46
Copilot AI review requested due to automatic review settings February 7, 2026 22:46
@patniko patniko merged commit 05e3c46 into main Feb 7, 2026
18 checks passed
@patniko patniko deleted the byok-docs branch February 7, 2026 22:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the BYOK (Bring Your Own Key) authentication documentation to better set expectations around bearer token usage and identity-provider limitations when using the SDK with custom providers.

Changes:

  • Adds a note clarifying bearerToken is a static string and is not auto-refreshed by the SDK.
  • Rewords identity limitations to emphasize “static credentials,” and expands on why Microsoft Entra ID isn’t supported as an automatic auth flow.
Comments suppressed due to low confidence (1)

docs/auth/byok.md:291

  • The Entra ID explanation also says long-running workloads need to “create new sessions” with updated tokens, but resuming an existing session with an updated provider is supported. Suggest adjusting this to “create or resume/reconnect” to match SDK capabilities and reduce operational friction for users.
**Why not Entra ID?** While Entra ID does issue bearer tokens, these tokens are short-lived (typically 1 hour) and require automatic refresh via the Azure Identity SDK. The `bearerToken` option only accepts a static string—there is no callback mechanism for the SDK to request fresh tokens. For long-running workloads requiring Entra authentication, you would need to implement your own token refresh logic and create new sessions with updated tokens.

}
```

> **Note:** The `bearerToken` option accepts a **static token string** only. The SDK does not refresh this token automatically. If your token expires, requests will fail and you'll need to create a new session with a fresh token.
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note says expired bearer tokens require creating a new session. However, all SDKs support resuming a session with a new provider config (e.g., ResumeSessionConfig.Provider), which can be used to supply an updated bearerToken without changing the session ID. Consider rewording to say you must reconnect (create or resume) with a fresh token, rather than implying only new sessions work.

This issue also appears on line 291 of the same file.

Suggested change
> **Note:** The `bearerToken` option accepts a **static token string** only. The SDK does not refresh this token automatically. If your token expires, requests will fail and you'll need to create a new session with a fresh token.
> **Note:** The `bearerToken` option accepts a **static token string** only. The SDK does not refresh this token automatically. If your token expires, requests will fail and you'll need to reconnect (create a new session or resume an existing one) with a fresh token.

Copilot uses AI. Check for mistakes.
Comment on lines +283 to 286
BYOK authentication uses **static credentials only**. The following identity providers are NOT supported:

- ❌ **Microsoft Entra ID (Azure AD)** - No support for Entra managed identities or service principals
- ❌ **Third-party identity providers** - No OIDC, SAML, or other federated identity
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section says Microsoft Entra ID is “NOT supported,” but the page also explains that Entra can issue bearer tokens and the SDK can accept a static bearerToken string. To avoid contradicting yourself, consider clarifying that Entra/managed identity/service principal token acquisition and automatic refresh are not supported by the SDK (but users may supply Entra-issued tokens if they manage refresh themselves).

See below for a potential fix:

BYOK authentication uses **static credentials only**. The SDK does not have built-in integrations with identity providers for token acquisition or automatic refresh:

- ❌ **Microsoft Entra ID (Azure AD)** - No built-in support for Entra managed identities or service principals (no automatic token acquisition/refresh)
- ❌ **Third-party identity providers** - No built-in OIDC, SAML, or other federated identity integrations
- ❌ **Managed identities** - No automatic token acquisition via Azure Managed Identity or similar mechanisms

You must use an API key or static bearer token that you manage yourself.

**Why not Entra ID?** While Entra ID does issue bearer tokens, these tokens are short-lived (typically 1 hour) and require automatic refresh via the Azure Identity SDK. The `bearerToken` option only accepts a static string—there is no callback mechanism for the SDK to request fresh tokens. Entra-issued bearer tokens can be used with BYOK as long as you acquire and refresh them yourself and create new sessions with updated tokens. For long-running workloads requiring Entra authentication, you must implement your own token acquisition/refresh logic outside the SDK.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant