CrushMFT Documentation

OAuth: an application gets its token by itself#

Without OAuth, an application that calls the API needs an access token that someone made for it by hand and pasted into it. With OAuth on, the application gets its token by itself, the standard way (OAuth 2.1):

Way For How it proves itself
A person connects it AI clients such as Claude Code, desktop and command-line tools, a web application the person signs in on this server and allows it on a page of the server's; the application then keeps its connection
It signs in by itself a service of your own: an export at night, an integration a client secret, or a key of its own (private_key_jwt); it acts as one account
It brings a token of its own platform GitHub Actions, Kubernetes, Entra ID, Okta, Google a signed token (a JWT) from an issuer you trust for it; it acts as one account

Whichever way, the application gets an ordinary access token (cft_...). The same roles and checks decide what it may do as for a token made by hand, and it never reaches an operation that equals full administration.

Turn it on#

  1. In Preferences, API, turn the API on, and for AI clients Offer the MCP endpoint.
  2. In the OAuth card, tick Applications may get their own tokens and fill in the Sign-in address: the address people sign in at, such as https://files.example.com. Applications are given it as this server's name (the issuer). The App Gateway uses the same one.
  3. Save.

OAuth needs the API feature of the license. It works while all four are true: OAuth on, the API on, the license, and a sign-in address.

The OAuth card

Setting Key What it does Default
Applications may get their own tokens api_oauth_enabled OAuth on. Off ends every token an application got this way, at once. off
Sign-in address gateway_login_url https and the host where people sign in, with no path empty
Other addresses api_oauth_addresses other addresses the API is reached at, one a line. A token is made for one address and taken only there. empty
A token lasts api_oauth_access_minutes the life of an access token, 1 to 1440 minutes 60
A connection lasts api_oauth_refresh_days how long an application stays connected before the person signs in again, 1 to 3650 days 30
and ends after ... days without use api_oauth_refresh_idle_days a connection nobody used this long ends 14
Let people connect applications that name themselves by a web address api_oauth_outside applications nobody registered here may connect (see below). Off ends their tokens at once. off
Only from these hosts api_oauth_outside_hosts only such applications whose address is on these hosts, one a line, *.example.com for every name under it empty: any
They may api_oauth_outside_level Do what the person may, or Only read Do what the person may
Who may connect them api_oauth_outside_who, api_oauth_outside_roles anyone who can sign in, or only the holders of the roles named anyone
They stay connected (refresh tokens) api_oauth_outside_refresh off: the person signs in again each time the token runs out on

For an AI client, give it shows the address of the MCP endpoint, with a button that copies it.

Connect Claude Code, or another AI client#

Claude Code and most AI clients name themselves by a web address (a Client ID Metadata Document) instead of being registered on each server. So first tick Let people connect applications that name themselves by a web address on the OAuth card; to take only Claude's, put claude.ai in Only from these hosts. Then add the server to the client:

claude mcp add --transport http crushmft https://files.example.com/WebInterface/api/v1/mcp

The first call answers 401 and points to this server's sign-in, which the client finds by itself. Claude Code then asks you to authenticate (/mcp): the browser opens the server's sign-in page and then the page that asks whether to connect it. After Allow, the client holds a token for the MCP endpoint and gets a new one by itself whenever it runs out, for as long as the connection lasts.

The page that asks the person#

The page that asks whether to connect an application

The person sees which application asks and as which account, chooses what it may do (Only read is always offered) and sees where the browser goes next. For an application nobody registered, the page leads with the host its address is on, since its name is only its own claim. For an application on the person's own computer, the page warns to allow it only if they started it themselves.

Register an application#

Applications you know get a registration of their own: Applications, Add application on the same page.

The list of applications

An application that people connect

Field What it does
Name shown on the page that asks the person, and in every list
Enabled off: it gets no token, the tokens it holds end at once, and its connections stop
Kind People connect it to their own account, or It signs in by itself, as one account. It cannot be changed later.
Installed on a device or running in a browser: no secret such an application proves itself with PKCE alone. Off: it signs in with a client secret, made when it is saved and shown that once, or with its public keys.
Redirect addresses where the browser may be sent back, matched exactly: an https address; an http address only on the person's own computer (127.0.0.1, [::1] or localhost), where any port is taken; or an app's own scheme such as com.example.app:/callback
Ask the person first off: nobody is asked, you vouch for the application yourself
Who may connect it anyone who can sign in, or only the holders of some roles
It stays connected (refresh tokens), For at most it gets a refresh token, and how many days its connections may last at most
Level What the account may do, or Only read
Only these permissions narrows its tokens to these permissions, or to every permission that begins with a name ending in a dot, such as users.
Its tokens are for The MCP endpoint, The API (the MCP endpoint included), or Everything a token reaches over HTTP: the API, WebDAV and transfers
A token lasts its own token life in minutes; empty: as the OAuth card says

