This feature is only available on Chainloop’s platform paid plans.
Overview
Instance-level API tokens are designed for automation scenarios where you need to:- Provision new organizations programmatically
- Invite members to any organization in the instance
- Configure CAS backends for organizations
- Multi-tenant deployments where organizations need to be created on-demand
- Integration with external provisioning systems (e.g., customer onboarding workflows)
- Infrastructure-as-code approaches to Chainloop configuration
Prerequisites
Before creating instance-level API tokens, ensure you have:- Instance administrator role: Your user account must have the instance admin role configured. See Automatic provisioning of user roles and groups for details on configuring instance administrators.
- Chainloop CLI (EE): The Enterprise Edition CLI with the
admincommand available.
Creating an instance-level API token
Use thechainloop admin api-token create command to generate a token with instance-wide permissions.
Instance-level tokens should be treated as highly sensitive credentials. Store them securely and rotate them regularly.
chainloop admin api-token create also supports an --expiration that can be used to set a custom expiration time for the token (e.g., --expiration 1h).
Check the command line reference for more options.
Using instance-level tokens
Once you have an instance-level API token, you can use it to authenticate CLI commands that operate across the entire instance.Authenticating with the token
The CLI will automatically use any token stored in theCHAINLOOP_TOKEN environment variable.
--token flag to specify the token contents directly:
Creating organizations
With an instance-level token, you can create new organizations programmatically:The
chainloop org create command is also available to users with the instance admin role through interactive authentication. See Restrict organization creation to specific users for more details.Inviting members to organizations
Instance-level tokens can invite members to any organization in the instance. Note that the--org flag is required for this command, since the token has instance-wide permissions:
Configuring CAS backends
You can also create and configure CAS (Content Addressable Storage) backends for any organization:Security considerations
- Principle of least privilege: Only create instance-level tokens when truly needed for cross-organization operations.
- Secure storage: Store tokens in a secrets manager (e.g., HashiCorp Vault, AWS Secrets Manager).
- Token rotation: Implement regular token rotation policies.
- Audit logging: Monitor token usage through Chainloop’s audit logs.
- Expiration: Set appropriate expiration times based on your security requirements.
Related guides
- Automatic provisioning of user roles and groups - Configure instance administrators and automatic user onboarding
- Restrict organization creation to specific users - Control who can create organizations
