Skip to content

Access Points

An access point lets callers converse with your meshes with a token instead of an API key. The token comes from an identity provider that you trust, or from the access point itself, for a client that signs in with a client ID and a secret. The access point checks the token. It doesn’t sign anyone in or decide who they are.

A caller through an access point is known by its token: its subject and its claims. Boundaries read them, and the access point’s tags, to decide what the caller can do. A caller reaches only the conversations it created.

To create an access point, open Access > Access points and press New access point. Add the issuers whose tokens it accepts, or clients, or both. Then attach boundaries.

When to use an access point

Use an API key for your own servers, scripts and Terraform. An API key reaches every conversation in the organization, and, with its scopes, the configuration. Keep it on servers that you control.

Use an access point when:

  • People use your meshes from a web or mobile app, signed in with your identity provider. The app sends each person’s token. A web page can call the access point directly.
  • People use your meshes from an MCP client.
  • A partner’s system, or another service that shouldn’t hold an API key, calls your meshes.
  • What a caller can do depends on who they are: on the claims in their token, or on the app they use.

A caller through an access point:

  • Reaches only the Conversation API, AG-UI and MCP. It can’t reach the configuration, traces or notification channels.
  • Reaches only the conversations it created.
  • Is checked against the boundaries of the access point, which can read its subject and claims.

Quick Reference

Settings

FieldPurposeGuidance
NameIdentifies the access point

Name it for the app or the callers it serves, for example “support-app” or “partner-acme”. It is unique in the organization.

DescriptionNotes

Optional. Say who calls through it and who owns it.

Access point URLWhere callers reach it

Shown once the access point is saved. It is https://api.partite.ai/access-points/ followed by the access point’s ID. Callers add the API paths to it. Tokens that the access point issues to its clients carry it as their iss and aud.

Authorization server URLWhere MCP clients send people to sign in

Optional. The URL of your identity provider as an OAuth authorization server. MCP clients find it in the access point’s metadata. Set it when people sign in to an MCP client with your identity provider. It must be an absolute http or https URL.

IssuersWhose tokens it accepts

Callers sign in with a token from one of these issuers. See Issuer.

TagsCarried by every caller through it

Name and value pairs. Boundaries read them as caller.access_point.tags, for example to tell apart the apps that call your meshes.

BoundariesWhat its callers can do

Every conversation created through the access point is checked against these boundaries, as well as the boundaries of its mesh. See Boundaries.

ClientsCallers that sign in with a client ID and a secret

They get their tokens from the access point. See Client.

Issuer

FieldPurposeGuidance
IssuerThe `iss` of its tokens

Exactly as the tokens carry it, for example https://auth.example.com/. It can’t be the access point’s own URL.

Tokens must be forThe audience

What a token’s aud must hold. This access point’s URL is the default, and what MCP clients expect. Another audience takes the value your identity provider puts in aud, for example an API identifier that you share with your other services. Not checked accepts any token the issuer signs, including tokens it made for other services and ID tokens. Use it only when the issuer makes no other tokens. A token whose aud is a URL under the audience, such as an MCP address, is also accepted.

Its keys areThe keys that check its tokens

Published at a URL: the issuer’s JWKS URL, for example https://auth.example.com/.well-known/jwks.json. It must be reachable from the internet. Pasted here: a JWKS document, a JSON object with a keys list, for an issuer that publishes none, such as your own backend. It can have up to 16 keys and 64 KB. Paste a new one when the keys change.

Client

FieldPurposeGuidance
NameIdentifies the client

For example “support-bot” or “nightly-report”.

Client IDWhat the client signs in as

Given when the access point is saved. It is also the sub of the client’s tokens, so boundaries see it as caller.subject. It is not secret.

ClaimsCopied into every token the client gets

Optional. A JSON object, for example with a team claim and a roles list. Boundaries read the claims as caller.claims. It can’t set iss, sub, aud, exp, nbf, iat or jti.

Redirect URIsFor the authorization code flow

