Skip to content

Scope

scopes.<id>

KeyTypeDescriptionRequired
Default
audiencestringThe audience this scope is scoped to. When set, the scope only applies within that audience — clients in other audiences cannot request it. When null, the scope is shared across all audiences. Built-in scopes are always unscoped.NO
null
enabledbooleanEnable the scope.NO
false
templatestringName of a custom scope template to apply. The referenced template provides default values for fields not explicitly set on this scope. Default template names (default_openid, default_admin, default_client, default_custom) cannot be referenced here — they are auto-applied based on scope category.NO
typestringThe scope type. Either consentable or grantable. Custom client scopes are not supported.NO
grantable

templates.scopes.<id>

Scope templates provide default field values that are inherited by scopes. The following default templates are auto-applied based on scope category:

Template nameAuto-applied to
default_openidOpenID Connect scopes
default_customCustom scopes
default_adminAdmin scopes
default_clientClient scopes

Custom templates (any name not in the list above) must be explicitly referenced by a scope via its template field.

When a scope references a custom template, the matching default template is not applied — only the referenced template's values are used as defaults.

Fields set directly on a scope always override the corresponding template value.

KeyTypeDescriptionRequired
Default
<id>stringUnique identifier of the template.YES
audiencestringDefault audience for scopes using this template.NO
enabledbooleanDefault value for the scope's enabled field.NO
typestringDefault scope type (consentable, grantable, or client).NO

Constraints:

  • Default template names (default_openid, default_admin, default_client, default_custom) cannot be referenced explicitly via the template directive — they are auto-applied.

Example:

yaml
templates:
  scopes:
    default_custom:
      enabled: true
      type: grantable

    my-admin-scopes:
      enabled: true
      type: grantable

scopes:
  my-custom-scope:
    # Auto-inherits from templates.scopes.default_custom

  special-admin-scope:
    template: my-admin-scopes
    # Inherits from templates.scopes.my-admin-scopes (default_custom is NOT applied)