User and operator guide · Developer

Policy Language And Enforcement Model

Status: currentReviewed: 2026-06-16Audience: developers, security engineers, integrators
On this pagePurposePolicy Surface MapOperator Access Policy JSONActivation ReadinessABAC/PBAC YAMLClearance ComparisonTrustAI And Killswitch RulesOPA And RegoChoosing The Right SurfaceValidationImplementation Rules

Purpose

Atlas does not use one monolithic policy language. It uses several policy surfaces that serve different enforcement layers:

  • operator-managed access policy JSON for the gateway and frontend policy workbench

  • ABAC/PBAC YAML for subject, resource, and environmental attribute checks

  • TrustAI and killswitch YAML for trust-score thresholds, anomaly penalties, and session termination behavior

  • optional OPA/Rego policy assets for deployments that wire Atlas decisions into Open Policy Agent

Treat these as related policy dialects with different ownership and runtime scopes. Do not assume that updating one surface updates the others unless the deployment or synchronization path explicitly performs that conversion.

Policy Surface Map

Surface Primary files Format Primary use

Operator access policy

Atlas interface, API gateway, API gateway

JSON over gateway REST

Policy inventory, preview, impact analysis, DDIL-aware operator workflows, and gateway-side access simulations.

ABAC/PBAC policy

config/abac-policies.yaml, Atlas service, Atlas service

YAML

Subject, resource, and environmental authorization decisions using clearance, device posture, location, FPCON, DDIL, and related attributes.

TrustAI and killswitch rules

config/trustai-rules.yaml, models/trustai/edge-default/rules.yaml, Atlas service, Atlas service

YAML

Trust-score thresholding, anomaly penalties, group-specific session actions, grace periods, and edge scoring rule metadata.

OPA policy

docker/opa/policies/trustscore.rego, docker/opa.yml

Rego

Optional external policy-engine integration for deployments that run Open Policy Agent beside Atlas services.

Operator Access Policy JSON

The operator policy workbench uses the JSON model in Atlas interface and the gateway runtime in API gateway. This surface is best for operator-facing policy review, simulation, threshold preview, DDIL status views, and gateway REST workflows.

{
  "name": "Privileged Admin Access",
  "type": "access",
  "status": "active",
  "resources": ["admin/*"],
  "roles": ["administrator"],
  "trustScoreMin": 80,
  "rules": [
    {
      "name": "Require MFA",
      "effect": "allow",
      "priority": 10,
      "conditions": [
        {
          "field": "session.mfaVerified",
          "operator": "equals",
          "value": true
        }
      ]
    }
  ],
  "timeRestrictions": [
    {
      "daysOfWeek": [1, 2, 3, 4, 5],
      "startTime": "08:00",
      "endTime": "18:00",
      "timezone": "UTC"
    }
  ]
}

The supported policy types are:

  • access

  • trust_threshold

  • time_based

  • conditional

  • resource

The supported statuses are:

  • active

  • inactive

  • draft

  • archived

The supported rule effects are allow and deny. The supported condition operators are:

  • equals

  • not_equals

  • greater_than

  • less_than

  • in

  • not_in

  • contains

  • matches

Condition fields are resolved from session state, request context, and policy-test payloads. Common fields include:

Field Meaning

user.id

Atlas user identifier.

user.name, user.username

Username resolved from the session or request context.

user.trustScore

Current TrustAI score when available.

user.role, user.roles

Role list from the Atlas session or request context.

user.department

Department attribute.

user.clearanceLevel

Clearance attribute for operator policy tests.

device.type

Device type context.

device.compliance

Device compliance or posture context.

location.country

Country context.

location.ip

Client IP context.

time.dayOfWeek

Integer weekday from the evaluated timestamp, where Sunday is 0.

time.hour

Integer hour from the evaluated timestamp.

session.mfaVerified

Boolean MFA state.

session.ageMinutes

Session age in minutes.

resource.id, resource.path

Requested resource identifier.

action

Requested action.

