Skip to main content

Policy Assignments

A policy assignment grants a spending policy to callers in a cost object. The policy defines the budget amount, covered models, and priority; the assignment connects it to a cost object and, when needed, identifies the callers. Use Governance → Policy Assignments to create and manage these grants.

A cost object is the name used to group spending, such as a project name or the default ORG. A subject is the caller matched by a rule, such as a user with the finance role. These budgets apply to model calls made with a user's identity token (JWT); API-key calls use role cost limits instead. Each matching user has a separate counter.

note

Policy Assignments is a preview feature. The platform team must enable POLICIES_ENABLED in DIAL Admin and use a DIAL Core version that supports policies. The screen is hidden by default. The global spending mode controls whether budgets are inactive, evaluated in Shadow, or enforced.

How assignments apply​

Create a policy first. The policy and assignment together must specify the subject and cost object exactly once. In DIAL Admin, an assignment gets its cost object from its folder. Add subject rules to the assignment only if the policy does not already provide them. A policy that already specifies both subject and cost object applies on its own and does not need an assignment.

For example, a global policy can define a $25 monthly budget, priority 10, and no subject or cost object. Create an assignment with cost object ORG and the subject rule roles EQUAL finance. When ORG is the configured default, each user with the finance role has their own $25 budget for covered model calls without a project. A call for a different cost object cannot use this assignment.

The assignment has no priority field: it uses the priority of its policy. When multiple budgets match a call, Core tries lower priority numbers first. Changing the policy's priority affects its assignments. See Policy priority.

Where to find Shadow mode​

Shadow is a deployment-wide spending mode, not a control on the Policy Assignments screen. In Shadow mode, Core evaluates budgets and records their usage without rejecting calls on budget grounds. Role cost limits still apply, and Core logs when a budget would have rejected a call. This lets the platform team check the assignments before switching to Enforce. See Spending mode.

note

If you cannot access System Properties, ask a full administrator.

warning

Before saving, read the System Properties warning: an API-managed setting can override file-defined global settings.

To select Shadow mode in DIAL Admin:

  1. Open System Properties from Quick Actions on the DIAL Admin home page or the globe icon in the footer.
  2. Select Spending Limits, then choose Shadow in the Mode selector.

Main screen​

Open Policy Assignments in Governance to browse grants grouped by cost object. Open an assignment from the list to inspect its policy, subject rules, and metadata.

Policy Assignments grid showing assignment names, author, and timestamps

Folders​

Assignments are stored in DIAL Core's platform storage. The platform tree groups assignments by cost object. Select a folder to view its assignments. The folder name is the spending identifier, not a folder of user files: for example, an assignment named finance-grant for cost object ORG is stored under platform/ORG/.

A cost-object folder is derived from its records; specify the cost object when creating an assignment rather than creating a folder separately. Use the folder tree or breadcrumb path to navigate between platform/ and its cost-object folders. Assignments have one cost-object folder level, not an arbitrary folder hierarchy.

Grid columns​

The Policy Assignments grid shows the following columns for the folder being viewed:

ColumnDescription
NameAssignment identifier or cost-object folder name. Open an assignment to review its configuration or a folder to browse its assignments.
AuthorUser recorded as the assignment's author.
Created timeWhen the assignment was created.
Updated timeWhen the assignment was last changed.

Controls​

Use Create above the grid to add a grant. Filter the list beneath the column headings, or select rows to use the bulk action:

ControlDescription
CreateOpens the assignment creation form. Available with write access. See Create.
Column filtersUse the search inputs and filter menus beneath the column headings to narrow the visible rows.
Reset filtersClears the grid filters. Appears when a filter is active.
Row selectionSelect assignment rows or cost-object folders to use bulk Delete. Deleting a selected folder removes all assignments in it. Available with write access. See Delete.

Row actions​

With write access, open the actions menu (⋮) at the end of an assignment row:

ActionDescription
Open in a new tabOpens the assignment configuration in a new browser tab.
DuplicateCreates an assignment using the existing assignment's settings. See Duplicate.
DeleteOpens a deletion confirmation. Deleting the assignment removes its budget from consideration. See Delete.

Create​

Create an assignment to grant an existing policy to callers in a cost object. Unlike creating a policy, this does not define a new budget amount or priority; those come from the selected policy.

Select the policy and cost object​