What to give the application lists its client id, the issuer and the two endpoints. New client secret makes a new secret and shows it once; the old one stops working at once.

An application that signs in by itself#

With It signs in by itself, as one account, the application acts as the Account named (a connection group and a user name). The account must exist and have been saved once in the User Manager; an account deleted and made again under the same name is not it. Only from these addresses limits where its requests, and its tokens, are taken from.

It asks for a token with its client id and secret:

curl -u oc_7f3a91c2b4d5e6f7:<client secret> -d grant_type=client_credentials -d scope=api https://files.example.com/oidc/token

The answer holds access_token, which it sends as Authorization: Bearer cft_... until it runs out, then asks again. Instead of a secret it may sign in with a key of its own: put its public keys (a JWKS) in Its public keys.

A token of its own platform#

A job in GitHub Actions, a pod in Kubernetes or an application in Entra ID, Okta or Google already holds a token its platform signed. Under Trust a token of its own platform, add a row for it: the Issuer, the Subject the token names (the workload), the Audience it is made for, and optionally the Keys address; the examples fill in a row for each platform. The application then trades its platform's token for one of this server's:

curl -d grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer -d client_id=oc_7f3a91c2b4d5e6f7 -d assertion=<the platform's token> https://files.example.com/oidc/token

Test fetches the issuer's keys now and shows what came: the keys, and the certificate the address showed. The keys are taken only from an address whose certificate a trusted certificate authority issued, or one that matches a pin the server already has. For an issuer inside your network with a certificate of its own, Test says it was refused and shows that certificate; if you trust it, add its host to Always Trusted Domains (Certificate pinning).

What a token may do#

  • What the account may do at the moment of use: a role taken from the account is gone from the token's next request.
  • Never more than the application's Level and Only these permissions, nor more than the person chose on the page that asked them.
  • Never an operation that equals full administration, whatever the application or the account.
  • Only where it is for (Its tokens are for), and only at the address it was made for.

Connected apps#

A person's connections are in the User Manager: the user, Admin, Access, Connected apps. Disconnect ends a connection and its tokens at once, on every server of a cluster. See Admin.

Through the API a person lists and ends their own with GET /me/connections and DELETE /me/connections/{id}; an administrator sees everyone's with GET /oauth/connections.

In a cluster#

The settings and the applications go to the other servers with the preferences, when the cluster replicates them. Tokens and connections are on every server, and ending one works on every server at once.

Not yet#

  • Through a DMZ: the sign-in and the token addresses are not answered through a DMZ yet. A client on the person's own computer, such as Claude Code, needs none. A service in the cloud, such as an AI assistant's connector, can reach only a server that faces the internet itself.
  • Dynamic Client Registration is not offered: applications nobody registered name themselves by their web address instead.

The addresses#

Address What it is
https://files.example.com the issuer: the sign-in address
/oidc/authorize where the browser is sent to sign in and allow (PKCE required)
/oidc/token where an application gets and renews its tokens
/oidc/revoke where an application ends a token or its connection when it signs out
/.well-known/oauth-authorization-server the server's own description for applications
/.well-known/oauth-protected-resource what the API and the MCP endpoint say about themselves
/WebInterface/api/v1/mcp the MCP endpoint

The API's operations#

The settings, the applications and the connections, as the pages above show them. Reading the settings and the applications needs access.oauth.view, changing them access.oauth.edit, and everyone's connections access.tokens.view-all and access.tokens.revoke-all; a person's own need nothing more than their login. No token may change OAuth or end a connection.

From openapi.json: CrushMFT API, version v1, build 27.0.0_2483.

OAuth for the API (design/105): how an application gets its API token by itself. The settings, the registered clients with their secrets and the test of a service client's outside issuer, and the connections people and services made.

GET /WebInterface/api/v1/oauth #

OAuth for the API (design/105): its settings, the registered clients (never a secret) with the connections each has that can still make tokens, and the addresses to give an application.

  • Operation: oauth.get
  • Credentials: token or basic or session
  • Permission: access.oauth.view
  • Tier: 1
  • Legacy: oauthOverview
  • Token: by its grants
  • Read only: yes

Responses

