Components
The model has four moving parts:- Trace source binding. The ClickHouse table LightShip reads plus the five required structural columns:
trace_id,timestamp,span_id,parent_span_id, andname. - Marked fields. Columns and map keys that policies and filters may reference. Each field is marked as
filterable,policy, or both, and carries alogical_typeofstring,string_array,boolean, ornumber. - User attributes. Keys such as
tenant_idanduser_idthat become available to policies when they are added to a user. - Roles. Named CEL expressions built from marked fields and user attributes. A user holds one or more roles.
How authorization runs
On every request, LightShip resolves the caller’s roles and attributes, compiles their policies, and applies them to the trace scan. Roles OR together, so a user with both astandard and a restricted role receives traces matching either policy.
Policy cache age is bounded by
LIGHTSHIP_MODEL_TTL (default 1m) for new authorization decisions. If an expired cache cannot refresh, requests fail closed with 503. A writer discards its previous model even if its immediate refresh fails. Already-authorized queries are not cancelled. Role assignments are read on every request.Fail-closed guarantees
LightShip refuses to serve traces when the access model is incomplete or inconsistent:- Missing configuration returns no rows.
- No applicable policy returns no rows.
- An unreachable trace source returns an error.
- Invalid policies are rejected before storage.
- Removing a field a stored policy still references is rejected.
Related topics
Policies
Learn the CEL expression language, supported operators, and worked examples.
Configure roles
Create and edit roles through the Setup UI or REST API.