For the complete documentation index, see llms.txt. A markdown version of this page is at /reference/resources/credentialprovider/index.md.

CredentialProvider

A credential provider tells Ringleader where to get a short-lived token for a service, such as GitHub, Anthropic or an MCP server.

A credential provider tells Ringleader where to get a short-lived token for a service. You name it in an Integration where you would otherwise name a Secret. Credential providers explains what a provider does and why to use one. Two guides show how to set one up: Connect workstations to GitHub with the Ringleader GitHub App and Connect an MCP server with each person’s own account. This page lists the fields and flags.

apiVersion: core.ringleader.dev/v1
kind: CredentialProvider | OrgCredentialProvider | GlobalCredentialProvider

The credential source

credentialSource is the block in an Integration that names a provider. It takes the place of credentialRef, and a slot that names both is refused. These slots take it:

SlotWhat it adds
httpProxy, with vendor: githubThe GitHub token, on the hosts the GitHub preset covers.
mcp, in injected modeThe token. From an mcpServer provider, it is added as Authorization: Bearer, and you can leave out inject. From any other provider, it is the whole value of the header inject.header names. Leave out inject.value either way.
llm.providers.anthropic, with llm.endpoint.source: ringleaderAn Anthropic token. See Anthropic federation.

llm.endpoint and mcp in local mode refuse it, because their credential is delivered to the workstation.

Credential source fields

FieldDescription
provider.kindRequired. CredentialProvider, OrgCredentialProvider or GlobalCredentialProvider.
provider.nameRequired. The provider’s name. A CredentialProvider must be in the Integration’s own namespace, and an OrgCredentialProvider must belong to that namespace’s organization.
userAuthorizationOnly boxOwner: use the token of each workstation’s owner. It needs a GlobalCredentialProvider or OrgCredentialProvider, and is refused beside repositories or permissions. For GitHub, name GlobalCredentialProvider/github, the provider people connect to. An mcpServer provider requires this field.
repositoriesUp to 500 repositories, each owner/name, with no repeats. All must have the same owner, because one token reaches one GitHub account.
permissionsUp to 32 entries, each a GitHub permission name with read, write or admin. A name GitHub does not use for an app’s token is refused.

When you leave out repositories, the token reaches every repository the installation grants, which is the set the owner picked when installing. The provider must then hold exactly one installation, because Ringleader matches the repositories’ owner to an installation’s account. Where a policy limits git repositories, you cannot leave the list out, as Repositories a GitHub token may reach describes, with an example of each refusal.

When you leave out permissions, the token gets contents: write, pull_requests: write and metadata: read. A level the installation was not granted gets no token, and Ringleader never falls back to a lower one. The shared app asks for these permissions when it is installed:

PermissionLevel
metadataread
contentswrite
pull_requestswrite
issueswrite
checksread
actionsread
membersread

Leaving a list out and writing it empty are different. repositories: [] or permissions: {} asks for a token that reaches nothing, so no token is issued.

Use right on a provider

The person who applies the Integration needs the use right on the provider it names. Ringleader checks that right when you apply the Integration and again whenever it gets a token. If the author loses it, the token stops being added.

These people have use without asking:

  • Every signed-in person, on the built-in GlobalCredentialProvider named github.
  • An org admin, on the organization’s OrgCredentialProvider objects.
  • A namespace admin, on the namespace’s CredentialProvider objects.

Anyone else needs a Grant in the Integration’s namespace, written by someone who holds use on the provider. For example, an org admin lets a namespace admin name the organization’s provider from the namespace acme:

apiVersion: core.ringleader.dev/v1
kind: Grant
metadata:
  name: acme-github-use
  namespace: acme
spec:
  target:
    kind: OrgCredentialProvider
    matchName: acme-github
  subjects:
    - user:dana@acme.com
  rights:
    - use

A use Grant applies to the provider it was written for. If the provider is deleted and created again under the same name, write the Grant again.

A token that acts as the app reaches the repositories the installation and the Integration allow. Ringleader does not check whether the Integration’s author can reach those repositories on GitHub: use on the provider is the permission.

The three provider kinds

The three kinds differ in who writes them and which namespaces can use them:

KindWhere it livesWho creates itTypical use
CredentialProviderOne namespaceA namespace adminOne team’s own setup, such as an install of the app on a personal GitHub account. It cannot hold people’s own connections, so userAuthorization cannot name it.
OrgCredentialProviderOne organization, named by spec.org. Its name starts with the organization’s name and a hyphen.An org adminThe organization’s installations of the app, an organization-wide Anthropic rule, or an MCP server people connect to.
GlobalCredentialProviderThe whole Ringleader deploymentA global adminThe shared GitHub App, as the built-in provider github.

