Getting Started
Set up your first Prism organization and service account in minutes.
Prerequisites
- A running Prism server (see below for how to start one locally)
- The
prismCLI — download or build from source withcargo build -p prism-cli - The server URL — default is
http://localhost:3000
Starting the server
Run the server with default settings (SQLite database, port 3000):
cargo run -p prism-server
The server stores its database at prism.db in the current directory.
All API endpoints are available under /api/v1/.
Step-by-step setup
-
Create an organization
Every resource in Prism lives inside an organization. Create your first one and set an admin username and password.
prism organizations create \ --name "My Org" \ --admin-username admin \ --admin-password changemeNote the
slugin the response — you will use it to log in. -
Log in as the organization admin
Authenticate with the org slug and admin credentials. The CLI saves the returned JWT for subsequent requests under the
defaultprofile.prism auth login \ --org my-org \ --username admin \ --password changeme -
Create a project
Projects group service accounts, stores, and policies within an organization.
prism projects create --name "my-project" -
Create a service account
Service accounts are machine identities tied to a project.
prism service-accounts create \ --project my-project \ --name deployer -
Create an API key for the service account
API keys allow a service account to authenticate without a signed JWT.
prism service-accounts api-keys create \ --project my-project \ --service-account-id deployer \ --description "CI key"Copy the returned key — it is only shown once.
-
Authenticate as the service account
Exchange the API key for a Prism JWT and verify the identity.
# Log in with the API key (saves a token to the current profile) prism auth sa-login-with-apikey \ --api-key "prism_<your_key>" # Check who you are prism auth caller-identityThe response shows the service account's canonical subject, org, and project.
Next steps
- Cross-Organization Service Account Assumption Let a service account in one org assume an identity in another org.