Skip to main content

How to Manage OAuth Clients

An OAuth client is an application that is allowed to sign users in to an environment and act for them, for example the Mosaic CLI, which people and AI agents use to work with the environment from a terminal. No application can connect until it is added as an OAuth client of the environment. See OAuth 2.1 Authorization Server for how the sign-in works.

You manage the OAuth clients of an environment in the Management System under Settings > Access Management > OAuth Clients.

OAuth Clients in the Management System

OAuth Clients

Which Applications to Add​

  • The Mosaic CLI, through which AI agents work with the environment. Select it by name. See Manage Data with AI Agents for the whole setup.
  • API tools such as Postman, Bruno or Insomnia, to call the GraphQL APIs of the environment as yourself. Add them as Custom with the registration type Pre-Registered and the callback URL that the tool uses, for example https://oauth.pstmn.io/v1/callback for the Postman desktop app. See Connect Postman.
  • Your own applications, such as an internal tool or a desktop app, that sign users in with the authorization code flow and PKCE. If the application publishes a Client ID Metadata Document, add it with the registration type CIMD, otherwise as Pre-Registered.

Scripts and integrations that run without a user, such as CI jobs or n8n workflows, don't need an OAuth client. They use a service account with the client credentials grant.

Permissions​

The Identity Service has two permissions for OAuth clients, which you assign to user roles:

PermissionAllows
OAUTH_CLIENTS_VIEWViewing the OAuth clients
OAUTH_CLIENTS_EDITViewing, adding, changing, disabling and deleting OAuth clients

The ADMIN permission of the Identity Service includes both.

Add an OAuth Client​

  1. Open OAuth Clients and click + (New) at the top right.
  2. Select the Application:
    • For the Mosaic CLI, select it from the list. Its name is filled in. Applications that are already added are not listed.
    • For any other application, select Custom and continue below.
  3. Change the Name if needed. Users see it on the permission page, and it is part of the user name in the changes the application makes, e.g. Thomas Anderson (via Mosaic CLI).
  4. For a custom application, select the Registration Type:
    • CIMD, if the application publishes a Client ID Metadata Document. Enter the HTTPS URL of the document as the Client ID. The application's documentation names this URL.
    • Pre-Registered, if it doesn't. Enter the Redirect URIs that the application uses, for example http://localhost/callback. The Identity Service generates the client ID.
  5. Click Proceed.

Adding a custom OAuth client

New OAuth Client

For a pre-registered client, copy the generated Client ID from the details page and enter it in the application. Applications with a Client ID Metadata Document need no further setup. The Mosaic CLI identifies itself with the Client ID Metadata Document https://docs.axinom.com/mosaic-cli/client-metadata.json.

Change, Disable or Delete an OAuth Client​

Open an OAuth client from the list to see its details.

OAuth client details

OAuth Client Details

  • Name: can be changed at any time.
  • Redirect URIs: can be changed for pre-registered clients. Clients with a Client ID Metadata Document take them from their document.
  • Client ID and Registration Type: can't be changed. To use a different client ID, add a new OAuth client and delete the old one.
  • Disable: users can no longer sign in to the environment with the application, and its existing sessions end within 10 minutes. Enable allows it again.
  • Delete: deletes the OAuth client and ends all its sessions. For a client with a Client ID Metadata Document, users can still sign in with the application if Allow Any OAuth Client is on for the environment; disable the client instead to block it.

Disable, Enable and Delete are also available in the actions menu of each row in the list.

Connect Postman​

  1. Add Postman as a Custom, Pre-Registered OAuth client with the redirect URI https://oauth.pstmn.io/v1/callback, and copy its Client ID.

  2. In Postman, open the Authorization tab of a request or collection, select the type OAuth 2.0, and set:

    SettingValue
    Grant typeAuthorization Code (With PKCE)
    Callback URLhttps://oauth.pstmn.io/v1/callback
    Auth URLhttps://id.service.eu.axinom.net/oauth/authorize
    Access Token URLhttps://id.service.eu.axinom.net/oauth/token
    Client IDThe client ID of the OAuth client
    Client SecretEmpty
    Code Challenge MethodSHA-256
  3. Click Get New Access Token, select the environment in the browser, sign in and grant the permissions.

Postman then sends the access token with each request to the GraphQL endpoints of the environment. Access tokens are valid for 10 minutes; turn on Auto-refresh token to renew them.

Allow Any OAuth Client​

Instead of adding each application, an Environment Administrator can allow any application with a Client ID Metadata Document to connect.

  1. Log in to the Admin Portal and open the environment.
  2. Open the configuration of the Identity Service.
  3. Select Allow Any OAuth Client.

Allow Any OAuth Client in the Admin Portal

Allow Any OAuth Client

An application that connects this way is added to the OAuth clients of the environment once a user grants it permissions, where you can disable it. Disabled clients stay blocked, and users still have to sign in and grant the application its permissions. Pre-registered clients always have to be added.

tip

Allow only the applications that your users need. Adding them one by one keeps a clear list of who can connect, and you can still disable any of them at any time.

See Also​

Was this page helpful?