← Back to plugin index

Remote Event Subscriber (Adminapp)

Description
An event subscriber that executes an HTTP request to forward the event data to a remote endpoint.
Type name
AdminappRemoteEventSubscriber
Class
com.airlock.iam.admin.application.configuration.event.AdminappRemoteEventSubscriberConfig
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".
Depending on the event and on the conditions in which the event originated, the following variables may also be available:
  • 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
Variables that are not defined are replaced by an empty string. The Airlock IAM documentation provides further information about the availability of specific variables. All values are encoded/escaped before being inserted into the request body.
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
YAML Template (with default values)

type: AdminappRemoteEventSubscriber
id: AdminappRemoteEventSubscriber-xxxxxx
displayName: 
comment: 
properties:
  bodyTemplate:
  contentType: application/json
  event:
  httpClient:
  httpMethod: POST
  remoteUrl:
  valueEncoding: JSON