Controls — Rules

Controls

Rules are used to attach controls to clients (applications). A control has no effect on an application until it's attached through a rule, and each rule indicates whether the control is required or optional for that application. Rules provide the following use cases:

  • Enforce legal consent before accessing the application (required legal control).
  • Request legal consent before accessing the application, which the user can skip (optional legal control).
  • Mandate API scopes or claims for the application, which are always part of its tokens (required scope or claim control).
  • Allow API scopes or claims for the application, which are only part of its tokens when requested (optional scope or claim control).

A rule holds a copy of its control's type, value, score and configuration, which is automatically kept in sync when the control changes.

The rules for a tenant can be retrieved via either the Admin UI, the Management API or the Agent API.

  • Admin UI - In the Admin UI the rules of an application are shown in its Controls tab at https://{tenant_id}.admin.quasr.io/accounts/{client_id}/controls. The applications a control is attached to are shown in the control's Clients tab at https://{tenant_id}.admin.quasr.io/controls/{control_id}/clients.
  • Management API - In the Management API the listRules or getRule operation can be used at https://{tenant_id}.api.quasr.io/graphql. See: https://documenter.getpostman.com/view/18129777/UVXgMHEv#48682def-632f-4395-81b3-99d6badaa0d0.
  • Agent API - In the Agent API the list-rules or get-rule tool can be used. See Agent API.

Configuration

Rules have the following configuration options:

  • Control (control: string) - The ID of the control to attach. The control must exist in your tenant and must not be locked.
  • Account (account: string) - The ID of the client (application) to attach the control to. The client must exist in your tenant and must not be locked.
  • Label (label: string) - Textual label for the rule.
  • Status (status: string) - The current status of the rule: ENABLED or DISABLED (default). Only enabled rules are presented and evaluated. See Status.
  • Required (required: boolean) - Whether the control is required for the application. Defaults to false. See Required vs Optional.

Required vs Optional

Whether a control is required or optional determines when it's presented to the user and what happens if it's not passed:

  • Required legal control - The user must accept it to get access. If the control has a zero (0) score, it must be accepted at the start of a signup, otherwise the signup is rejected. If it has a non-zero score, or during a login, it must be accepted once the user has reached its score, prior to redirecting to the application.
  • Optional legal control - Presented at the same moment as a required legal control, but the user can skip it.
  • Required scope or claim control - Always part of the application's tokens. The user must reach its score, give consent (if consent is required) and have a permission (if permission is required) prior to redirecting to the application.
  • Optional scope or claim control - Only part of the application's tokens when it's requested. In that case the same checks apply as for a required control, except that a user who doesn't give consent still gets access, just without the scope or claim.

Allowed Scopes

The scope controls attached to an application make up its allowed OAuth 2.0 scopes. Creating or deleting a rule for a scope control automatically adds the scope to, or removes it from, the application's configuration. See Applications.

Status

A rule can have one of the following statuses:

  • Enabled (ENABLED) - The control is presented and evaluated for the application.
  • Disabled (DISABLED) - The control is ignored for the application. New rules are disabled by default.
  • Locked (LOCKED) - The rule was locked because its control or application was disabled. It can't be updated, and is restored to its previous status when the parent is enabled again.

Setup

Rules can be created via either the Admin UI, the Management API or the Agent API.

  1. 1One or more controls to attach, each as a rule
  2. 2Off for an optional rule: only part of the tokens when requested, or skippable for a legal control

Rules can be updated or deleted via either the Admin UI, the Management API or the Agent API.

  1. 1Optional: asked at signup, but the user can skip it
  2. 2Required: the user must accept it to sign up

The other way round: the Applications tab of a control lists its rules

2026.11.22 | © Copyright 2026 Quasr BV