Only for an MCP client that uses the authorization code flow. The access point sends the client back to one of these with a code. Use https, or http to localhost or a loopback address, which matches on any port. With none, the client can only use the client credentials grant.

SecretsWhat the client signs in with

New secret makes one. Choose when it stops working: never, in 30 days, in 90 days or in a year. The secret starts with prt_cs_. It is shown once, and it works once you save the access point. A client can have several secrets, so you can replace one without changing the client ID. Each secret shows when it was last used.

Client settings

FieldPurposeGuidance
Client tokens lastThe lifetime of client tokens

How long a token that the access point issues to a client lasts, from 5 minutes to a day. Left empty, an hour. It applies to every client. These settings show only while the access point has clients.

Signing keySigns the tokens of the clients

Rotate signing key replaces it. See Signing keys.

How callers sign in

CallerSet up on the access pointHow the caller gets a token
A person in your web or mobile app, signed in with your identity providerAn issuer for the providerYour app sends the person’s access token.
Your backend, which makes tokens for its own usersAn issuer with the backend’s public keys pastedYour backend signs a token for each user.
A server, job or script with no identity providerA client with a secretFrom the access point’s token endpoint, with the client credentials grant
A person in an MCP client, signed in with your identity providerAn issuer for the provider, and the authorization server URLThe MCP client signs the person in with your provider. The provider must accept the MCP client.
An MCP client that only does the authorization code flowA client with a secret and a redirect URIThe MCP client runs the flow with the client ID and secret you enter in it.

An access point can have both issuers and clients, so its callers can sign in in different ways.

Issuers and how tokens are checked

An issuer is an identity provider, or your own backend, whose tokens the access point accepts. The access point checks each token:

  1. The token’s iss must match the Issuer of one of the access point’s issuers exactly. A token that the access point issued to a client has the access point URL as its iss.
  2. The signature must check with one of the issuer’s keys. A token that names its key with kid is checked with that key only. A token that names no key is checked with each key, when the issuer has 16 keys or fewer.
  3. The token must have exp and sub, and must not have expired. nbf and iat are checked when the token has them. Clocks may differ by up to a minute.
  4. When the issuer has an audience, the token’s aud must hold it, or a URL under it.

The access point fetches a key set from its URL and keeps it for up to an hour. A token that names a key the set doesn’t have makes the access point fetch the set again, at most once a minute. This is how a new key of the issuer is picked up. When the issuer can’t be reached, the access point uses the last key set it fetched in the past 24 hours. With none, the caller gets 503 with Retry-After: 60.

The access point takes the claims as the token has them. It doesn’t map claims, and it doesn’t ask the issuer whether the token was revoked. The token is not passed on to the mesh.

WhenThe response
There is no token401, with a WWW-Authenticate header that points to the access point’s metadata
The token doesn’t check401, the same, with error="invalid_token"
The issuer’s keys can’t be fetched, and there is no copy from the past 24 hours503, with Retry-After
The access point doesn’t exist404

Clients

A client signs in with its client ID and a secret, and gets a token from the access point. Use a client for a caller that has no identity provider. The client ID is the token’s sub, and the client’s claims are copied into the token. The token lasts as long as Client tokens last says.

The client’s ID and secret only get tokens. Send them to the token endpoint, never to the APIs.

Client credentials

A server, job or script gets a token with the client credentials grant:

curl -X POST https://api.partite.ai/access-points/<ACCESS_POINT_ID>/oauth/token \
  -u "<CLIENT_ID>:<CLIENT_SECRET>" \
  -d grant_type=client_credentials

The answer has the token and its lifetime in seconds:

{"access_token": "eyJhbGciOiJIUzI1NiIs...", "expires_in": 3600, "token_type": "Bearer"}

You can also send client_id and client_secret in the form instead of with -u, but not both ways at once. There are no refresh tokens. Get a new token before the old one expires.

Authorization code flow for MCP clients

Some MCP clients only do the authorization code flow. Give such a client a redirect URI, and enter the client ID and secret in the MCP client.

