Controls are the mechanism to control application access. Their use is mandatory as they sit at the heart of what Quasr offers. Controls can enforce the following:
Before we start let's tackle some important terminology:
The controls for a tenant can be retrieved via either the Admin UI, the Management API or the Agent API.
https://{tenant_id}.admin.quasr.io/controls.listControls or getControl operation can be used at https://{tenant_id}.api.quasr.io/graphql. See: https://documenter.getpostman.com/view/18129777/UVXgMHEv#7f7e246a-a72c-4bc0-8696-8f3634491a1b.list-controls or get-control tool can be used. See Agent API.Every control has a (sub)type which determines what its value means and how it's processed:
scope) controls represent API access as defined by the OAuth 2.0 standard. Once an access token is issued it holds a scope claim containing the granted scopes. The API inspects these scopes and makes an access decision; hence the meaning and enforcement of a scope happen at the API and not within Quasr. Scopes are just strings, but we recommend a fully-qualified approach (e.g. https://example.com/scopes/xyz).claim) controls represent user data (OpenID Connect claims) that an application wants to receive, e.g. an email address. The data itself is released through the control's attributes, which are added to the identity and/or access token, the same as for scope and legal controls. What sets claim controls apart is that they require consent by default, so users explicitly agree to share their data with the application.legal) controls represent acceptance of legal terms such as service Terms & Conditions, a Privacy Policy, or any other document or statement. The value is either a URL pointing to the text (recommended) or the text itself. Legal controls are processed differently: a consent to a legal control is given to your tenant as a whole rather than to a single application. See Consents.The type also determines the defaults for consent and permission:
| Type | Value | Granted In | Consent Required | Permission Required |
|---|---|---|---|---|
| Scope | OAuth 2.0 scope | Access token (scope claim) | No (configurable) | No (configurable) |
| Claim | Claim name | Identity and/or access token (via attributes) | Yes (configurable) | No (configurable) |
| Legal | URL or text | - | Always | Never |
In your tenant you'll find the following pre-provisioned scope controls:
| Control | Value | Status | Score | Consent Required | Permission Required |
|---|---|---|---|---|---|
| OpenID Connect | openid | ENABLED | 2 | No | No |
| Admin Access | https://api.quasr.io/scopes/admin | ENABLED | 5 | Yes | Yes |
| Account Access | https://api.quasr.io/scopes/account | ENABLED | 5 | Yes | No |
| Offline Access | offline_access | ENABLED | 5 | Yes | No |
| Solid | webid | DISABLED | 2 | No | No |
| Token Introspection | https://api.quasr.io/scopes/oauth2/introspect | DISABLED | 5 | Yes | Yes |
All controls have the following configuration options:
subtype: string) - The type of control: legal, scope or claim. See Types.label: string) - Textual label describing the control to users, e.g. in the Login UI and Account UI. Defaults to Legal, Scope or Claim.status: string) - The current status of the control: ENABLED or DISABLED (default). See Status.value: string) - Required. Its meaning depends on the type: email. The data itself is released through the attributes below.score: number) - The minimum (security) score a user needs in their session to pass the control, i.e. to obtain or consent to it. Controls that provide more sensitive access can have a higher score, so more authentication factors will need to be passed. Defaults to 0. See Score.config.consent_required: boolean) - Whether accounts must give consent to pass this control. In general you want consent to be given, but some scopes are implied and don't need explicit consent. Defaults to false for scopes and true for claims; always true for legal controls.config.permission_required: boolean) - Whether accounts must have been granted a permission to pass this control. If you'd like to give everyone access to a control you can leave this unchecked, so no individual permissions have to be granted. For example, admin scopes require permission. Defaults to false; always false for legal controls. See Permissions.config.attributes.identity: string[]) - The IDs of the attributes to include in the identity token when this control is passed. The account's claims for these attributes are added, keyed by the attribute's value.config.attributes.access: string[]) - The IDs of the attributes to include in the access token when this control is passed.A control can have one of the following statuses:
ENABLED) - The control is active and is presented by the applications it's attached to.DISABLED) - The control is inactive. New controls are disabled by default, so you can configure them and attach them to applications before going live.LOCKED) - The control was locked because a parent (e.g. your tenant) was disabled. It can't be updated, and is restored to its previous status when the parent is enabled again.When a control is disabled, all of its rules, consents and permissions are locked, so it's no longer presented or granted anywhere. When the control is enabled again, they are restored to their previous status.
Controls can be created via either the Admin UI, the Management API or the Agent API.
https://{tenant_id}.admin.quasr.io/controls.createControl operation can be used at https://documenter.getpostman.com/view/18129777/UVXgMHEv#4937ef3d-25fa-4e59-b341-7c2dd6e984ea.create-control tool can be used. See Agent API.Controls can be updated or deleted via either the Admin UI, the Management API or the Agent API.
https://{tenant_id}.admin.quasr.io/controls/{control_id}.updateControl operation can be used at https://documenter.getpostman.com/view/18129777/UVXgMHEv#24771364-6e2a-4f6f-8763-1d81ea06d62c, or the deleteControl operation at https://documenter.getpostman.com/view/18129777/UVXgMHEv#b4ede052-8b94-454d-94fe-c5baf891c22d.update-control or delete-control tool can be used. See Agent API.