Evaluation happens in this order:

  1. Validate and normalize policy type, status, trust-score bounds, rule effects, condition operators, logical operators, and time restrictions.

  2. Match policy scope: resources, roles, trust-score bounds, and time restrictions.

  3. If the scope does not match, deny the simulated decision with a reason.

  4. If the scope matches and no explicit rules are configured, allow the simulated decision with a warning that the decision is scope-only.

  5. Sort explicit rules by ascending numeric priority.

  6. Evaluate conditions with AND or OR; the first condition starts the expression.

  7. A matching deny rule returns a denied result.

  8. A matching allow rule returns an allowed result.

  9. If no rule matches, deny the simulated decision.

The gateway stores operator policy snapshots in the cache key operator:policies:v1 and threshold snapshots in operator:thresholds:v1. Use this surface for operator workflows and previews; do not treat it as a replacement for deployment-owned mission policy approval.

Activation Readiness

Policy status is not a simple display toggle. A policy can be drafted, imported, and simulated, but activation requires readiness evidence:

  • an enforceable policy definition

  • a PDP allow decision for policy.activate

  • the PIP sources needed by the policy, such as identity, session, role/group, resource, trust-score, device, network-location, or trusted-time context

  • the PEP bindings that can enforce it, such as gateway REST handlers, ICAM APIs, the launch broker, session controls, or DDIL edge gateway

  • an impact evidence hash from current policy impact analysis

  • approval evidence

  • rollback instructions

  • repository revision evidence

GET /api/v1/policies/:policyId/activation-readiness returns the checklist and blockers. PATCH /api/v1/policies/:policyId/status accepts activation evidence when setting active=true; the gateway rejects activation when any readiness check is blocked.

ABAC/PBAC YAML

The ABAC engine loads YAML through Atlas service and evaluates it through Atlas service. The default configuration lives in config/abac-policies.yaml.

version: "1.0"
updated: "2026-03-24T00:00:00Z"

policies:
  - name: "Secret Clearance Access"
    description: "Enforce SECRET clearance requirements"
    priority: 90
    subject_rules:
      - attribute: clearance_level
        operator: ">="
        value: "S"
      - attribute: device_posture
        operator: "=="
        value: "Compliant"
    resource_rules:
      - attribute: classification
        operator: "<="
        value: "S"
    environmental_rules:
      - attribute: fpcon
        operator: "in"
        value: ["NORMAL", "ALPHA", "BRAVO"]
    action: ALLOW
    trust_adjustment: 5
    enabled: true

Each policy has:

  • name

  • description

  • priority

  • subject_rules

  • resource_rules

  • environmental_rules

  • action

  • trust_adjustment

  • enabled

The supported rule operators are:

  • ==

  • !=

  • >=

  • ⇐

  • >

  • <

  • in

  • contains

  • within

ABAC policies are sorted by descending priority, so higher numeric priorities evaluate first. Disabled policies are ignored. For one policy to match, every configured subject, resource, and environmental rule in that policy must match. Matching DENY policies are final and stop evaluation. Matching ALLOW policies allow access and add their trust_adjustment, unless a later matching DENY stops the decision. If no enabled policy matches, the ABAC engine denies by default and reports no_matching_policies.

Clearance Comparison

The ABAC comparison operators understand the clearance hierarchy from Atlas service.

Clearance Rank

U

0

C

1

S

2

TS

3

TS/SCI

4

For example, clearance_level >= S matches S, TS, and TS/SCI. Unknown clearance strings compare as rank 0 because they are absent from the hierarchy map, so deployments should normalize clearance inputs before relying on ordered comparisons.

TrustAI And Killswitch Rules

TrustAI and killswitch rules are YAML configuration, but they are not general ABAC policies. They control trust-score thresholds, group-specific responses, anomaly penalties, session termination, and edge scoring metadata.

config/trustai-rules.yaml uses this shape:

rules_version: "1.0"
last_updated: "2026-03-23T00:00:00Z"

defaults:
  trust_threshold: 60
  action: "alert_only"
  check_interval: 30

groups:
  - name: "analysts"
    trust_threshold: 70
    action: "terminate_session"
    grace_period: 0
    require_mfa: true
    attribute_requirements:
      clearance_level: "S"
      device_posture: "Compliant"

