Accenture MDR Quick Start Guide for WSO2 Identity Server(IS) and API Manager (AM) Event collector (Generic TCP)
This quick start guide will help Accenture Security customers configure WSO2 IS and AM to send logs to the Log collection Platform (LCP).
This document includes the following topics:
Supported Versions
A list of supported versions is available in the Accenture MDR Supported Products List document
(Accenture_MDR_Supported_Products_List.xlsx) which can be found at Accenture MDR Portal.
Port Requirements
Table 1-1: Port requirements for LCP communication.
Source | Destination | Port | Description |
WSO2 IS and AM | LCP | 10013 (TCP with Non-TLS) or 10014 (TCP with TLS) | Default port |
Configuring WSO2 IS and AM
Audit logs are enabled in WSO2 Identity Server by default and below is the audit log configuration procedure.
Navigate to Installed path of WSO2IS. The default path is
<IS_HOME>/repository/conf/log4j2.properties
.Update the following in the
log4j2.
and the file will be look like below
# Appender config to AUDIT_LOGFILE
appender.AUDIT_LOGFILE.type = RollingFile
appender.AUDIT_LOGFILE.name = AUDIT_LOGFILE
appender.AUDIT_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/audit.log
appender.AUDIT_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/audit-%d{MM-dd-yyyy}.log
appender.AUDIT_LOGFILE.layout.type = PatternLayout
appender.AUDIT_LOGFILE.layout.pattern = [%d] %5p- %mm%ex%n
appender.AUDIT_LOGFILE.policies.type = Policies
appender.AUDIT_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy
appender.AUDIT_LOGFILE.policies.time.interval = 1
appender.AUDIT_LOGFILE.policies.time.modulate = true
appender.AUDIT_LOGFILE.strategy.type = DefaultRolloverStrategy
appender.AUDIT_LOGFILE.strategy.max = 20
appender.AUDIT_LOGFILE.filter.threshold.type = ThresholdFilter
appender.AUDIT_LOGFILE.filter.threshold.level = INFO
We need to configure the
appender.AUDIT_LOGFILE.layout.pattern
as mentioned in the above file, the meaning of the each directive as follows:
%d = Date
%5p = Log Level
%m%ex%n = Logging Details
Log Level Can be matched from
appender.AUDIT_LOGFILE.filter.threshold.level = INFO
NOTE: All the changes that are made to the log4j2.properties will be applied at run time. You don't need to restart the server after a configuration change in log4j2.properties.
HTTP ACCESS LOG
Configuring access logs for the HTTP servlet transport
Open the
<IS_HOME>/repository/conf/deployment.toml
file.Add the following configuration.
time=%t remoteHostname=%h localPort=%p localIP=%A requestMethod=%m requestURL=%U remoteIP=%a requestProtocol=%H HTTPStatusCode=%s queryString=%q X-Forwarded-For=%{X-Forwarded-For}
Restart the server. According to the configurations, a log file named
http_access.{DATE}.log
is created by default inside the<IS_HOME>/repository/logs
directory. The log is rotated on a daily basis.
Audit logs are enabled by default in WSO2 API Manager (WSO2 API-M) via the following configurations, which are in the
<API-M-HOME>/repository/conf/log4j2.properties
file.
```
appender.AUDIT_LOGFILE.type = RollingFile
appender.AUDIT_LOGFILE.name = AUDIT_LOGFILE
appender.AUDIT_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/audit.log
appender.AUDIT_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/audit-%d{MM-dd-yyyy}.log
appender.AUDIT_LOGFILE.layout.type = PatternLayout
appender.AUDIT_LOGFILE.layout.pattern = [%d] %5p- %mm%ex%n
appender.AUDIT_LOGFILE.policies.type = Policies
appender.AUDIT_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy
appender.AUDIT_LOGFILE.policies.time.interval = 1
appender.AUDIT_LOGFILE.policies.time.modulate = true
appender.AUDIT_LOGFILE.policies.size.type = SizeBasedTriggeringPolicy
appender.AUDIT_LOGFILE.policies.size.size=10MB
appender.AUDIT_LOGFILE.strategy.type = DefaultRolloverStrategy
appender.AUDIT_LOGFILE.strategy.max = 20
appender.AUDIT_LOGFILE.filter.threshold.type = ThresholdFilter
appender.AUDIT_LOGFILE.filter.threshold.level = INFO
```
We need to configure the
appender.AUDIT_LOGFILE.layout.pattern
as mentioned in the above file, the meaning of the each directive as follows:
%d = Date
%5p = Log Level
%m%ex%n = Logging Details
Log Level Can be matched from
appender.AUDIT_LOGFILE.filter.threshold.level = INFO
HTTP ACCESS LOG
Configuring access logs for the HTTP servlet transport
Open the /repository/conf/deployment.toml file.
Add the following configuration.
[http_access_log] useLogger = true
Open /repository/conf/log4j2.properties file:
Add HTTP_ACCESS to the existing "appenders":
Add HTTP_ACCESS to existing "loggers"
Add logger configurations for HTTP_ACCESS log
Add appender configurations for HTTP_ACCESS log
Restart the server.
By Default the access logs related to service/API invocation are disabled for performance reasons on the device. We need to enable it by following configuration:
Open
<API-M_HOME>/conf/log4j2.properties
file and add following configuration forPassThroughAccess
logger.Append
PassThroughAccess
logger name tologgers
configuration, which is a comma-separated list of all active loggers.Create a file named
access-log.properties
in<API-M_HOME>/repository/conf/
location with the following configuration and Please use the below template.You need to configure the access_log_pattern as mentioned above.
Add the following configuration in the
<API-M_HOME>/repository/conf/deployment.toml
file.Restart the server.
NxLog Configuration
To configure Nxlog Agent, follow any one of the below options as per supported OS
Windows NxLog Agent for Non TLS TCP (Windows)
Windows NxLog Agent for Non TLS TCP (Linux RHEL 7 and CentOS 7)
Windows NxLog Agent for TLS TCP (Windows or Linux)
Steps to configure Windows NxLog Agent for Non TLS TCP Log flow on port 10013 - Windows
Download and Install NxLog agent from Download
Go to services.msc and stop the nxlog service
Navigate to folder C:\Program Files (x86)\nxlog\data and delete configcache.dat
For Windows Agent , go to installed location “C:\Program Files (x86)\nxlog\conf”. Rename attached NXLog.conf (Windows) to "nxlog.conf" and copy into this folder
Replace LCP_IP_Address with actual LCP IP address in nxlog.conf
Change Apache access.log file location on line 31
Start the nxlog service from services.msc
NxLog agent logs will be available at location "C:\Program Files (x86)\nxlog\data\nxlog.log"
Log flow should work and you can check on tcpdump using command "tcpdump –AA port 10013"
Steps to configure Windows NxLog Agent for Non TLS TCP Log flow on port 10013 - Linux RHEL 7 and CentOS 7
Download and Install NxLog agent from Download
For Linux Agent, Navigate to installed location “/etc/nxlog.conf”. Rename below attached NXLog.conf(Linux).conf to "nxlog.conf" and copy into this folder
Replace LCP_IP_Address with actual LCP IP address in nxlog.conf
Change Vault vault_audit.log file location on line 24
Now start the nxlog service using below command
NxLog agent logs will be available at location "/var/log/nxlog.log"
Steps to configure Windows NxLog Agent for TLS TCP Log flow on port 10014 (Windows and Linux)
Download and Install NxLog agent from location Download
Stop the nxlog service
Go to services.msc and stop the nxlog service for windows. Navigate to folder C:\Program Files (x86)\nxlog\data and delete configcache.dat
Enter the command systemctl stop nxlog for Linux
Navigate to installed location.
For Windows Agent , go to installed location “C:\Program Files (x86)\nxlog\conf”. Rename attached NXLog.conf (Windows) to "nxlog.conf" and copy into this folder
b. For Linux Agent, Navigate to installed location “/etc/nxlog.conf”. Rename below attached NXLog.conf(TLS).conf to "nxlog.conf" and copy into this folder
Note: Please contact the Accenture MDR onboarding team to obtain the certificate
Copy this certificate on Windows machine where nxlog agent is installed and mentioned this cert path in nxlog.conf against "CAFile" on line number 47.
Copy this certificate on Linux machine where nxlog agent is installed and mentioned this cert path in nxlog.conf against "CAFile" on line number 28.
Replace LCP_IP_Address with actual LCP IP address in nxlog.conf
Change Apache access.log file location on line 32 on Windows
Change Apache access.log file location on line 24 on Linux
Start the nxlog service
Now start the nxlog service from services.msc for windows
Now start the nxlog service using command -systemctl start nxlog for Linux
NxLog agent logs will be available at location "C:\Program Files (x86)\nxlog\data\nxlog.log" for windows
NxLog agent logs will be available at location "/var/log/nxlog.log" for Linux
Log flow should work and you can check on tcpdump using command "tcpdump –AA port 10014"
LCP Configuration Parameters
Table 1-2: The WSO2 IS and AM event collector (Generic TCP-4029) properties to be configured by MDR are shown in the table.
Property | Default Value | Description |
Protocol | TCP | The default protocol for syslog. |
IP Address | WSO2 IS and AM Interface IP address | Logging device IP address mentioned in the Pre-Installation Questionnaire (PIQ). Note: If the device sends logs using multiple interfaces, contact the MDR onboarding team. |
Port Number | TCP/10013 or TCP/10014 | The default port for TCP. Note: The LCP can be configured to listen on a non-standard port, please advise the Accenture MDR onboarding team if this is a requirement. |
Legal Notice
Copyright © 2021 Accenture. All rights reserved.
Accenture, the Accenture Logo, and DeepSight Intelligence are trademarks or registered trademarks of Accenture in the U.S. and other countries. Other names may be trademarks of their respective owners.
The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Accenture and its licensors, if any.
THE DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. ACCENTURE SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE.
The Licensed Software and Documentation are deemed to be commercial computer software as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19 "Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq. "Commercial Computer Software and Commercial Computer Software Documentation," as applicable, and any successor regulations, whether delivered by Accenture as on premises or hosted services. Any use, modification, reproduction release, performance, display or disclosure of the Licensed Software and Documentation by the U.S. Government shall be solely in accordance with the terms of this Agreement.