Status Description Body
200 The result. object application/json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
clients list of object
clients[].access_minutes string
clients[].account_group string
clients[].account_id string
clients[].account_name string
clients[].connections integer
clients[].consent string
clients[].enabled boolean
clients[].federated list of object
clients[].federated[].audience string
clients[].federated[].issuer string
clients[].federated[].jwks_uri string
clients[].federated[].subject string
clients[].has_keys boolean
clients[].has_secret boolean
clients[].id string
clients[].ips string
clients[].jwks string
clients[].kind string
clients[].level string
clients[].name string
clients[].only array
clients[].public boolean
clients[].redirect_uris list of string
clients[].refresh boolean
clients[].refresh_days string
clients[].resources list of string
clients[].saved_by string
clients[].saved_time string
clients[].who string
clients[].who_roles array
endpoints object
endpoints.authorization_endpoint string
endpoints.issuer string
endpoints.mcp string
endpoints.metadata string
endpoints.revocation_endpoint string
endpoints.token_endpoint string
settings object
settings.access_minutes integer
settings.addresses array
settings.api_enabled boolean
settings.enabled boolean
settings.licensed boolean
settings.login_url string
settings.mcp boolean
settings.on boolean
settings.outside boolean
settings.outside_hosts string
settings.outside_level string
settings.outside_refresh boolean
settings.outside_roles string
settings.outside_who string
settings.refresh_days integer
settings.refresh_idle_days integer
Example 200 response
{
  "settings": {
    "enabled": true,
    "on": true,
    "api_enabled": true,
    "licensed": true,
    "mcp": false,
    "login_url": "http://192.0.2.10:443",
    "addresses": [],
    "access_minutes": 30,
    "refresh_days": 30,
    "refresh_idle_days": 14,
    "outside": false,
    "outside_refresh": true,
    "outside_hosts": "",
    "outside_level": "full",
    "outside_who": "anyone",
    "outside_roles": ""
  },
  "clients": [
    {
      "id": "oc_1ulwmum2syjaud7u",
      "name": "Gate desktop",
      "enabled": true,
      "kind": "user",
      "level": "read",
      "only": [],
      "resources": [
        "mcp",
        "api"
      ],
      "access_minutes": "",
      "jwks": "",
      "public": true,
      "redirect_uris": [
        "http://192.0.2.10/callback"
      ],
      "consent": "ask",
      "who": "anyone",
      "who_roles": [],
      "refresh": true,
      "refresh_days": "",
      "account_group": "",
      "account_name": "",
      "account_id": "",
      "ips": "",
      "federated": [],
      "saved_by": "MainUsers/apiadmin",
      "saved_time": "1796108157440",
      "has_secret": false,
      "has_keys": false,
      "connections": 0
    },
    {
      "id": "oc_nry93zwcmvsvk510",
      "name": "Gate web",
      "enabled": true,
      "kind": "user",
      "level": "full",
      "only": [],
      "resources": [
        "mcp",
        "api"
      ],
      "access_minutes": "",
      "jwks": "",
      "public": false,
      "redirect_uris": [
        "https://app.example.com/callback"
      ],
      "consent": "ask",
      "who": "anyone",
      "who_roles": [],
      "refresh": true,
      "refresh_days": "",
      "account_group": "",
      "account_name": "",
      "account_id": "",
      "ips": "",
      "federated": [],
      "saved_by": "MainUsers/apiadmin",
      "saved_time": "1796108157452",
      "has_secret": true,
      "has_keys": false,
      "connections": 0
    }
  ],
  "endpoints": {
    "issuer": "http://192.0.2.10:443",
    "authorization_endpoint": "http://192.0.2.10:443/oidc/authorize",
    "token_endpoint": "http://192.0.2.10:443/oidc/token",
    "revocation_endpoint": "http://192.0.2.10:443/oidc/revoke",
    "metadata": "http://192.0.2.10:443/.well-known/oauth-authorization-server",
    "mcp": "http://192.0.2.10:443/WebInterface/api/v1/mcp"
  }
}

PATCH /WebInterface/api/v1/oauth/settings #

OAuth's settings: on or off, the sign-in address, this server's addresses, how long a token and a connection last, and what clients from outside may do. Fields left out keep their values. Switching OAuth or outside clients off, or narrowing what outside clients may do, ends the tokens concerned at once.

  • Operation: oauth.settings.set
  • Credentials: basic or session
  • Permission: access.oauth.edit
  • Tier: 0
  • Legacy: oauthSettingsSave
  • Token: never
  • Read only: no

Request body (required): application/json