The access point’s authorization endpoint doesn’t sign anyone in. It checks the client ID and the redirect URI, and sends the client straight back with a code. The client trades the code for a token at the token endpoint, with its secret, the redirect URI and its PKCE verifier. The code lasts a minute, and PKCE with S256 is required. When the token expires, the client runs the flow again.

Anyone who holds the client ID and secret acts as the client. Give them only to MCP clients that you trust to keep them.

Secrets

A client can have several secrets. To replace a secret, make a new one, move the caller to it, then delete the old one. The client ID stays the same. Each secret shows when it was last used, so you can tell when the old one is no longer used.

Deleting a secret or a client stops it from getting new tokens. The tokens it already has keep working until they expire. To stop them at once, rotate the signing key and stop accepting the old key. When you delete the last client, the access point stops accepting the tokens it issued.

Calling a mesh through an access point

Under the access point URL, the APIs keep their own paths. To move a caller from an API key to an access point, use the access point URL in place of https://api.partite.ai, and send a token instead of the API key:

Authorization: Bearer <TOKEN>
APIURL
Conversation APIhttps://api.partite.ai/access-points/<ACCESS_POINT_ID>/conversations, and every path under it
AG-UIhttps://api.partite.ai/access-points/<ACCESS_POINT_ID>/agui/<TARGET>, optionally followed by /intents/<INTENT_NAME>
MCPhttps://api.partite.ai/access-points/<ACCESS_POINT_ID>/mcp/<TARGET>

<TARGET> names the mesh version or the route: meshes/<MESH_ID>/version_labels/<LABEL>, meshes/<MESH_ID>/versions/<VERSION>, meshes/<MESH_ID>/draft or routes/<ROUTE_ID>.

The access point page has a Connect a mesh panel. Choose a mesh, a version or route, and MCP, AG-UI or the Conversation API, and it shows the address. The Connect button on the mesh settings can also give the address through an access point.

For example, with a token from the client credentials grant, start a conversation:

curl -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -X POST https://api.partite.ai/access-points/<ACCESS_POINT_ID>/conversations \
  -H "Content-Type: application/json" \
  -d '{
    "mesh": {"id": "<MESH_ID>", "version_label": "prod"},
    "intent": "AnalyzeIssue",
    "input": {"issueText": "App crashes when saving after upgrade to v2.3"}
  }'

A token from one of the issuers is sent the same way.

How MCP clients find where to sign in

An MCP client that calls without a token gets 401. The WWW-Authenticate header points to the access point’s metadata, at https://api.partite.ai/.well-known/oauth-protected-resource/access-points/<ACCESS_POINT_ID> followed by the rest of the path. The metadata lists where the client can get a token:

  • The authorization server URL, when it is set. The MCP client signs the person in there.
  • The access point itself, when it has clients. Its OAuth metadata is at https://api.partite.ai/.well-known/oauth-authorization-server/access-points/<ACCESS_POINT_ID>. It has no client registration, so enter the client ID and secret in the MCP client.

An MCP client asks for a token for the MCP address. A token whose aud is that address passes the default audience check, since the address is a URL under the access point URL.

Callers and their conversations

A caller through an access point is the token’s issuer and subject, on that access point. A conversation created through the access point belongs to that caller. Through the access point, a caller reaches only its own conversations. Any other conversation is not found.

Every caller that uses one client has the client ID as its subject. So they are one caller, and they share their conversations.

An API key reaches every conversation, including the ones created through access points.

External IDs are unique in the organization. A caller that uses an external ID that another caller already has is refused. Use external IDs that can’t be guessed, such as random IDs.

Boundaries

A caller through an access point can use every mesh, version and route in the organization, including drafts. Attach boundaries to the access point to limit that. On the access point page, add them under Boundaries.

A boundary attached to the access point applies to everything in the conversations created through it: the conversation, each request, and every step the agents take. The boundaries of the mesh apply too. See Where a boundary applies.

For a caller through an access point, caller holds:

FieldValue
caller.kindaccess_point
caller.access_point.idThe access point’s ID
caller.access_point.tagsThe access point’s tags, as a map from each tag name to a list of values
caller.subjectThe token’s sub. For a client, its client ID.
caller.claimsEvery claim of the token, as the token has it. For a client, its claims, and iss, sub, aud, exp, nbf, iat and jti.