anomaly_overrides:
  impossible_travel:
    trust_penalty: -30
    immediate_action: "terminate_session"
    bypass_grace_period: true

The accepted TrustAI actions are terminate_session and alert_only. Trust thresholds must be in the 0 to 100 range. Grace periods must be between 0 and 300 seconds. Anomaly penalties must be 0 or negative and cannot be less than -100.

The killswitch evaluator in Atlas service applies rules in this order:

  1. Resolve user groups from the session or LDAP when configured.

  2. Apply anomaly penalties from anomaly_overrides.

  3. Select the first matching group rule, or fall back to the default rule.

  4. Immediately terminate when the anomaly action is terminate_session.

  5. Otherwise compare the adjusted trust score with the selected threshold.

  6. Apply the group grace period unless the anomaly bypasses grace.

  7. Enforce max_session_duration when configured.

  8. Record violations and evaluation reason for audit and metrics.

models/trustai/edge-default/rules.yaml is the edge scorer rule metadata. It describes graph node kinds, edge relations, temporal windows, numeric normalization, anomaly tags, detector features, operators, and thresholds used by the TrustAI edge scoring bundle. Keep this file aligned with the promoted model bundle and do not edit it as a gateway access policy.

OPA And Rego

Atlas also contains optional Open Policy Agent policy assets in docker/opa/policies/trustscore.rego. That file defines a legacy compatibility package named trustscore.authz. It is intentionally deny-only: a trust score, reputation envelope, role, device claim, location, or caller-supplied header can never create an authorization grant. Protected requests must use the signed Atlas PDP/PEP decision path.

package trustscore.authz

default allow = false

authorization_effect := "NO_IMPLICIT_GRANT"
reason := "atlas_signed_pdp_required"

OPA is a separate deployment integration path. The local demo stack does not automatically make Rego the authoritative gateway policy engine unless the deployment starts and wires the OPA service. The Kubernetes compatibility manifest permits only exact GET /health and GET /ready probe paths; every protected path remains denied. An environment that wants OPA as an external policy-decision point must deploy a separately reviewed adapter that verifies a purpose-bound Atlas decision. It must not restore score-header or scalar-score authorization. The compatibility manifest loads its embedded policy explicitly and disables remote policy-bundle replacement.

Choosing The Right Surface

Need Use

Operator policy inventory, preview, impact analysis, and frontend policy management.

Operator access policy JSON.

Service-side authorization using subject, resource, and environmental attributes.

ABAC/PBAC YAML.

Trust-score thresholds, anomaly penalties, session revocation, or group-specific grace periods.

TrustAI and killswitch YAML.

External policy-decision integration with OPA.

A deployment-owned, separately reviewed adapter to the signed Atlas PDP/PEP decision. The repository compatibility Rego is deny-only.

Mission or enterprise approval of deployed policy.

Deployment-owned evidence outside the repository.

Validation

Use focused tests for the policy surface you are changing:

Internal implementation checks are omitted from this public guide.

When OPA tooling is installed, validate Rego syntax separately:

opa check docker/opa/policies/trustscore.rego

For live operator workflow evidence, use the applicable local-live or onboarding validation scripts from operations:validation-runbook.html and validation:local-live-validation.html. Policy changes should be tied to the gateway response, audit output, and evidence bundle from the same environment.

Implementation Rules

Follow these rules when adding or changing policy behavior:

  1. Keep each policy surface explicit about its owner and runtime boundary.

  2. Preserve deny reasons and warnings; they are part of operator evidence.

  3. Add tests for both allowed and denied paths.

  4. Prefer structured policy parsing over ad hoc string inspection.

  5. Keep generated model bundle rules aligned with the model manifest and readiness report.

  6. Never let a trust score, reputation signal, model output, or client-supplied header create an allow decision by itself.

  7. Do not claim external mission-owner approval, enterprise authorization, ATO, certification, or production deployment acceptance from repository-only evidence.

See security:zero-trust-posture.html for the broader gateway, session, trust-score, and audit enforcement topology.