Field Type Required Description
enabled boolean OAuth for the API on or off. It works while the API is on, the licence has the api feature and there is a sign-in address. Default false.
login_url string The sign-in address, the same one the App Gateway's panel shows: https or http and the host, such as files.example.com with its scheme, and no path. Applications are given it as the issuer.
addresses any This server's other addresses, a list or one a line, beside the sign-in address: a token is made for one address and taken only there.
access_minutes integer How long an access token lasts: 1 to 1440 minutes. Default 60.
refresh_days integer The longest a connection lives: 1 to 3650 days. Default 30.
refresh_idle_days integer A connection nobody used this long ends: 1 to 3650 days. Default 14.
outside boolean Accept clients nobody registered, each named by the https address of its metadata document. Off ends their tokens at once. Default false.
outside_hosts any When not empty: only client ids on these hosts, a list or one a line.
outside_level string, one of full, read The most an outside client's token may do. Default full.
outside_who string, one of anyone, roles Who may connect an outside client: anyone who can sign in, or the holders of outside_roles. Default anyone.
outside_roles any The roles whose holders may connect an outside client, a list or one a line.
outside_refresh boolean Outside clients get refresh tokens. Default true.
Example request body
{
  "enabled": true,
  "login_url": "http://192.0.2.10:443",
  "access_minutes": 30
}

Responses

Status Description Body
200 The result. object application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
412 If-Match did not match: someone changed the object since it was read. Problem application/problem+json
422 A field fails its rule: errors lists every one. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
access_minutes integer
addresses array
api_enabled boolean
enabled boolean
licensed boolean
login_url string
mcp boolean
on boolean
outside boolean
outside_hosts string
outside_level string
outside_refresh boolean
outside_roles string
outside_who string
refresh_days integer
refresh_idle_days integer
Example 200 response
{
  "enabled": true,
  "on": true,
  "api_enabled": true,
  "licensed": true,
  "mcp": false,
  "login_url": "http://192.0.2.10:443",
  "addresses": [],
  "access_minutes": 30,
  "refresh_days": 30,
  "refresh_idle_days": 14,
  "outside": false,
  "outside_refresh": true,
  "outside_hosts": "",
  "outside_level": "full",
  "outside_who": "anyone",
  "outside_roles": ""
}

POST /WebInterface/api/v1/oauth/clients #

Register a client: a sign-in client, which a person connects, or a service client, which acts as one account with no one present. A client that proves itself with a secret gets its first one in this reply only. 201.

  • Operation: oauth.clients.create
  • Credentials: basic or session
  • Permission: access.oauth.edit
  • Tier: 0
  • Legacy: oauthClientSave
  • Token: never
  • Read only: no

Request body (required): application/json

Field Type Required Description
name string yes The name people see on the consent page and in every list: 1 to 60 characters.
kind string, one of user, service user: people sign in to connect it; service: it acts as one account with no one present. Default user.
enabled boolean Off: no new token, its live tokens end at once, and its connections stop refreshing. Default true.
level string, one of full, read What its tokens may do with the account's rights: everything, or only what reads. Default full.
only any Permission names or name beginnings (users., jobs.job.run), a list or one a line, its tokens are narrowed to; empty: no narrowing.
resources any What its tokens may be for: mcp, api and server (everything over HTTP), a list or one a line. A new client: mcp and api.
access_minutes integer A token's life in minutes, 1 to 1440; empty: the server's.
jwks string Its public keys (a JWKS, RSA or P-256) when it proves itself with private_key_jwt.
public boolean A sign-in client with no secret and no key: PKCE alone. false: it proves itself with keys, or with a secret answered once by the save. Default true.
redirect_uris any A sign-in client's redirect addresses, 1 to 20, exact: https, or http on the loopback address, whose port may be any.
consent string, one of ask, skip ask: the consent page every time; skip: the Administrator vouches for the client. Default ask.
who string, one of anyone, roles Who may connect it: anyone who can sign in, or the holders of who_roles. Default anyone.
who_roles any The role ids whose holders may connect it.
refresh boolean A sign-in client gets refresh tokens. Default true.
refresh_days integer The longest its connections live, 1 to 3650 days; empty: the server's.
account_group string A service client's account: its connection group.
account_name string A service client's account: its user name. The account must exist and have a user_id, which the save pins.
ips string Addresses a service client's token requests and tokens are taken from: IPs or patterns such as 10.0.0.5 or 192.168.*, separated by commas; empty: any.
federated array A service client's outside issuers, at most 10: each an object of issuer, subject, audience and jwks_uri (empty: the address the issuer's own document names).
Example request body
{
  "name": "Gate desktop",
  "redirect_uris": [
    "http://192.0.2.10/callback"
  ],
  "level": "read"
}

Responses

Status Description Body
201 Created. object application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
409 The object exists already, or its state does not allow this. Problem application/problem+json
422 A field fails its rule: errors lists every one. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 201 response

