The self-service authorization manager is meant to provide adequate access control in self-service scenarios, i.e., when the resource being accessed, such as an account. must be related or owned by the requesting user. It can be used to control access to the following GraphQL APIs:
self-service
This is the authorization manager that should be used for the Curity Identity Server Self-Service Portal. However, it is not exclusive to the Self-Service Portal, and can be used with other self-service management applications.
The mandatory required-scope configuration setting defines the name of a scope that must be present in the request’s access token. If the access token doesn’t contain the configured scope, any request will be denied. This configuration setting allows restricting the usage of the protected GraphQL APIs to a specific application (e.g. a self-service management portal).
required-scope
The mandatory account-id-claim-name configuration setting defines the name of the access token claim containing the subject’s account ID. The value for this claim is matched against the resources being accessed.
account-id-claim-name
The mutation-throttler configuration setting allows the definition of an optional throttler service that will be applied to all mutations. See Throttler Service more more information on throttling services.
mutation-throttler
In addition to the previous two configuration settings, the self-service authorization manager provides fine-grained control on which GraphQL operations are allowed, always enforcing the self-service restriction. This fine-grained control can be made in one of two alternative configuration models:
Both models can be used with the the Curity Identity Server Self-Service Portal. For simple use cases, the high-level Portal-based model is recommended. The low-level GraphQL-based should be used when fine-grained control on the GraphQL API authorization is needed, such as listing exactly the allowed queries and mutations.
The GraphQL-based configuration model allows defining the authorization policy via the set of allowed GraphQL operations for each of the supported GraphQL APIs. It is possible to individually enable or disable access to any of these APIs.
The GraphQL-based Granted Authorization model is composed by two configuration settings:
allowed-query-operations
grantedAuthorizationsByOwner
grantedAuthorizationsByOwnerAndClient
allowed-mutation-operations
revokeGrantedAuthorizationsByOwner
revokeGrantedAuthorizationsByOwnerAndClient
For instance, implementing a policy where the requesting app can see the user’s granted authorizations but cannot revoke them can be accomplished by:
The GraphQL-based User Management model is composed by the following configuration settings:
allowed-account-update-fields
updateAccountById
validatePasswordAndUpdateAccountById
allowed-account-read-attributes
accountByUserName
accountById
allowed-read-device-categories
allowed-delete-device-categories
The allowed-query-operations contains the list of allowed query operations, selected from the following list.
credentialPolicy
Query operations not in this table are always denied and cannot be configured to be allowed.
The allowed-mutation-operations contains the list of allowed mutation operations, selected from the following list.
deleteLinkFromAccountByAccountId
deleteDeviceFromAccountByAccountId
startVerifyEmailAddress
completeVerifyEmailAddress
updatePrimaryEmailAddress
deleteEmailAddress
startVerifyPhoneNumber
completeVerifyPhoneNumber
updatePrimaryPhoneNumber
deletePhoneNumber
startVerifyPasskey
completeVerifyPasskey
startVerifyTotpDevice
completeVerifyTotpDevice
startOptInMfaSetupByAccountId
completeOptInMfaSetupByAccountId
startOptInMfaResetRecoveryCodesByAccountId
completeOptInMfaResetRecoveryCodesByAccountId
addOptInMfaFactorToAccountByAccountId
deleteOptInMfaFactorFromAccountByAccountId
resetOptInMfaStateByAccountId
Mutation operations not in this table are always denied and cannot be configured to be allowed.
By default, only the following AccountUpdateFields input type field subset can be used with updateAccountById or validatePasswordAndUpdateAccountById: name, displayName, nickName, title, preferredLanguages, profileUrl, locale, timeZone, photos, addresses, website. For instance, trying to mutate the account’s email addresses using updateAccountById or validatePasswordAndUpdateAccountById will fail, even if these mutations are allowed. The design criteria was to allow the update of fields that should be directly controlled by an end user in a self-service scenario. However, it is possible to change this default behavior by explicitly configuring the allowed-account-update-fields setting and defining the allowed fields in the inner field-names setting.
AccountUpdateFields
name
displayName
nickName
title
preferredLanguages
profileUrl
locale
timeZone
photos
addresses
website
field-names
By default, only the following AccountAttributes are visible on an accountByUserName or accountById query: id, externalId, meta, userName, name, displayName, nickName, title, preferredLanguage, userType, profileUrl, locale, timezone, active, emails, phoneNumbers, ims, photos, addresses, groups, entitlements, roles, x509Certificates, devices, linkedAccounts, and mfaOptIn. Again, the design criteria was to allow the reading of attributes that an end user should be allowed to observe in a self-service scenario. It is possible to change this default behavior by explicitly configuring the allowed-account-read-attributes setting and defining the allowed attributes in the inner attribute-names setting. Independently of what is configured, the following attributes are always allowed: id, userName, and active.
AccountAttributes
id
externalId
meta
userName
preferredLanguage
userType
timezone
active
emails
phoneNumbers
ims
groups
entitlements
roles
x509Certificates
devices
linkedAccounts
mfaOptIn
attribute-names
By default, all device categories can be read or deleted, as long as the associated query or mutation are enabled. For instance, if the deleteDeviceFromAccountByAccountId mutation is enabled, then any device associated to the user’s account can be deleted. However, it is possible to have a more fine-grained control by using one of the following settings:
totp
webauthn/passkeys
The Portal-based configuration model allows defining the authorization policy via the set of resources and operations managed by the Self-Service Portal.
The Portal-based Granted Authorization model is composed of the granted-authorization configuration setting and defines the operations allowed on the granted-authorization resource. It is composed of two inner configuration settings:
granted-authorization
read
delete
The Portal-based User Management model is composed of the following resources and operations.
update
address
email
phone-number
create
passkey
password
linked-accounts
opt-in-mfa
setup
reset-recovery-codes
remove-factor
reset