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.
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.
Use Row Actions
Each existing principal has a three-dot actions menu.
The menu includes:
View setupEdit principalManage keysAdd public keyInvalidate tokensRevoke principal
This keeps the page focused on the credential list while opening setup instructions and forms only when needed.
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 IDIssuer- 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:
- Add the new public key in Nitoriq.
- Update the external client to sign with the matching private key and
kid. - Confirm the client can request tokens.
- Revoke the old public key.
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:
JWKorPEM - 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.
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?