Class AdminScopeEntitlementOptions

Assembly: redb.Identity.Core.dll

Role-driven entitlement for administrative scopes.

OAuth checks a scope against the client: may this application ask for it? That answer says
nothing about the person signing in, so a console permitted to request identity:manage handed
the master management scope to every account that could log into it. This gate adds the missing half
for user-bound grants: an administrative scope survives only when the user's effective roles carry
it. The client_credentials grant is untouched — it has no user, and the application's
scp:{scope} permission remains its authoritative gate.


What counts as administrative is deliberately narrow and explicit: Identity's own management surface
(identity:*) and SCIM. An operator's own scopes are none of this gate's business unless they
are listed here. identity:account is exempt — it is the self-service scope every signed-in
user is meant to hold.

public sealed class AdminScopeEntitlementOptions

Inheritance

Object→AdminScopeEntitlementOptions

Properties

Enabled

Master switch, on by default. Turning it off restores the pre-gate behaviour, where any account

public bool Enabled { get; set; }

Exempt

Scopes never gated even when a prefix matches. Default: identity:account — self-service

public List<string> Exempt { get; set; }

GatedPrefixes

Scope-name prefixes that require an entitling role. Default: identity:.

public List<string> GatedPrefixes { get; set; }

GatedScopes

Individual scope names that require an entitling role. Default: scim.

public List<string> GatedScopes { get; set; }

Methods

IsGated(string)

True when scope may only be issued to a user whose roles carry it.

public bool IsGated(string scope)