When your Ringleader deployment has the GitHub App set up, Ringleader creates the GlobalCredentialProvider named github itself, and restores it if someone deletes or edits it.

Each provider’s spec holds exactly one vendor block, such as githubApp, anthropicFederation or mcpServer.

githubApp

apiVersion: core.ringleader.dev/v1
kind: OrgCredentialProvider
metadata:
  name: acme-github
spec:
  org: acme
  githubApp:
    from:
      kind: GlobalCredentialProvider
      name: github

The block takes exactly one of these:

FieldDescription
builtIn: trueThis provider is the shared app. Accepted only on a GlobalCredentialProvider.
from: {kind, name}This provider uses the shared app. from accepts only GlobalCredentialProvider/github, which is what the install command writes. A provider with an app of its own sets appId instead.
appIdAn app of your own, with optional clientId and baseURL.

The fields for an app of your own, such as one on GitHub Enterprise Server, are not usable yet. Its key fields, privateKeyRef and clientSecretRef, are refused when you apply the provider. Use the shared app.

status.installations lists the installations linked to the provider, each with its id and GitHub account. Only the install flow writes it.

anthropicFederation

apiVersion: core.ringleader.dev/v1
kind: OrgCredentialProvider
metadata:
  name: acme-anthropic
spec:
  org: acme
  anthropicFederation:
    organizationId: 00000000-0000-0000-0000-000000000000
    serviceAccountId: svac_example
    federationRuleId: fdrl_example
    workspaceId: wrkspc_example
    subject: org
FieldDescription
organizationIdRequired. Your Anthropic organization’s ID.
serviceAccountIdRequired. The Anthropic service account the token acts as, svac_....
federationRuleIdRequired. The Anthropic federation rule to evaluate, fdrl_....
workspaceIdThe Anthropic workspace to scope the token to, wrkspc_....
subjectorg (the default) or namespace. See Signed statement claims.

Each ID is letters, digits, ., _ and -, at most 128 characters.

mcpServer

apiVersion: core.ringleader.dev/v1
kind: OrgCredentialProvider
metadata:
  name: acme-linear
spec:
  org: acme
  mcpServer:
    url: https://mcp.linear.app/mcp
    scopes: [read]

The block names a remote MCP server that signs people in with OAuth. It is accepted on an OrgCredentialProvider and a GlobalCredentialProvider. An Integration uses the provider in its mcp block, with the same url and userAuthorization: boxOwner.

FieldDescription
urlRequired. The server’s https:// address. It names a public server by a DNS name in ASCII, not by an IP address, and holds no user name, query or fragment. Any port but 80 and 53 is accepted.
scopesThe OAuth scopes to ask for. Left out, Ringleader asks for the ones the server names. A change applies only to connections made after it, so a person who is already connected keeps the scopes they approved until they connect again.
clientIdThe client ID of an OAuth app you registered with the server. Left out, Ringleader identifies itself to the server, with a client ID metadata document or by dynamic registration. OrgCredentialProvider only.
clientSecretRefThe Secret {namespace, name, key} that holds that app’s client secret. Create it with --ringleader-only, as Ringleader-only Secrets explains. It needs clientId. OrgCredentialProvider only.

Reading one provider with rl orgcredentialprovider get <name> -o yaml shows two addresses:

FieldDescription
status.oauthCallbackURLThe redirect URL to register with an OAuth app of your own. Each provider has its own.
status.clientMetadataURLThe address of the client ID metadata document. Absent when the provider sets clientId.

After you change url or clientId, or add or remove clientSecretRef, everyone who was connected has to connect again. After you change url, also change mcp.url in each Integration that names the provider, because the two must match.

Install flags

These flags apply to rl orgcredentialprovider install and rl credentialprovider install.

FlagDescription
--org <org>The organization that owns the provider. Needed only when the provider does not exist yet. rl orgcredentialprovider install only.
-n, --namespace <ns>Target namespace. rl credentialprovider install only.
--no-openPrint the link and do not open a browser.
-o, --output <format>text (default) or json. With json, the command writes one JSON object per line: a url event with the link, then one event saying how the install ended, such as linked, refused, expired or timeout.
--home <dir>Data directory.
--as <subject>Impersonate a subject.

Connect flags

These flags apply to rl userauthorization connect.

FlagDescription
--service-account <namespace>/<name>Connect for this service account instead of for you.
--no-browserPrint the address instead of opening it.
--require-loginRefuse to connect while you are signed out.
-o, --output <format>text (default) or json. With json, the command writes one JSON object per line: a device_code event with the code and address, or an authorization_url event with the address for an MCP server. Then it writes success, denied, expired or error.
--home <dir>Data directory.
--as <subject>Impersonate a subject.

Next steps