Service Users are dedicated programmatic identities designed for secure machine-to-machine access. They bypass the standard JWT session flow in favor of long-lived, high-entropy API keys.
Administrators can provision and rotate keys directly from the terminal.
Create Service User:
pangolin-admin create-service-user \
--name "etl-pipeline" \
--role "TenantUser"Note
Ensure you record the Service User ID (UUID) from the output. If the CLI does not display the ID, use the Management UI or the API directly to retrieve it after creation.
Rotate API Key:
pangolin-admin rotate-service-user-key --id <service-user-uuid>- Navigate to Identity -> Service Users.
- Click Create Service User, enter a name and expiration date.
- Important: The API key will be displayed in a modal. Copy it immediately, as it will never be shown again.
- Key Rotation: To rotate a key, click the Rotate Key icon. A new key will be generated and displayed once; the old key is immediately invalidated.
- To deactivate a user, use the delete action or manage their active status (roadmap feature).
Service users authenticate by sending the X-API-Key header with every request.
curl -H "X-API-Key: pgl_YOUR_SECRET_KEY" \
https://your-pangolin-api.com/api/v1/catalogsPyIceberg supports standard OAuth2, which is the recommended way to use Service Users.
from pyiceberg.catalog import load_catalog
catalog = load_catalog(
"pangolin",
**{
"uri": "http://localhost:8080/v1/default/",
"credential": "<service_user_uuid>:<api_key>",
"oauth2-server-uri": "http://localhost:8080/v1/default/v1/oauth/tokens",
"scope": "catalog",
"type": "rest",
}
)For simple HTTP clients that don't support OAuth2, you can use the header:
import requests
headers = {"X-API-Key": "pgl_YOUR_SECRET_KEY"}
response = requests.get("https://api.pangolin.io/api/v1/catalogs", headers=headers)- Never Share Keys: Treat API keys exactly like root passwords.
- Rotation: Rotate keys at least every 90 days. If a key is potentially exposed, rotate it immediately.
- Least Privilege: Only grant
TenantAdminto service users that specifically need to manage other users or infrastructure. Most pipelines only needTenantUser. - Monitor Usage: Check the
last_usedtimestamp in the UI to identify and prune stale identities.