Only the Conversation create and Request create actions have a caller. To limit what the agents can do for a caller, set tags when the conversation is created, and check the tags in later rules. See Modifications. When a boundary refuses a caller through an access point, the 403 leaves out the names of the boundary and the rule.

Each example is one entry of rules, as the boundary editor’s JSON view shows it. Attach the boundary to the access point.

Only let the callers use the prod version of the support mesh:

{
  "name": "support-prod-only",
  "action": "CONVERSATION_CREATE",
  "when": "mesh.name != \"support\" || mesh.version_label != \"prod\"",
  "effect": "DENY",
  "message": "This app can only use the prod version of the support mesh."
}

Only let callers whose token has the support role send requests:

{
  "name": "support-role",
  "action": "REQUEST_CREATE",
  "when": "caller.kind == \"access_point\" && !(has(caller.claims.roles) && \"support\" in caller.claims.roles)",
  "effect": "DENY",
  "message": "You need the support role."
}

The check on caller.kind lets your own servers, with an API key, still send requests in these conversations. The boundaries page has an example that takes the user tag from the token.

Signing keys

Each access point has a signing key for the tokens it issues to its clients. The key is made with the access point, and is replaced on its own once a year.

To replace it sooner, press Rotate signing key under Client settings. Tokens issued from then on are signed with the new key. The tokens signed with the old key keep working until they expire, which is a day at most. Turn on Stop accepting tokens signed with the old key when the old key may have leaked. Then every token issued so far stops working at once, and every client must get a new token.

The signing key only signs the tokens and authorization codes of clients. Tokens from your issuers are checked with the issuers’ own keys.

Deleting an access point deletes its clients, secrets and signing key. Its tokens stop working at once.

Self-hosted

When you host Partite Mesh yourself, the access point URL starts with PUBLIC_BASE_URL, for example https://mesh.example.com/access-points/<ACCESS_POINT_ID>. When it isn’t set, the server takes the address from each request. Set it to the address your callers use. The tokens the access point issues to its clients carry this URL, and an issuer’s default audience is the URL when the issuer is saved.

A self-hosted server with cloud config serves access points at its own address. An issuer’s default audience is still the URL that the hosted service shows. When your callers’ tokens are for your server’s address, choose Another audience and enter your server’s access point URL.

Terraform

ResourceWhat it manages
partiteai_access_pointThe access point: name, description, tags, issuers, authorization_server_url, client_token_lifetime_seconds and boundary_ids. url is read-only.
partiteai_access_point_clientA client: access_point_id, name, claims as JSON, and redirect_uris. client_id is read-only.
partiteai_access_point_client_secretA secret of a client: access_point_client_id and expires_at. secret can be read only when the secret is made.

In issuers, leave out audience for the access point URL, and set check_audience = false for no audience check.

resource "partiteai_access_point" "support_app" {
  name         = "support-app"
  tags         = [{ name = "app", value = "support" }]
  boundary_ids = [partiteai_boundary.support_app.id]

  issuers = [{
    issuer   = "https://auth.example.com/"
    jwks_url = "https://auth.example.com/.well-known/jwks.json"
  }]
}

resource "partiteai_access_point_client" "nightly_report" {
  access_point_id = partiteai_access_point.support_app.id
  name            = "nightly-report"
  claims          = jsonencode({ team = "billing" })
}

resource "partiteai_access_point_client_secret" "nightly_report" {
  access_point_client_id = partiteai_access_point_client.nightly_report.id

  lifecycle {
    create_before_destroy = true
  }
}

With create_before_destroy, replacing the secret makes the new one before it deletes the old one. Terraform doesn’t rotate signing keys. Use the access point page, or the GraphQL mutation rotateAccessPointSigningKey.

Limits

In the hosted service, an organization can have up to 100 access points and 1000 clients. An access point can have up to 20 issuers. A client can have up to 10 secrets and 20 redirect URIs.

Related