Class QCredentialScope
java.lang.Object
com.kingsrook.qqq.backend.core.model.session.QCredentialScope
- All Implemented Interfaces:
Serializable,Cloneable
The scope of the credential a session was created from - e.g. an access
token (Authentik app-password / OAuth client) limited to some tables, or to
reading. Set on the QSession by the authentication module's customizer
(e.g. qbit-authentik from its token mapping); enforced by core:
- PermissionsHelper intersects it with the user's live permissions: an
object outside a non-null set is denied (hidden from metadata, refused);
readOnly denies table writes and every process not explicitly listed.
A scope only narrows - revoking the user's permission narrows the token.
- The UI API refuses operations outside operationIds (`METHOD /template`,
e.g. `POST /table/{tableName}/query`).
- The session's client channel is `token:` (audited); the
request cannot relabel it.
Every set is null for "unrestricted". See docs/UI-API-CLIENT-CHANNELS.md.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanWhether a set allows a name (null set: unrestricted).clone()A deep copy.getApps()Getter for appsThe client channel of sessions under this scope: token:. Getter for credentialIdGetter for operationIdsGetter for processesbooleanGetter for readOnlyGetter for reportsGetter for tablesGetter for widgetsFluent setter for apps (null: unrestricted)withCredentialId(String credentialId) Fluent setter for credentialId - the token identifier (for audit).withOperationIds(Set<String> operationIds) Fluent setter for operationIds - UI API operations as `METHOD /template` (null: unrestricted).withProcesses(Set<String> processes) Fluent setter for processes (null: unrestricted, unless readOnly)withReadOnly(boolean readOnly) Fluent setter for readOnly - no table writes, no unlisted processes.withReports(Set<String> reports) Fluent setter for reports (null: unrestricted)withTables(Set<String> tables) Fluent setter for tables (null: unrestricted)withWidgets(Set<String> widgets) Fluent setter for widgets (null: unrestricted)
-
Constructor Details
-
QCredentialScope
public QCredentialScope()
-
-
Method Details
-
allows
-
getClientChannel
The client channel of sessions under this scope: token:. -
clone
-
getCredentialId
Getter for credentialId -
withCredentialId
Fluent setter for credentialId - the token identifier (for audit). -
getReadOnly
public boolean getReadOnly()Getter for readOnly -
withReadOnly
Fluent setter for readOnly - no table writes, no unlisted processes. -
getApps
-
withApps
Fluent setter for apps (null: unrestricted) -
getTables
-
withTables
Fluent setter for tables (null: unrestricted) -
getProcesses
-
withProcesses
Fluent setter for processes (null: unrestricted, unless readOnly) -
getReports
-
withReports
Fluent setter for reports (null: unrestricted) -
getWidgets
-
withWidgets
Fluent setter for widgets (null: unrestricted) -
getOperationIds
-
withOperationIds
Fluent setter for operationIds - UI API operations as `METHOD /template` (null: unrestricted).
-