The first step of the Create Policy Assignment form identifies the grant and its policy. Required indicates whether a value is needed to continue. Policy path replaces Policy only when the policy list cannot be loaded:

FieldRequiredDescription
IDYesUnique identifier within the cost object.
Cost objectYesProject or personal cost-object name. It determines the assignment's folder; if you started in a cost-object folder, the value is fixed to that folder.
PolicyYesSelect a global policy or a project policy in the same cost object. The selector is disabled while its options load. If the list cannot be loaded, use Policy path instead.
Policy pathConditionalEnter the policy path when the policy list cannot be loaded. This is the alternative input for the same required policy reference, not an additional policy.
note

Creation requires write access and an existing policy. Choose a global policy or a project policy in the assignment's cost object, and specify the cost object before continuing.

To enter a new assignment's details:

  1. Open Policy Assignments and click Create.
  2. Enter the details described above.
  3. Click Next to open Subjects.

Create Policy Assignment form showing the ID, cost object, and policy selection

Set the subjects​

The Subjects step identifies the callers for the grant when its policy does not already identify them. It uses the same rule editor as assignment configuration.

note

Define subject rules on the policy or on the assignment, not both. If the policy does not define the subject, add rules to the assignment. If the policy already defines it, leave the assignment's rules empty. Core rejects the assignment if neither supplies a subject.

To complete assignment creation:

  1. Add subject rules if needed. Use Back to return to the details if necessary.
  2. Click Create. The assignment opens in its configuration screen. Complete any optional properties and save them.

Duplicate​

Use Duplicate to reuse an existing grant's policy, subject rules, and optional metadata under a new identifier. Unlike starting a new assignment, the copy retains any expiry from the original.

note

Duplication requires write access. The new ID must be unique in the original assignment's cost-object folder.

warning

A duplicate is a separate budget with its own counter. If both assignments match the same user and model in the same cost object, the user can use both budgets in turn. Check the intended spending allowance before duplicating an assignment. An expiry copied from an already expired assignment can also prevent the new assignment from being created.

To duplicate an assignment:

  1. Open the assignment's actions menu (⋮) and click Duplicate.
  2. Check the proposed ID and change it if necessary. DIAL Admin normally adds -copy; if the original ID already contains copy, change the proposed ID yourself.
  3. Click Duplicate. On success, the copy opens in the same cost-object folder. It keeps the selected policy, subject rules, and optional metadata, including any expiry. Review and update them as needed.

Configuration​

Open an assignment to inspect or change its policy, subject rules, and metadata. Changes in Properties, Subjects, or the JSON editor are staged until you click Save; click Discard to abandon them.

note

Editing requires write access. For a read-only administrator, the form fields and JSON editor are read-only, and mutation controls are unavailable.

The assignment configuration header contains the controls for saving changes, deleting the record, and switching its editing view:

ControlDescription
SaveSaves staged changes. Appears after a change. With JSON Editor switched off, a missing policy, an invalid expiry format, or incomplete subject rules prevent saving.
DiscardRestores the saved assignment, abandoning staged changes in either configuration section or the JSON editor. Appears after a change.
DeleteOpens a deletion confirmation. Available with write access when there are no staged changes and JSON Editor is switched off. See Delete.
JSON EditorSwitches from Properties and Subjects to the record's JSON representation. Available when there are no staged changes. See JSON editor.

Properties​

Properties contains the assignment's policy reference and optional metadata. The cost object is read-only because it is determined by the assignment's folder.

In the Properties form below, Required means a value is needed for a valid assignment, including its derived cost object; it does not apply to displayed metadata. Editable describes platform-stored assignments with write access and JSON Editor switched off. Policy path replaces Policy only when the policy list cannot be loaded:

FieldRequiredEditableDescription
MaintainerNot applicableNoAuthor recorded in the assignment's metadata, when available.
Updated TimeNot applicableNoWhen the assignment was last updated, when available.
Creation TimeNot applicableNoWhen the assignment was created, when available.
Cost objectYesNoThe cost object the assignment belongs to, derived from its folder. For example, an assignment in platform/ORG/ uses ORG.
PolicyYesConditionalThe policy used by this assignment. Changing it changes the budget definition for this grant. The selector offers global policies and policies in this cost object and is disabled while its options load. If the list cannot be loaded, use Policy path instead.
Policy pathConditionalConditionalRequired and editable when the policy list cannot be loaded. Enter the policy path as the alternative input for the same policy reference.
SourceNoYesOptional text identifying where the grant came from, such as ticket or admin. Core stores this as metadata; it does not use it to match callers. This is different from Source in a subject rule.
TicketNoYesOptional reference to the request or ticket for the grant.
Expires atNoYesOptional expiration date and time, in ISO 8601 with an offset, such as 2027-01-01T00:00:00Z. A newly set or changed expiry must be in the future. An expired assignment no longer supplies a budget.
DescriptionNoYesOptional explanation of the grant.
warning

