Class QServicePrincipalMetaData
java.lang.Object
com.kingsrook.qqq.backend.core.serviceidentity.QServicePrincipalMetaData
- All Implemented Interfaces:
Serializable
A named identity that background work runs as (docs/SERVICE-IDENTITY.md).
Under OAuth2 its authority comes only from the identity provider: the
principal's service account and that account's groups and policy. The
credentials are read from the environment (never from meta-data, the
database or the filesystem): QQQ_SERVICE_{NAME}_USERNAME and
QQQ_SERVICE_{NAME}_SECRET, NAME upper-cased with non-alphanumerics as _.
localPermissions and localSecurityKeyValues apply ONLY to deployments whose
authentication module supports local principals (TABLE_BASED, MOCK, fully
anonymous). OAuth2 and Auth0 ignore them.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhat work done on behalf of a user may do. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for delegatedAccessGetter for descriptiongetLabel()Getter for labelGetter for localPermissionsGetter for localSecurityKeyValuesbooleanGetter for mayActOnBehalfOfUsersgetName()Getter for nameThe id written to audits and logs: service:{name}.Name of the environment variable holding the service account's secret.Name of the environment variable holding the service account's username.voidsetDelegatedAccess(QServicePrincipalMetaData.DelegatedAccess delegatedAccess) Setter for delegatedAccessvoidsetDescription(String description) Setter for descriptionvoidSetter for labelvoidsetLocalPermissions(Set<String> localPermissions) Setter for localPermissionsvoidsetLocalSecurityKeyValues(Map<String, List<Serializable>> localSecurityKeyValues) Setter for localSecurityKeyValuesvoidsetMayActOnBehalfOfUsers(boolean mayActOnBehalfOfUsers) Setter for mayActOnBehalfOfUsersvoidSetter for namewithDelegatedAccess(QServicePrincipalMetaData.DelegatedAccess delegatedAccess) Fluent setter for delegatedAccess (default USER: the user's full access).withDescription(String description) Fluent setter for descriptionFluent setter for labelwithLocalPermissions(String... localPermissions) Fluent setter for localPermissions - session permission names (e.g.withLocalSecurityKeyValue(String keyName, Serializable value) Fluent setter for one local security key value (local deployments only).withMayActOnBehalfOfUsers(boolean mayActOnBehalfOfUsers) Fluent setter for mayActOnBehalfOfUsers - whether this principal may run work on behalf of a user (it must also hold qqq.service.actOnBehalf).Fluent setter for name - lowercase letters, digits and dashes (e.g. scheduler).
-
Constructor Details
-
QServicePrincipalMetaData
public QServicePrincipalMetaData()
-
-
Method Details
-
getPrincipalId
The id written to audits and logs: service:{name}. -
getUsernameEnvironmentVariable
Name of the environment variable holding the service account's username. -
getSecretEnvironmentVariable
Name of the environment variable holding the service account's secret. -
getName
Getter for name -
setName
Setter for name -
withName
Fluent setter for name - lowercase letters, digits and dashes (e.g. scheduler). -
getLabel
Getter for label -
setLabel
Setter for label -
withLabel
Fluent setter for label -
getDescription
Getter for description -
setDescription
Setter for description -
withDescription
Fluent setter for description -
getMayActOnBehalfOfUsers
public boolean getMayActOnBehalfOfUsers()Getter for mayActOnBehalfOfUsers -
setMayActOnBehalfOfUsers
public void setMayActOnBehalfOfUsers(boolean mayActOnBehalfOfUsers) Setter for mayActOnBehalfOfUsers -
withMayActOnBehalfOfUsers
Fluent setter for mayActOnBehalfOfUsers - whether this principal may run work on behalf of a user (it must also hold qqq.service.actOnBehalf). -
getDelegatedAccess
Getter for delegatedAccess -
setDelegatedAccess
Setter for delegatedAccess -
withDelegatedAccess
public QServicePrincipalMetaData withDelegatedAccess(QServicePrincipalMetaData.DelegatedAccess delegatedAccess) Fluent setter for delegatedAccess (default USER: the user's full access). -
getLocalPermissions
-
setLocalPermissions
-
withLocalPermissions
Fluent setter for localPermissions - session permission names (e.g. reports.hasAccess) for local deployments only. -
getLocalSecurityKeyValues
Getter for localSecurityKeyValues -
setLocalSecurityKeyValues
Setter for localSecurityKeyValues -
withLocalSecurityKeyValue
Fluent setter for one local security key value (local deployments only).
-