Skip to manual
gluon

GOL language

Policy

A Policy allows or denies actions for subjects on resources, with row filters, context checks and obligations such as masking.

Model author or developer

Where it goes

Contoso keeps contracts-by-region in security/policies/contracts-by-region.yaml. The loader reads every YAML file under the package root, so folders are a convention you can change. Name it in lowercase kebab-case. The name must be unique among the package's Policy resources.

Fields

The keys under spec. Nested shapes follow PolicySpec in the GOL JSON Schema.

FieldPresenceShape
effectRequiredenum: allow, deny
subjectsRequiredobject
actionsRequiredarray
resourcesRequiredarray
contextOptionalobject
obligationsOptionalarray
priorityOptionalinteger

Syntax and rules

The examples are fragments. Put them in a package next to the resources they reference. A ... stands for a CEL expression you write yourself.

10.3 Policy

GOL · YAML
kind: Policy
metadata: { name: contracts-by-region }
spec:
  effect: allow
  subjects: { anyOf: ["audience:emea-procurement"], where: "subject.clearance >= 2" }
  actions: [discover, read, search, traverse, explain]
  # discover read search traverse explain(lineage) edit execute export propose review publish deploy
  resources:
    - select: { domain: procurement, names: [Contract, ContractEvent] } # or labels, kinds, interface, view
      properties: { include: ["*"], exclude: [negotiatedRate] }
      where: "resource.region in subject.regions" # row level, CEL
  context: # zero trust signals
    channels: [chat, apps, api] # chat | apps | api | mcp | designer
    where: "context.device.managed && context.network.zone != 'public'"
  obligations:
    - mask: { properties: [ownerEmail], method: partial }
    - audit: full
    - justification: { required: "action == 'export'" }
  priority: 100

subject.* attributes come from the directory binding; resource.* are properties; context.* are request signals (channel, device, network, time, purpose). This is the P9 {User.RecordId} placeholder idea, typed and checked.

The ontology-wide console actions (publish, deploy, manage-security, granted by a Role of scope: ontology) are taken away by a deny that names the action in actions, or by a deny with actions: ["*"] that matches every type. A "*" deny on some types only is about those objects and leaves the console alone (2026-10-17, Waseem: a bank package's salary deny for everyone outside HR had locked its security officer out of the console).

Check your package

Shell
gluon validate examples/contoso
gluon test examples/contoso

validate reports each problem with a GLN code and its place in the file. test runs the package's Test resources. See the language guide and the diagnostics.

Contoso's contracts-by-region Policy in the designer's YAML pane, with its validation status.
Contoso's contracts-by-region Policy in the designer's YAML pane, with its validation status.