Skip to Content
Workspace & SettingsDeveloperManage Service Principals

Manage Service Principals

Use this guide when an MCP client or automation needs a workspace-bound machine identity that authenticates with OAuth client credentials and private_key_jwt.

A service principal is a workspace credential. It has a client ID, OAuth metadata, granted MCP scopes, and one or more public keys. The external client keeps the matching private key, signs token requests, receives a short-lived bearer token, and calls the Nitoriq MCP endpoint with that bearer token.

Open Service Principals

Open Settings > Developer > Service Principals.

The page is organized around the service principal list. Each row shows:

  • principal name and client ID
  • status
  • granted scopes
  • last-used time
  • a three-dot actions menu

Use Create Service Principal for new machine identities. Use the row actions menu for setup details, edits, key management, token invalidation, and revoke workflows.

The Service Principals page shows workspace-bound machine identities, their status, granted scopes, last-used time, and row actions.

Create A Service Principal

Choose Create Service Principal to open the creation modal.

The modal asks for:

  • name
  • optional expiration date and time
  • optional description
  • scopes

Use Read preset for read-oriented MCP access. Use Full MCP preset when the client also needs to request save, share, or mutation approval workflows.

Create a service principal by naming it, setting an optional expiration, and choosing the MCP scopes the client can request.

Use Row Actions

Each existing principal has a three-dot actions menu.

The menu includes:

  • View setup
  • Edit principal
  • Manage keys
  • Add public key
  • Invalidate tokens
  • Revoke principal

This keeps the page focused on the credential list while opening setup instructions and forms only when needed.

Use the row actions menu to open setup details, edit the principal, manage keys, add a key, invalidate tokens, or revoke access.

View Setup Details

Choose View setup to open a read-only setup modal.

The setup modal shows the values the external MCP client needs:

  • Client ID
  • Issuer
  • status
  • expiration
  • last-used time
  • scopes
  • token request example
  • MCP bearer usage example

Use the copy controls in this modal when configuring the external client. The modal also includes Manage keys so you can move directly from setup details to public key registration.

Edit Principal Settings

Choose Edit principal from the row actions menu to update the principal.

The edit modal lets admins change:

  • name
  • optional expiration date and time
  • optional description
  • scopes

Changing scopes affects future token grants. If already-issued short-lived tokens need to stop using the previous permissions immediately, use Invalidate tokens after saving.

Manage Public Keys

Choose Manage keys to open the public keys modal.

The public keys modal shows registered keys for the principal. Use it to review key status, last-used time, public key material, and revoke actions.

Add a new key before revoking an old one when you need zero-downtime rotation:

  1. Add the new public key in Nitoriq.
  2. Update the external client to sign with the matching private key and kid.
  3. Confirm the client can request tokens.
  4. Revoke the old public key.
The Public keys modal lists registered signing keys and gives admins a place to add or revoke keys during rotation.

Add A Public Key

Choose Add public key from the row actions menu, or choose Add Public Key from the public keys modal.

The add-key modal asks for:

  • Key ID (kid)
  • key format: JWK or PEM
  • public key material
  • optional key expiration

Nitoriq stores only the public key for verification. The external client keeps the private key and uses it to sign private_key_jwt assertions.

Add a public key by entering a key ID, choosing JWK or PEM, pasting the public key material, and setting an optional expiration.

Invalidate Or Revoke Access

Use Invalidate tokens when the principal should remain active but currently issued bearer tokens should stop working. Clients can request new tokens after invalidation if they still have an active registered key.

Use Revoke principal when the machine identity should no longer be usable. Revoking a principal also invalidates active tokens for that principal.

Use the public key revoke action when only one key should stop verifying token requests while the principal remains available for other keys.

Service principal fields

Client ID

The identifier the client uses when requesting a token.

It connects OAuth token requests to the selected service principal.

Issuer

The issuer value used in the OAuth client assertion flow.

The external client needs it when building the signed token request.

Scopes

The MCP permissions granted to the principal.

Scopes control what the client can read or request from Nitoriq.

Public key

A JWK or PEM public key Nitoriq uses to verify signed assertions.

It must match the private key used by the external client.

Invalidate tokens

Stops already-issued bearer tokens for the principal.

It lets admins cut off active sessions without revoking the principal.

Was this page helpful?