Field Type Required Description
client object
client.access_minutes string
client.account_group string
client.account_id string
client.account_name string
client.consent string
client.enabled boolean
client.federated list of object
client.federated[].audience string
client.federated[].issuer string
client.federated[].jwks_uri string
client.federated[].subject string
client.has_keys boolean
client.has_secret boolean
client.id string
client.ips string
client.jwks string
client.kind string
client.level string
client.name string
client.only array
client.public boolean
client.redirect_uris list of string
client.refresh boolean
client.refresh_days string
client.resources list of string
client.saved_by string
client.saved_time string
client.who string
client.who_roles array
client_secret string
Example 201 response
{
  "client": {
    "id": "oc_1ulwmum2syjaud7u",
    "name": "Gate desktop",
    "enabled": true,
    "kind": "user",
    "level": "read",
    "only": [],
    "resources": [
      "mcp",
      "api"
    ],
    "access_minutes": "",
    "jwks": "",
    "public": true,
    "redirect_uris": [
      "http://192.0.2.10/callback"
    ],
    "consent": "ask",
    "who": "anyone",
    "who_roles": [],
    "refresh": true,
    "refresh_days": "",
    "account_group": "",
    "account_name": "",
    "account_id": "",
    "ips": "",
    "federated": [],
    "saved_by": "MainUsers/apiadmin",
    "saved_time": "1796108157440",
    "has_secret": false,
    "has_keys": false
  }
}

PUT /WebInterface/api/v1/oauth/clients/{id} #

Change a client: the fields given are taken over the stored ones; its kind never changes. A change of what its tokens may do, or of whose they are, ends its tokens at once.

  • Operation: oauth.clients.save
  • Credentials: basic or session
  • Permission: access.oauth.edit
  • Tier: 0
  • Legacy: oauthClientSave
  • Token: never
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The client's id (oc_ and 16 letters), as oauth.get gives it. It never changes.

Request body (required): application/json

Field Type Required Description
name string The name people see on the consent page and in every list: 1 to 60 characters.
kind string, one of user, service user: people sign in to connect it; service: it acts as one account with no one present. It never changes.
enabled boolean Off: no new token, its live tokens end at once, and its connections stop refreshing.
level string, one of full, read What its tokens may do with the account's rights: everything, or only what reads.
only any Permission names or name beginnings (users., jobs.job.run), a list or one a line, its tokens are narrowed to; empty: no narrowing.
resources any What its tokens may be for: mcp, api and server (everything over HTTP), a list or one a line. A new client: mcp and api.
access_minutes integer A token's life in minutes, 1 to 1440; empty: the server's.
jwks string Its public keys (a JWKS, RSA or P-256) when it proves itself with private_key_jwt.
public boolean A sign-in client with no secret and no key: PKCE alone. false: it proves itself with keys, or with a secret answered once by the save.
redirect_uris any A sign-in client's redirect addresses, 1 to 20, exact: https, or http on the loopback address, whose port may be any.
consent string, one of ask, skip ask: the consent page every time; skip: the Administrator vouches for the client.
who string, one of anyone, roles Who may connect it: anyone who can sign in, or the holders of who_roles.
who_roles any The role ids whose holders may connect it.
refresh boolean A sign-in client gets refresh tokens.
refresh_days integer The longest its connections live, 1 to 3650 days; empty: the server's.
account_group string A service client's account: its connection group.
account_name string A service client's account: its user name. The account must exist and have a user_id, which the save pins.
ips string Addresses a service client's token requests and tokens are taken from: IPs or patterns such as 10.0.0.5 or 192.168.*, separated by commas; empty: any.
federated array A service client's outside issuers, at most 10: each an object of issuer, subject, audience and jwks_uri (empty: the address the issuer's own document names).
Example request body
{
  "name": "Gate desktop app"
}

Responses

Status Description Body
200 The result. object application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
404 No such object, or one outside the caller's scope. Problem application/problem+json
412 If-Match did not match: someone changed the object since it was read. Problem application/problem+json
422 A field fails its rule: errors lists every one. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
client object
client.access_minutes string
client.account_group string
client.account_id string
client.account_name string
client.consent string
client.enabled boolean
client.federated array
client.has_keys boolean
client.has_secret boolean
client.id string
client.ips string
client.jwks string
client.kind string
client.level string
client.name string
client.only array
client.public boolean
client.redirect_uris list of string
client.refresh boolean
client.refresh_days string
client.resources list of string
client.saved_by string
client.saved_time string
client.who string
client.who_roles array
Example 200 response
{
  "client": {
    "id": "oc_1ulwmum2syjaud7u",
    "name": "Gate desktop app",
    "enabled": true,
    "kind": "user",
    "level": "read",
    "only": [],
    "resources": [
      "mcp",
      "api"
    ],
    "access_minutes": "",
    "jwks": "",
    "public": true,
    "redirect_uris": [
      "http://192.0.2.10/callback"
    ],
    "consent": "ask",
    "who": "anyone",
    "who_roles": [],
    "refresh": true,
    "refresh_days": "",
    "account_group": "",
    "account_name": "",
    "account_id": "",
    "ips": "",
    "federated": [],
    "saved_by": "MainUsers/apiadmin",
    "saved_time": "1796108157473",
    "has_secret": false,
    "has_keys": false
  }
}

