Class ScopeClause.Builder

java.lang.Object
ai.vectros.types.ScopeClause.Builder
Enclosing class:
ScopeClause

public static final class ScopeClause.Builder extends Object
  • Method Details

    • from

      public ScopeClause.Builder from(ScopeClause other)
    • allowedActions

      public ScopeClause.Builder allowedActions(List<String> allowedActions)

      Verbs this clause grants. Custom verbs are allowed, but a standard catalog is defined: '*' (wildcard), 'read', 'write', 'delete', 'admin:keys', 'admin:profiles', 'logs:r', 'create_own_scoped_key'. Entries may also use the compact 'resource:cruds[:qualifier]' form, e.g. 'documents:cru' or 'records:rs:patient'. The 's' letter in that form grants sensitive-field REVEAL (PHI un-masking) for the given record-type — fail-safe: absent 's', sensitive fields are masked at the response boundary.

    • addAllowedActions

      public ScopeClause.Builder addAllowedActions(String allowedActions)
    • addAllAllowedActions

      public ScopeClause.Builder addAllAllowedActions(List<String> allowedActions)
    • dataScope

      public ScopeClause.Builder dataScope(Optional<Map<String,Map<String,Object>>> dataScope)

      Attribute filters narrowing data this clause applies to. Empty object = applies to ALL data within the tenant. Specific values narrow; include null in an allowed-value list (e.g. {"orgId": ["orgX", null]}) to ALSO grant access to tenant-level records that have no value set for that attribute. Any scopable attribute name is valid as a key.

    • dataScope

      public ScopeClause.Builder dataScope(Map<String,Map<String,Object>> dataScope)
    • build

      public ScopeClause build()
    • additionalProperty

      public ScopeClause.Builder additionalProperty(String key, Object value)
    • additionalProperties

      public ScopeClause.Builder additionalProperties(Map<String,Object> additionalProperties)