Profiles¶
A profile is a named set of connection and scope values. One is active at a time, and every command uses the active one unless a flag overrides it.
What a profile holds¶
{
"api_version": "xratu.config/v2",
"profiles": {
"default": {
"endpoint": "http://127.0.0.1:18080",
"token": "***",
"actor_id": "",
"organization_uuid": "",
"workspace_uuid": "",
"organization": "acme",
"workspace": "payments"
}
},
"current_profile": "default"
}
| Key | Holds |
|---|---|
endpoint |
The control-plane address this profile talks to |
token |
The bearer token sent with requests |
actor_id |
The server-resolved actor, stored as local metadata only |
organization |
Default organisation name for commands that take one |
workspace |
Default workspace name for commands that take one |
organization_uuid |
The resolved organisation UUID |
workspace_uuid |
The resolved workspace UUID |
Those seven keys are the complete set a profile accepts.
actor_id is worth understanding precisely: it is stored for your reference
after an identity exchange, and it does not authenticate anything. Effective
request identity always comes from the token.
The document carries api_version of xratu.config/v2 and a current_profile
naming which entry is active.
Names and UUIDs¶
Both forms appear because they serve different layers. You work in names, while
transport and storage use UUIDs, resolved at one boundary before any call is
made. A profile stores both so that a command taking --organization acme does
not re-resolve the UUID every time.
xratu config view hides the UUID fields by default; --show-ids includes
them. See
The name and UUID boundary.
Managing profiles¶
Create or update one, optionally switching to it:
xratu config profile set staging \
--endpoint http://127.0.0.1:18080 \
--organization acme \
--workspace payments \
--use
Switch, rename, delete, and list:
xratu config profile use staging
xratu config profile rename staging staging-eu
xratu config profile delete staging-eu
xratu config get profiles
Inspect what is in force, with or without the internal identifiers:
Set a single key on the active profile without restating the rest:
Clearing a token¶
Passing an empty string to --token clears it, which is the documented way to
drop a stale credential before exchanging a new identity:
This matters because a stale token produces authorisation failures that look like permission problems rather than credential problems.
When to keep several¶
A profile per control plane is the usual arrangement: one for a local or development deployment, one for staging, one for production. Because the endpoint and the token travel together in a profile, switching profiles switches both, which is safer than editing one endpoint in place and leaving the previous token behind.
A second common arrangement is a profile per scope against the same control
plane, where organization and workspace differ and the endpoint does not.
What a profile holds, and who reads it¶
The token sits in plain text in the config document. Treat the file as a secret, and prefer short-lived exchanged tokens over long-lived ones.
Access comes from the token, not the profile. The control plane resolves identity from the token and evaluates permissions on every request.
A profile is read by the CLI only. A data plane node is configured with its
own control_plane.base_url. See
Endpoint resolution.
Related¶
- Configure a CLI profile to create one and verify it.
- Actors for what
actor_idrefers to.