Projects and tokens
The life of a server project: registration, named tokens, and in the end its deletion.
Projects and tokens#
Whoever registers a project on the server is its admin and hands out named tokens (one per person or CI job). The server coordinates (ids, claims, Team AI); the tickets live in the repo's store, or with store: server on the server (A store on the server).
$ tkt project register https://tkt.ideathon.me --name Payments
- Roles:
admin⊇write⊇read;--llmis a separate grant. The last valid admin token cannot be revoked, demoted or given an expiry (ERR_LAST_ADMIN). - A token (
atk_…) is shown once: share it only over a secure channel, never in a ticket, a commit, a chat or an argument (tkt doctorreports one in a store file:TOKEN_IN_STORE). tkt loginreads the token you were given from stdin or a hidden prompt and stores it;AITODO_TOKENoverrides the file (CI).ERR_AUTH_REQUIRED(401): no or unknown token;ERR_AUTH_FORBIDDEN(403): expired, revoked, role too low, or another project's.
Details5 items
tkt project register <url> --name N --as alice --force:--asdefaults to$USER(USERNAMEon Windows; required without both). It writes the pin (.aitodo/server.yaml,{url, project}, no secret: commit it) and the admin token to the credentials file (Server pin and credentials). An existing pin needs--force(elseERR_ID_DUPLICATE).tkt token create ci --role write --llm --expires 90dprints just the token (pipeable);--json:{name, role, llm, created, expires, lastUsed, revoked, token}.--expires 2027-01-31: through that day (UTC).tkt token list --json: never a token value.tkt token update ci --role read --no-llm --no-expires.tkt token revoke ci(name stays reserved).tkt logoutdrops the stored token.tkt logintakes the server from the pin, in astore: serverfolder from its.aitodo.yaml, elsetkt login <url> --project <id>; it checks the token (/whoami) and printsSaved in <path> (from …).- All admin tokens lost: the operator runs
tkt operator admin-token(HTTP) ortkt server admin-token(on the host). - HTTP client: 30 s timeout, system TLS trust plus
AITODO_CA_BUNDLE; plainhttp://only to localhost. Header:Authorization: Bearer atk_…. It follows a redirect only for a read (GET) and only to the same scheme, host and port, with the token; any other redirect (another host or port, https to http, a redirected write) stops withERR_COORDINATOR_UNREACHABLEnaming only the target's origin, and the token goes nowhere. Then set the server URL to the address the server really answers at. The credentials file:servers: {<url>: {projects: {<id>: {name, token}}}}(URL: scheme + host lower case, no trailing slash).
Deleting a project#
An admin deletes a project and everything the server keeps for it (tokens, LLM usage and caps, id counters, claim leases) in one step: tkt project delete --confirm Payments. The tickets in the store are never touched, and the id is never reused. Without a matching --confirm it asks you to type the name; with no terminal: ERR_CONFIRM_REQUIRED, nothing deleted.
Details1 items
Then it removes your stored token and the .aitodo/server.yaml that points at the project: commit that, the store works locally again. Admin tokens lost: the operator runs tkt operator project-delete (HTTP) or tkt server project-delete (on the host).
Commands on this page#
tkt project registerRegister a project on the server; you become its admin→
tkt token createCreate a named token and print it once→
tkt token listThe project's tokens: name, role, llm, created, expires, last used: never the token→
tkt token updateChange a token's role, LLM grant or expiry→
tkt token revokeRevoke a token→
tkt loginStore a token your project admin gave you→
tkt logoutForget the stored token of this project (the server keeps it: ask the admin to revoke)→
tkt project deleteDelete the project on the server (admin): its tokens, LLM usage and caps, id counters and claim leases→