Skip to content

Policies

There is no standalone Policy object in Alien Giraffe. Access control is not written as a declarative YAML/JSON file that is applied ahead of time — it is expressed by creating a request (optionally from a reusable request template) that names the datasource, the scope of data, the reason, and the risk level, and then having that request approved before it can be activated.

This page exists to show how the five real components combine to produce that model. Think of it as the rulebook shape, not a file you write.

  • Subjects — who is asking. Every request is tied to an authenticated user, resolved through the configured [auth] provider (local, auth0, or workos) and a role (user, admin, super_admin).
  • Resources — what they’re asking for. A request’s scope names one or more registered datasources and, within each, specific datasets (tables, files) and columns, built from the datasource/catalog registry.
  • Constraints — when and for how long. Each request carries a risk_level, a validity_period, and an admin approval step (approve/deny) before activation; once active, it can be revoked, and it expires at valid_until.
  • Channels — how the approved scope is actually reached: the Data Explorer web UI or the request-scoped query API, delivered either over the internal network or through a temporary data tunnel.
  • Context — why. Every request requires a business_justification and description, and can optionally carry external_ticket_id/external_ticket_url to link back to a ticketing system, plus a full audit_logs trail of what happened.

A request (or the template it’s created from) is a single object that names all five dimensions in one payload:

{
"title": "Support request for account review",
"description": "Investigate billing mismatch reported by customer",
"business_justification": "Customer support needs temporary access to investigate a production issue",
"risk_level": "medium",
"external_ticket_id": "SUPPORT-1234",
"external_ticket_url": "https://issues.example.com/SUPPORT-1234",
"scope": [
{
"datasource": "production-postgres",
"datasets": [
{ "target_location": "public.accounts", "target_name": "accounts", "columns": ["id", "email", "status"] }
]
}
]
}
  • scope (built from ContractDatasourceInput/ContractDatasetInput) is the resources dimension.
  • risk_level and the approval it triggers, plus the request’s validity_period/valid_until, are the constraints dimension.
  • business_justification, description, and the optional external_ticket_* fields are the context dimension.
  • The identity that submitted and later approved the request is the subjects dimension.
  • Once activated, the request exposes a channel (Explorer, API, or a temporary tunnel) scoped to exactly that request.

There is no separate step where you author a policy that then matches future requests. Reusable shape comes from request templates (POST /v1/request-templates), which pre-fill the same fields so requesters don’t redefine scope and justification from scratch every time — see Create A Data Access Request From A Template.

  • Enclave requests (the default type) copy the approved scope into an isolated, ephemeral env-enzo runtime and sever the upstream connection before opening it for queries — see Data Enclaves.
  • Proxied requests keep a live, policy-enforcing connection to the datasource instead of copying data, rewriting and filtering every query against the request’s scope in real time — see Constraints and connector/docs/feature-proxied-request-type.md.
  • Subjects — identity, roles, and the auth providers a request’s actor is authenticated through
  • Resources — datasources, the catalog, and how scope is built
  • Constraints — risk level, validity period, approval, and the enclave/proxied session model
  • Channels — how approved access is actually delivered
  • Context — justification, ticket links, and the audit trail