DELETE /WebInterface/api/v1/oauth/clients/{id} #

Delete a client and end its connections and tokens at once.

  • Operation: oauth.clients.delete
  • Credentials: basic or session
  • Permission: access.oauth.edit
  • Tier: 0
  • Legacy: oauthClientDelete
  • Token: never
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The client.

Responses

Status Description Body
200 The result. object application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
404 No such object, or one outside the caller's scope. Problem application/problem+json
default Any other error. Problem application/problem+json
Example 200 response
{}

POST /WebInterface/api/v1/oauth/clients/{id}/secret #

A new secret for a client that proves itself with one, in this reply only; the old one stops working at once.

  • Operation: oauth.clients.secret
  • Credentials: basic or session
  • Permission: access.oauth.edit
  • Tier: 0
  • Legacy: oauthClientSecret
  • Token: never
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The client: one that is not public.

Responses

Status Description Body
200 The result. object application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
404 No such object, or one outside the caller's scope. Problem application/problem+json
409 The object exists already, or its state does not allow this. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
client_id string
client_secret string
Example 200 response
{
  "client_id": "oc_nry93zwcmvsvk510",
  "client_secret": "EXAMPLE-CLIENT-SECRET-SHOWN-ONCE"
}

POST /WebInterface/api/v1/oauth/clients/{id}/test #

Fetch a service client's outside issuer's keys now (its row, counted from 0) and answer what came: the keys address and the keys (never their material), the certificate the address showed, or why it was refused.

  • Operation: oauth.clients.test
  • Credentials: basic or session
  • Permission: access.oauth.edit
  • Tier: 0
  • Legacy: oauthClientTest
  • Token: never
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The service client.

Request body (required): application/json

Field Type Required Description
row integer The outside issuer to test: its place in the client's federated list, counted from 0. Default 0.
Example request body
{
  "row": 0
}

Responses

Status Description Body
200 The result. object application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
404 No such object, or one outside the caller's scope. Problem application/problem+json
409 The object exists already, or its state does not allow this. Problem application/problem+json
422 A field fails its rule: errors lists every one. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
audience string
certificate object
certificate.issued_by string
certificate.not_after integer
certificate.pin_line string
certificate.pin_type string
certificate.pinned_now boolean
certificate.seen boolean
certificate.sha256 string
certificate.subject string
certificate.trusted_ca boolean
discovery string
issuer string
keys list of object
keys[].kid string
keys[].kty string
keys[].size integer
keys[].used boolean
keys_address string
keys_used integer
passed boolean
refusal string
row integer
subject string
Example 200 response
{
  "row": 0,
  "issuer": "https://192.0.2.10:64288",
  "subject": "gate-workload",
  "audience": "http://192.0.2.10:443",
  "passed": true,
  "discovery": "",
  "keys_address": "https://192.0.2.10:64288/keys",
  "keys": [
    {
      "kid": "gate1",
      "kty": "RSA",
      "size": 2048,
      "used": true
    }
  ],
  "keys_used": 1,
  "certificate": {
    "seen": true,
    "subject": "CN=192.0.2.10 (gate)",
    "issued_by": "CN=192.0.2.10 (gate)",
    "sha256": "D0E7FF5B3243A53DCA4F241F823FC20C49FFF1F90DEB51AA3E8A5D8D0EEDD65F",
    "not_after": 1796194557000,
    "trusted_ca": false,
    "pin_line": "oauth|192.0.2.10",
    "pin_type": "",
    "pinned_now": false
  }
}

GET /WebInterface/api/v1/oauth/connections #

Every connection on the server: its client, whose it is, its level, its state and when it was last used. Never a refresh token or a hash.

  • Operation: oauth.connections.list
  • Credentials: basic or session
  • Permission: any login
  • Tier: -
  • Legacy: listOAuthGrants
  • Token: never
  • Read only: yes

Responses