An expired assignment no longer supplies a budget. In Enforce mode, affected model calls can be rejected if no other budget can pay. Check the intended grant duration before setting Expires at.

To update an assignment's properties:

  1. Change the policy or optional metadata as needed. The cost object cannot be changed in this form.
  2. If setting or changing Expires at, enter a future date and time with an offset.
  3. Click Save to apply changes or Discard to abandon them.

Policy assignment Properties showing the selected policy and optional metadata

Subjects​

Subject rules identify the callers covered by the assignment. Multiple rules are combined with OR: a caller needs to match one rule.

In the Subjects rule editor below, Required applies to each rule you add, not to the whole subject list. Editable describes platform-stored assignments with write access and JSON Editor switched off:

FieldRequiredEditableDescription
SourceYesYesWhat to check: roles for DIAL roles, email for the resolved email, or a token claim path such as sub. The source must be available for the rule to match.
FunctionYesYesHow to match the source: EQUAL, CONTAIN, REGEX, TRUE, or FALSE. See Policy subjects for the matching functions.
TargetsConditionalConditionalValues or patterns to match. Required and editable for EQUAL, CONTAIN, and REGEX; not used for TRUE or FALSE. Selecting TRUE or FALSE clears and disables targets; enter targets again if you switch back to a function that uses them.

With write access, use Add rule below the rules or the remove control at the end of an individual rule:

ControlDescription
Add ruleAdds a rule to the subject list. Complete its Source, Function, and any required Targets, then click Save.
Remove ruleRemoves an individual rule from the staged subject list. Click Save to apply the removal.
note

Define subject rules on the policy or on the assignment, not both. If the policy already identifies the subjects, leave the assignment's subject rules empty. If neither supplies a subject, Core rejects the assignment.

To grant a budget to users with the DIAL role finance:

  1. In Subjects, click Add rule.
  2. Set Source to roles, select EQUAL for Function, and add finance to Targets.
  3. Add further rules if needed, then click Save.

The screenshot shows another example: sub with TRUE. It matches callers whose token contains a text value for that source; Targets is disabled because TRUE needs no value. See Policy subjects for the matching functions.

Policy assignment Subjects showing a TRUE rule on the sub claim

JSON editor​

Switch JSON Editor on in the configuration header to review or edit the assignment record as JSON instead of using Properties and Subjects. This view has no format selector. Its changes are staged until you click Save; Discard restores the saved record. For a read-only administrator, the JSON editor is read-only.

Delete​

Delete an assignment when its grant is no longer needed. Removing the assignment removes its budget from consideration, not the policy it references. Use the assignment's actions menu or configuration screen for one grant, or select rows to delete several grants together.

note

Deletion requires write access. Bulk deletion requires at least one selected assignment row or cost-object folder.

warning

Removing or expiring an assignment removes its budget from consideration. In Enforce mode, affected model calls can be rejected if no other budget can pay. Check that the affected callers still have a matching budget that can pay before deleting a grant.

To delete an assignment:

  1. Open Delete in the assignment's actions menu or configuration screen.
  2. Review the assignment in the confirmation, then click Delete to confirm or Cancel to keep it.

Bulk deletion can remove selected assignments or all assignments in selected cost-object folders. Deleting a folder removes every assignment record in it; the folder disappears when it no longer contains records.

warning

Select a cost-object folder only if you intend to delete all of its assignments. Review the folder's contents in the confirmation before deleting them.

To delete selected assignments or cost-object folders:

  1. Select the assignment rows or cost-object folders in the grid.
  2. Click Delete in the selection toolbar.
  3. Review the selected records and any folder contents, then click Delete to confirm or Cancel to keep them.

When the selection includes a folder, the confirmation provides a folder tree for reviewing its contents before deletion.

Further reading​