| ↓ / Space | Next slide |
| ↑ | Previous slide |
| Home | First slide |
| End | Last slide |
| Dots (right) | Jump to slide |
| Swipe | Touch navigation |
Governing External Service Access
API keys scattered across env vars, app code, and CI pipelines. Every rotation means redeploying every consumer. No single inventory of who holds what credential, or when it expires.
Any agent that can reach the network can call any external API. There is no centralized on/off switch. Revoking access means hunting down every place the credential was copied.
| Method | External Identity | Credential Lifecycle | Best For |
|---|---|---|---|
| Bearer Token | Shared (static token) | Manual rotation | Simple APIs |
| OAuth M2M | Shared (service/app) | Auto-refresh | Service-to-service |
| OAuth U2M Shared | Shared (one user's token) | Auto-refresh | OAuth without M2M support |
| OAuth U2M Per User | Per user (individual token) | Auto-refresh per user | User-scoped data |
USE CONNECTION on the Databricks side. The auth method determines how the external credential is obtained; USE CONNECTION determines who is allowed to use it.
Authorization header at proxy time| + Simple setup |
| + Works with any API that accepts a static token |
| - No auto-refresh |
| - No per-user identity at the external service |
| - Token expiration requires manual intervention |
client_credentials grant type| + Auto-refresh, no manual rotation |
| + Standard OAuth, widely supported |
| + No user interaction required |
| - Shared identity, no per-user tracking at external service |
| - External service must support client_credentials |
Single point of failure. If the authorizing user leaves the organization, revokes consent, or changes their password, the connection breaks for every consumer. Recovery requires a new user to re-authorize.
External service supports OAuth but does not support the client_credentials grant. U2M Shared is a fallback when M2M is unavailable.
USE CONNECTION grant for current_user()| Databricks side | current_user() identity preserved |
| External side | Individual user's OAuth token |
| User leaves | Only their access breaks, others unaffected |
| Audit | Per-user attribution at both layers |
client_credentials?client_credentials?Six requirements, service-agnostic. If all six are yes, it works with UC HTTP connections.
| Authorization Code Grant | RFC 6749 Section 4.1. User redirected to consent page, provider redirects back with auth code. |
| Refresh tokens | Provider must issue a refresh_token. Scope varies: Google (offline_access), Microsoft (offline_access), Salesforce (refresh_token). |
| Custom redirect URIs | Must allow registering <workspace>/login/oauth/http.html as a redirect URI. |
| Confidential client | Client ID + Client Secret (not public/PKCE-only clients). |
| Standard token endpoint | grant_type=authorization_code for initial exchange, grant_type=refresh_token for renewal. |
| HTTPS endpoints | All authorization and token endpoints must be HTTPS. |
header_and_body | Default. Google, most providers. |
body_only | Some custom OAuth servers. |
header_only | Okta, some enterprise IdPs. |
<workspace-url>/login/oauth/http.htmloffline_access)<workspace-url>/login/oauth/http.html. Must match exactly, no trailing slash.
<workspace>/login/oauth/http.html with an auth codeoffline_access scope is required to obtain a refresh token. Without it, the connection works for approximately one hour, then fails silently when the access token expires.
redirect_uri_mismatchadmin_policy_enforcedoffline_access scopeisMcpConnection cannot be toggled after creation. If you need to change it, delete the connection and recreate it.Serverless Network Perimeter controls which FQDNs are reachable at the network layer. Blocks egress regardless of caller.
Even if the host is reachable, the caller needs a USE CONNECTION grant to get credentials injected. No grant = 403, credential never leaves storage.
| Details | |
|---|---|
| Auth Methods | Bearer Token, OAuth M2M, OAuth U2M Shared, OAuth U2M Per User |
| Governance Primitive | GRANT / REVOKE USE CONNECTION |
| Redirect URI | <workspace-url>/login/oauth/http.html |
| Provider Prerequisites | Authorization code grant, refresh tokens, custom redirect URIs, confidential client, standard token endpoint, HTTPS |
| Common Gotchas | redirect_uri_mismatch, admin_policy_enforced, offline_access scope, immutable name, owner access, MCP flag locked |
| Network Layer | Serverless Network Perimeter (SNP) for FQDN allowlisting |
| Credential Layer | USE CONNECTION for per-identity authorization |