Status Description Body
200 The result. object application/json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
connections list of object
connections[].client string
connections[].client_name string
connections[].created string
connections[].ends string
connections[].expires string
connections[].first_ip string
connections[].id string
connections[].idle_days string
connections[].last_ip string
connections[].last_used string
connections[].level string
connections[].only string
connections[].redirect_uris string
connections[].refresh_time string
connections[].resource string
connections[].resource_kind string
connections[].revoked string
connections[].revoked_by string
connections[].revoked_time string
connections[].revoked_why string
connections[].rotations string
connections[].scope string
connections[].state string
connections[].user_group string
connections[].user_id string
connections[].user_name string
Example 200 response
{
  "connections": [
    {
      "last_ip": "192.0.2.10",
      "expires": "1798700157831",
      "user_name": "bob",
      "last_used": "1796108157831",
      "idle_days": "14",
      "revoked": "false",
      "refresh_time": "1796108157831",
      "scope": "api:read offline_access",
      "ends": "1797317757831",
      "only": "",
      "client": "oc_1ulwmum2syjaud7u",
      "id": "jCpJLizhjKbA",
      "state": "active",
      "client_name": "Gate desktop app",
      "user_group": "MainUsers",
      "level": "read",
      "resource": "http://192.0.2.10:443/WebInterface/api/v1",
      "created": "1796108157831",
      "revoked_why": "",
      "redirect_uris": "http://192.0.2.10/callback",
      "revoked_time": "0",
      "first_ip": "192.0.2.10",
      "user_id": "2a02ddad0a1e3549301c3489b2f9f2b0",
      "resource_kind": "api",
      "rotations": "0",
      "revoked_by": ""
    },
    {
      "last_ip": "192.0.2.10",
      "expires": "1798700157849",
      "user_name": "bob",
      "last_used": "1796108157849",
      "idle_days": "14",
      "revoked": "false",
      "refresh_time": "1796108157849",
      "scope": "api:read offline_access",
      "ends": "1797317757849",
      "only": "",
      "client": "oc_1ulwmum2syjaud7u",
      "id": "KBTokqVOjUrl",
      "state": "active",
      "client_name": "Gate desktop app",
      "user_group": "MainUsers",
      "level": "read",
      "resource": "http://192.0.2.10:443/WebInterface/api/v1",
      "created": "1796108157849",
      "revoked_why": "",
      "redirect_uris": "http://192.0.2.10/callback",
      "revoked_time": "0",
      "first_ip": "192.0.2.10",
      "user_id": "2a02ddad0a1e3549301c3489b2f9f2b0",
      "resource_kind": "api",
      "rotations": "0",
      "revoked_by": ""
    }
  ]
}

DELETE /WebInterface/api/v1/oauth/connections/{id} #

End a connection and every token it made, at once.

  • Operation: oauth.connections.revoke
  • Credentials: basic or session
  • Permission: any login
  • Tier: -
  • Legacy: revokeOAuthGrant
  • Token: never
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The connection's id, as the list gives it (never a refresh token).

Responses

Status Description Body
200 The result. object application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
404 No such object, or one outside the caller's scope. Problem application/problem+json
default Any other error. Problem application/problem+json
Example 200 response
{}

Schemas used here#

Problem #

An error (RFC 9457), as application/problem+json. code is stable and is what a program switches on; detail says it in words; request_id finds the request in the server log.

