project_tokens


Description

grant access to projects

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 null

{“what”:“UUID primary key; unique identifier for each token.”,“why”:“Enables referencing a specific token for updates, revocation, or audit.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.119793227+00:00”}

project_id uuid 2147483647 null
projects.id project_tokens_project_id_fkey R

{“what”:“UUID of the project this token grants access to.”,“why”:“Scopes the token to one project; without it a token’s target is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.184909090+00:00”}

name varchar 255 null

{“what”:“Human-readable label for the token, e.g. ‘CI deploy’.”,“why”:“Lets users distinguish multiple tokens for the same project.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.207354625+00:00”}

nb_access int4 10 null

{“what”:“Count of times the token has been used for access.”,“why”:“Tracks usage to detect overuse or enforce quotas.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.236017722+00:00”}

last_access timestamp 29,6 √ null

{“what”:“Timestamp of the most recent use; null if never used.”,“why”:“Shows activity; helps identify stale tokens for cleanup.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.311660915+00:00”}

expire_at timestamp 29,6 √ null

{“what”:“Timestamp when the token automatically becomes invalid; null for no expiry.”,“why”:“Enforces time-limited access; without it tokens never expire.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.353716688+00:00”}

revoked_at timestamp 29,6 √ null

{“what”:“Timestamp when the token was manually revoked; null if active.”,“why”:“Records revocation to stop acceptance; without it revoked tokens remain valid.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.381394612+00:00”}

revoked_by uuid 2147483647 √ null
users.id project_tokens_revoked_by_fkey R

{“what”:“UUID of the user who revoked the token; null if not revoked.”,“why”:“Provides audit trail for who disabled access.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.401430540+00:00”}

created_at timestamp 29,6 null

{“what”:“Timestamp when the token was created.”,“why”:“Establishes token age for lifecycle and audit.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.415255390+00:00”}

created_by uuid 2147483647 null
users.id project_tokens_created_by_fkey R

{“what”:“UUID of the user who created the token.”,“why”:“Attributes token creation for accountability and ownership.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:03:22.453698886+00:00”}

Indexes

Constraint Name Type Sort Column(s)
project_tokens_pkey Primary key Asc id

Relationships