Remote Event Subscriber (Adminapp)
Description
An event subscriber that executes an HTTP request to forward the event data to a remote endpoint.
May be used by
Properties
Remote URL (
remoteUrl) Description
URL to which the request will be sent. The URL can contain variables (using the ${variableName} notation) that will be replaced by the values provided by the event and the context-data of the managed user. See the "Body Template" property for a list of all available variables. All values are URL-encoded before being inserted into the URL. To ensure a successful connection the URL should include a scheme - usually either 'http' or 'https'.
Attributes
String
Mandatory
Example
https://my.remote.host/api/${event.data.userId}/notify
Body Template (
bodyTemplate) Description
Template for the request body. The following syntax can be used to include data in the template.
- ${contextDataName} for the value of contextDataName in the context-data of the managed user.
- ${event.createdAt,date,format} for the date/time at which the event was created, where "format" is a date pattern like "yyyy-MM-dd HH:mm:ss".
- event.createdAt
- event.data.addedRoles (list of strings)
- event.data.airlock2FAAccountId
- event.data.airlock2FADeviceId
- event.data.activeAuthenticationMethod
- event.data.contextDataChanged.%s.newValue (where "%s" is replaced by the context-data field name).
- event.data.contextDataChanged.%s.oldValue (where "%s" is replaced by the context-data field name).
- event.data.crontoDeviceId
- event.data.delegation.newPermissions (list of strings)
- event.data.delegation.oldPermissions (list of strings)
- event.data.delegation.permissions (list of strings)
- event.data.delegation.realm
- event.data.delegation.role
- event.data.fidoCredentialId
- event.data.lockReason
- event.data.mtanNewPhoneNumber
- event.data.mtanNumberId
- event.data.mtanOldPhoneNumber
- event.data.newEmailAddress
- event.data.newRealm
- event.data.newRoles (list of strings)
- event.data.oldEmailAddress
- event.data.oldRealm
- event.data.oldRoles (list of strings)
- event.data.previousAuthenticationMethod
- event.data.removedRoles (list of strings)
- event.data.userId
- event.id
- event.metadata.requestIp
- event.metadata.userAgent
- event.source.adminId
Attributes
String
Optional
Multi-line-text
Example
{"type": "user-locked", "userId": "${event.data.userId}"}
Value Encoding/Escaping (
valueEncoding) Description
The encoding/escaping to be applied to all string values before they are inserted into the request body template.
Security warning: using no encoding allows unvalidated user input to be sent in the request body.
The JSON encoder also transforms string lists into (escaped) JSON arrays.
Attributes
Enum
Optional
Default value
JSON
HTTP Client (
httpClient) Description
The HTTP client that executes the request.
Attributes
Plugin-Link
Mandatory
Assignable plugins
HTTP Method (
httpMethod) Description
HTTP Method to be used.
Attributes
Enum
Optional
Default value
POST
Content Type (
contentType) Description
Value of the content-type header to be used in the request.
Attributes
String
Optional
Default value
application/json
Suggested values
application/json, application/x-www-form-urlencoded, application/xml, text/plain
Event (
event) Description
The general Adminapp event about which the subscriber should be notified.
Attributes
Plugin-Link
Mandatory
Assignable plugins
Airlock 2FA Device Deleted Authentication Method Changed Context Data Changed Cronto Device Deleted Cronto Letter Ordered Delegation Created Delegation Deleted Delegation Permissions Changed Device Token Deleted Email Address Added Email Address Changed Email Address Deleted FIDO Credential Deleted MTAN Token Deleted MTAN Token Phone Number Changed MTAN Token Registered Password Changed Password Letter Ordered User Created User Deleted User Locked User Realm Changed User Roles Changed User Unlocked
YAML Template (with default values)
type: AdminappRemoteEventSubscriber
id: AdminappRemoteEventSubscriber-xxxxxx
displayName:
comment:
properties:
bodyTemplate:
contentType: application/json
event:
httpClient:
httpMethod: POST
remoteUrl:
valueEncoding: JSON