Code Status Meaning
bad_request 400 The request cannot be read: a broken path, an unknown or badly typed parameter, a body that is not a JSON object.
validation_failed 422 The body is well-formed, but one or more of its fields cannot be used. errors lists each field, the rule and a message.
tls_refused 422 A TLS key store (a path or a password) was refused before anything was saved: it does not open, holds no usable private key, has ended or does not belong to its certificate. detail says why in plain words and what to do (design/83 section 8.1).
unauthenticated 401 No credential, or one that did not log in.
forbidden 403 Logged in, and refused. detail carries the reason the access engine gave.
tier0 403 The operation is equal to full control of the server. No token may use it, and of the accounts only the Administrator role.
read_only_token 403 The token is read-only and the operation changes something.
legacy_account 403 The account holds legacy admin flags, which the API does not act on. Convert it to roles, or issue a token for it.
not_open_yet 403 The command behind the operation is not switched on for roles and tokens yet. An administrator's own login can use it.
dmz_not_allowed 403 The request came through a DMZ, and the API does not answer those unless api_from_dmz allows it.
license_feature 403 The server's license does not include the feature the operation needs (design/78 5). feature names it, edition the edition or add-on that has it, state the license's state.
not_found 404 No such operation, no such object, or an object the caller's scope does not cover.
method_not_allowed 405 The path exists and the method does not. Allow lists the methods that do.
conflict 409 The object already exists, or is in a state that does not allow this.
precondition_failed 412 If-Match did not match: the object changed since it was read.
payload_too_large 413 The body is larger than api_max_body_kb.
unsupported_media_type 415 A body must be Content-Type: application/json.
rate_limited 429 Too many requests for this credential or address in this minute, or, on a license operation, the license service's own limit. Retry-After says when to try again.
internal_error 500 A fault in the server. The server log has the cause under the request id.
not_implemented 501 The operation is in the registry and is not built on this server yet.
unavailable 503 The server is starting or shutting down.
fips_restricted 409 The server runs in FIPS 140-3 mode (launched with -Dcrushmft.fips=true), and FIPS mode does not allow what was asked: the detail is the catalog row's reason and what to use instead, fips_id its id (CrushFTP design/61 section 5).
refused 403 An approval's dry run was refused and its answer named no code of its own (proposals.approve); the status is that answer's.
otp_required 403 The account signs in with a one-time code: one was sent to its phone or email. Send the request again with otp_token.
current_password 403 The change needs the account's current password, and it is missing or wrong.
quota 507 The upload goes past the user's quota.
mail_failed 502 The change was made, but the mail that goes with it was not sent: detail has the mail server's answer.
plugin_failed 502 The plugin the operation goes through (CrushSSO for a login token) gave no usable answer: detail has what it said.
acme_failed 502 Let's Encrypt did not give a certificate: detail has its answer.
token_missing 400 A license operation: no token was sent. Copy it from the portal.
token_unknown 422 A license operation: the license service knows no license with this token.
file_missing 400 A license operation: no license file was sent.
format 422 A license operation: this is not a license file.
license_bad 422 A license operation: the license does not verify. reason says why.
node_identity 422 A license operation: this server has no node identity to bind a license to.
no_license 422 A license operation that needs a license (a check-in, a release) on a server that has none.
not_started 422 A license operation before the server's licensing has started.
seats_full 409 A license operation: every seat of the license is in use. activations lists them; release one in the portal.
wrong_product 409 A license operation: the token or file is for another product (CrushBalance).
test_seat_unavailable 409 A license operation: the license has no test seat left.
license_suspended 403 A license operation: the license is suspended. Contact support.
license_revoked 403 A license operation: the license is revoked. Contact support.
signature_bad 400 A license operation: the license service could not verify this server's signed request; for a license file (422), its signature does not verify.
clock_skew 400 A license operation: this server's clock is too far from the license service's; server_time has the service's time.
replay 400 A license operation: the license service saw this signed request before.
trial_used 409 A license operation: this feature's trial was used already.
not_trialable 409 A license operation: this feature has no trial.
not_available 409 A license operation that is not available yet (a trial, Activate all nodes).
dmz 409 A license operation on a DMZ instance, which takes the internal server's license.
unreachable 502 A license operation: the license service could not be reached. Test the connection.
answer_bad 502 A license operation: the license service's answer could not be read.
status_bad 502 A license operation: the license service's signed status does not verify.
too_soon 429 A license operation asked again too soon (a check-in or a connection test); wait a minute.
activation_unknown 409 A license operation: the license service has no activation of this server (released or moved in the portal). Activate again.
stale 422 A license file: an older issue of the license than the one the server holds.
expired 422 A license file: its license has ended.
updates_ended 422 A license file: the perpetual license does not cover the running version.
other_server 422 A license file: it is bound to another server. Activate this one, or make its file from this server's activation request.
root_unknown 422 A license file: signed under a root this server does not know.
root_revoked 422 A license file: signed under a root that is revoked.
dev_root 422 A license file: signed under a development root, which a release build does not take.
vouch_bad 422 A license file: the root's vouch for its license key does not verify.
not_a_license_key 422 A license file: signed by a key that is not a license key.
key_revoked 422 A license file: signed by a license key that is revoked.
key_not_valid_then 422 A license file: its license key was not valid when the file was issued.
Field Type Required Description
type string
title string
code string, one of bad_request, validation_failed, tls_refused, unauthenticated, forbidden, tier0, read_only_token, legacy_account, not_open_yet, dmz_not_allowed, license_feature, not_found, method_not_allowed, conflict, precondition_failed, payload_too_large, unsupported_media_type, rate_limited, internal_error, not_implemented, unavailable, fips_restricted, refused, otp_required, current_password, quota, mail_failed, plugin_failed, acme_failed, token_missing, and 35 more
detail string
operation string
permission string
request_id string
status integer