Skip to content

Authentication & Identity

This page is the canonical home for how AgentCube authenticates and what identity Oracle sees. The step-by-step provider setup lives under Installation → SSO Setup; this page explains the model those steps implement and why it is shaped this way.

Authentication answers two separate questions about every call, and the whole job of the auth layer is to keep their answers in sync:

  1. Inbound — who is calling the Context Engine? The identity of the user, established when the request arrives.
  2. Outbound — as whom does the call hit Oracle? The identity Oracle itself authenticates and writes to its own audit log when the data is read.

Under federated SSO, a single verified identity is carried from the AI platform all the way to Oracle without leaking into another user’s request, downgrading, or collapsing into a shared service account along the way. Under the service-account and delegated postures, Oracle sees one shared account by design; see below.

How a call is attributed in Oracle’s own audit depends on which posture you choose for the connector:

PostureHow it worksOracle seesIdP required
Service account (basic)A single shared credential, set on the connector, authenticates every call.One service account for all users.No
Delegated credential (delegated_basic)You enter one Oracle username and password when you register the connector in the Context Engine. The Context Engine stores it encrypted and forwards it on each call; the connector holds no credential.That one named account, for every user.No
Federated SSO (internal)The user authenticates via corporate SSO; the per-user token is exchanged for a user-scoped Oracle token (JWT-bearer assertion).The named user.Yes (any OIDC IdP)

Only the federated posture preserves per-user attribution end to end: each call reaches Oracle as the signed-in user, so Oracle audits and enforces security per person, and the user named in the Context Engine’s audit log is the user Oracle records. It stores no Oracle credentials at all. Under the delegated posture every call through that connector reaches Oracle as the one stored account, so Oracle’s audit trail shows that account; the Context Engine’s audit log records which signed-in user made each call only when Context Engine sign-in (AGENTCUBE_CE_AUTH_MODE=oidc) is enabled. User-facing data instances should use federated SSO; the service account and delegated postures are intended for the metadata/admin connector, or single-team use where every user legitimately shares the same data access.

The Context Engine’s inbound mode is set by AGENTCUBE_CE_AUTH_MODE. To require sign-in, see Single Sign-On. Set it to oidc for any deployment real users reach: the Context Engine then validates each inbound MCP request as an OAuth 2.1 / OIDC resource server against your identity provider (see Environment Variables). Federated SSO requires oidc. The verified identity is then carried through to Oracle in two layers:

  1. Layer 1 — Inbound authentication. The AI platform runs an OAuth flow against your IdP. The user authenticates, and the Context Engine receives and validates a token carrying the user’s identity, then threads that identity through the entire request so concurrent calls from different users never read each other’s identity. The Context Engine then mints a short-lived signed token carrying the verified user and sends it with the call to the connector, which verifies it against the Context Engine’s published keys. The IdP’s token itself never leaves the Context Engine.
  2. Layer 2 — Oracle token exchange. The connector cannot relay the IdP’s token to Oracle directly — Oracle EPM wants its own access token. AgentCube mints a self-signed JWT whose subject is the authenticated user’s Oracle username (taken from the verified email, or UPN, in their IdP token, so the Oracle user name must match it), signs it with a key Oracle already trusts, and exchanges it at the OCI Identity Domain for a user-scoped Oracle access token. Every subsequent Oracle call rides that token.
sequenceDiagram
    participant User
    participant AI as AI Platform
    participant IdP as Identity Provider
    participant CE as Context Engine
    participant Conn as Connector
    participant OCI as OCI Identity Domain
    participant Oracle as Oracle EPM

    User->>AI: Ask a question
    AI->>IdP: OAuth flow
    IdP-->>AI: Identity token ([email protected])
    AI->>CE: MCP request + identity token
    CE->>CE: Validate token, resolve user
    CE->>Conn: Routed call + short-lived signed identity token
    Conn->>OCI: JWT assertion (user identity)
    OCI-->>Conn: Oracle access token
    Conn->>Oracle: REST call (as the authenticated user)
    Oracle-->>Conn: User-scoped data
    Conn-->>CE: Results
    CE-->>AI: Response
    AI-->>User: Only data the user is entitled to

The indirection is deliberate: a direct relay of the IdP’s token fails, because the IdP’s subject claim is an opaque identifier Oracle cannot map to a user. Minting its own assertion is what lets AgentCube set the subject to the verified email and sign with a trusted key.

The end-to-end guarantee has a single, checkable shape: under federated SSO, the user the Context Engine records for a call equals the user Oracle audits for that same call. That cross-system match is the correctness primitive for the whole chain — if the two ever diverge, the carried identity broke somewhere along the way. See Data Isolation for how this is enforced and tested under concurrent load.