This documentation is for WSO2 Identity Server 5.2.0 . View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

You can register external PEP Endpoints in the WSO2 Identity Server. The Identity Server sends cache invalidation notifications (JSON, XML, EMAIL) to the pre-configured external PEP endpoints. Basic authentication will be used as the authentication mechanism.

This topic describes how to enable the XACML engine to send invalidation notifications to these external PEP endpoints when there is a policy update or a change in user roles, permissions or attributes. This also clears the internal cache when user roles, permissions or attributes are updated.

  1. If you are using EMAIL as notification, configure email transport details using the axis2.xml file. The following steps provide instructions on how to do this. 
    1. Navigate to the <IS_HOME>/repository/conf/axis2/axis2.xml file.
    2. Configure the relevant attributes according to your email account information. The following is a sample configuration.

      <transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
      	<parameter name="mail.smtp.from">[email protected]</parameter>
      	<parameter name="mail.smtp.user">wso2demomail</parameter>
      	<parameter name="mail.smtp.password">mailpassword</parameter>
      	<parameter name=""></parameter>	 
      	<parameter name="mail.smtp.port">587</parameter>
      	<parameter name="mail.smtp.starttls.enable">true</parameter>
      	<parameter name="mail.smtp.auth">true</parameter>
  2. Do the following to send notifications to external endpoints when there is a policy change.
    1. Navigate to the <IS_HOME>/repository/conf/identity/ file.
    2. Make the following change.


      Here the trailing number that is added after "PAP.Status.Data.Handler" should be the minimum positive number you can add for a new "PAP.Status.Data.Handler".

  3. Additionally, add the following to the file.

    #org.wso2.carbon.identity.entitlement.EntitlementNotificationExtension.3=emailAddress,[email protected]
    #org.wso2.carbon.identity.entitlement.EntitlementNotificationExtension.8=emailSubject,Policy Notification
    #org.wso2.carbon.identity.entitlement.EntitlementNotificationExtension.9=roleName, admin

    The following table lists out and describes the above attributes.

    notificationTypeThis is the type of the notification supported by the module. This can be EMAIL, XML or JSON.
    pdpNotificationThis attribute is for PDP notifications. This specifies whether a notification must be sent for PDP policy store changes. By default this is enabled, but if you want to disable the policy configurations, you can disable it by configuring this property
    pdpNotificationActionThis attribute is for PDP notification actions. This enables notifications for specified actions. There are four actions and you can define multiple actions using the semicolon. For example, ENABLE;DISABLE;UPDATE;DELETE. By default notifications are sent to all type of changes, but if you want to limit it, you can configure this attribute.
    papNotificationThis identifies whether a notification must be sent for PAP policy store changes. By default this is disabled and you can enable it by configuring this property.
    targetUrlThe target URL is written as "target url;username;password". The ";" symbol is used as the separator.
    roleNameThis attribute represents the user group. If the EMAIL notification type is used and Target URL is not defined, you can define the user group that the email must be sent to using this attribute. For example, you can use this if you need to send the email to all the members of the Administrator group.
    ignoreServerVerificationThis is related to SSL verification configuration. This attribute is responsible for the decision on whether to ignore or validate SSL verification for the endpoint URL, if XML and JSON are the notification types used.
    emailTemplateFileIf the EMAIL notification is used, the subject, body and footer of the email must be defined. These can be uploaded from a separate file. There is a default format for the email that can be overridden. If you want to override it, you can configure the location to a template file using this. You need to configure the absolute path for the template file. Sample template file can be found here
    emailSubjectThis is the subject of the email. This is necessary if you wish to change the default email support used by the module.
    emailAddressThe email address that you want to send the email to.
  4. In order to send notifications to external endpoints when a user attribute is updated, create a configuration file named in the <IS_HOME>/repository/conf/security/ directory and add the following configurations to it. A sample configuration file is included in the resource folder.

    		# Specify the endpoint name the message needs to be posted in.
    		# Specify the notification type which is either XML or JSON
    		# Specify whether email notifications are also needed.
    		# Specify the group user name/receivers user name.
    		# Specify the group to receive the notification emails
    		[email protected]
  5. It is recommended to use https to communicate with external endpoints. In that case, import your certificates to client-truststore.jks in the Identity Server. You can use the Java keytool command to do it. The following is a sample command. Note that the default password for client-truststore.jks is "wso2carbon".

    keytool -import -alias wso2 -file <path_to_your_certificate_file>/yourCertificate.crt -keystore <CARBON_SERVER>/repository/resources/security/client-truststore.jks
  • No labels