Class ScopeClause.Builder
- Enclosing class:
ScopeClause
-
Method Summary
Modifier and TypeMethodDescriptionaddAllAllowedActions(List<String> allowedActions) addAllowedActions(String allowedActions) additionalProperties(Map<String, Object> additionalProperties) additionalProperty(String key, Object value) allowedActions(List<String> allowedActions) Verbs this clause grants, in the compact 'resource:ops[:qualifier]' form the authorizer honors.build()Attribute filters narrowing data this clause applies to, keyed per ownership dimension: 'userId' (the authoring principal) and namespaced scopes 'scope:<namespace>' ('scope:org', 'scope:client', 'scope:group', ...).from(ScopeClause other)
-
Method Details
-
from
-
allowedActions
Verbs this clause grants, in the compact 'resource:ops[:qualifier]' form the authorizer honors. 'ops' are the letters c/r/u/d (create/read/update/delete) plus 's' for sensitive-field REVEAL (PHI un-masking), e.g. 'records:cru', 'documents:r', 'records:rs:patient'. The 's' letter is fail-safe: absent it, sensitive fields are masked at the response boundary. The standard catalog is '*' (wildcard), 'keys:crd' (manage scoped API keys), 'profiles:cru' (manage access profiles), 'app-contexts:cru', 'logs:r', and the literal 'create_own_scoped_key'; you may add custom 'resource:ops' verbs for application-specific resources. Bare verbs like 'read'/'write'/'delete' are NOT grantable — use the resource:ops form. A ':qualifier' segment is honored only where it actually narrows the grant — 'records'/'entities' correlate it for every op; 'documents'/'users' correlate it ONLY for the 's' op (e.g. 'documents:s:invoice' restricts sensitive-field reveal to that type; a qualifier on 'documents:r' or any other resource/op combination is rejected rather than silently ignored).
-
addAllowedActions
-
addAllAllowedActions
-
dataScope
Attribute filters narrowing data this clause applies to, keyed per ownership dimension: 'userId' (the authoring principal) and namespaced scopes 'scope:<namespace>' ('scope:org', 'scope:client', 'scope:group', ...). Empty object = applies to ALL data within the tenant. Multiple keys must ALL match (AND); include null in an allowed-value list (e.g. {"scope:org": ["orgX", null]}) to ALSO grant access to records that have no value in THAT dimension.
-
dataScope
-
build
-
additionalProperty
-
additionalProperties
-