Thursday 31 March 2016

Configuring ISIM as a Log Source For Qradar

Simple steps on Configuring ISIM as a Log Source for Qradar:

 For configuring ISIM as a Log Source we have to create two log sources:
1. For Connecting to ISIM DB (All Transactions performed on ISIM)
2. For Getting the ISIM DB Audit Logs(Transactions Performed on the ISIM DB).


ISIM Based Event Configuration:

Network Related configurations:

1. Make sure the DB2 port is open to the Qradar Machine


Configurations on Qradar:

1. Create a Log source for ISIM in Qradar.
2. Provide the below values for the Log source.
Log source Name: (Provide a Name for the Log source)
Log Source Description: (Provide a Description of the Log source)
Log souce Type: Select the option IBM Security Identity Manager.
Protocol Type: IBM Security identity manager JDBC
Log Source Identifier: (Name of DB)@(ip/Hostname of the DB machine)
DataBase Type : DB2
Database Name : (Name of the ISIM DB)
IP or Hostname: (IP/Hostname of the Database)
Port : (Port of DB2)
User name : (Provide the user name for connecting to Qradar)
Password : (Provide the password for the Username used to connect to DB)
Confirm Password : (Provide the password for the Username used to connect to DB)
Table Name : ISIMDB.AUDIT_EVENT
Select List : *
Compare Field : TIMESTAMP
Start Date: (Provide a Start date for the Qradar to read the events from DB, format is yyyy-mm-dd hh:mm)
Polling Interval : 30
EPS Throttle : 1000
Enabled : Check the box
Credibility : 5
Target Event Collector : (Select the first option in the dropdown, Mostly only one option is available)
Coaliscing Events : Check th box
Store Event Payload : Check the box
Log Source Extension : Leave as it is
Extension Use Condition : Leave as it is

3. Save the Log source.

Configuring ISIM Audit Events in Qradar:

Network Based Configurations:
1. Make sure port 22 for ftp/SFTP is open for Qradar to fetch the audit log file.

ISIM DB Based Configurations:

1. Login to DB2 server and switch user to DB instance owner
2. Run below command to configure a path for audit logs
  db2audit configure datapath /data/itimdb/sqllib/security/auditdata/
3. Connect to DB
   db2 connect to isimdb
4. Create audit policy on the database with category ‘execute’ to pick SQL statements executed
   db2 create audit policy db_policy categories execute with data status both error type audit
db2 audit database using policy db_policy
 db2 commit
5. Restart db2audit utility
  db2audit stop
 db2audit start
6. Execute below command to flush out audit log
 db2audit flush
7. Extract the audit logs
db2audit archive database itimdb
8. Extract the logs to a readable format
 db2audit extract from files <filename generated in step 7>
9. Create a Cronjob for the steps from 6 to 8 to be executed every one hour for the audit log to be generated.

Qradar side configurations:

1. Log in to QRadar.
2. Click the Admin tab.
3. Click the Log Sources icon.
4. Click Add.
5. In the Log Source Name field, type a name for the log source.
6. In the Log Source Description field, type a description for the log source.
7. From the Log Source Type list, select IBM DB2.
8. From the Protocol Configuration list, select Log File.
9. Provide the values as below:
Log Source Identifier : (IP/ Hostname of the DB2 Machine)
Service Type : FTP/SCP
Remote IP or Hostname : (IP/Hostname of DB2 machine)
Remote Port : 22
Remote User : Username of the user to connect to the db2 machine
Remote Password : Password of the user for connecting to db2 machine
Confirm Password : Password of the user for connecting to db2 machine
SSH Key file : (Only if you are using sftp if not leave it blank)
Remote Directory : Path of the directory in db2 machine where the log file is present
Recursive : (Only if you are using sftp if not leave it blank)
FTP File Pattern : .*.log
FTP Transfer Mode : ASCII
Start time : 12:10
Recurrence : 1H
Run On Save : check the box
EPS Throttle : 100
Processor : From the list, select None.
Ignore Previously Processed File(s): Select this check box
Change Local Directory: Do not select the check box
Event Generator : From the Event Generator list, select LineByLine.

10. Click Save.

Wednesday 16 March 2016

TFIM Client certificate renewal

    To avoid criticalities during this activity, it’s advisable to take backups of the keystore.

Take the backup of both key.p12 and trust.p12 from the location as mentioned below :
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/*******Cell01
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/*******Cell01/nodes/*******Node01
Get the required certificate(signaturevalidation and encryption certs) for renewal in .PEM format (Only this format).  Certificate can be copied from Metadata file provided by partner. Copy the certificate in the notepad and add Begin and end certificate tags in Beginning and End and save the file in .cer format.
Import both the certs in DefaultTrustedKeyStore in TFIM (testonly is the password for DefaultTrustedKeyStore).
Load the Configuration in TFIM.
Choose the required partner and click on properties.
Under Signature Validation key, choose keystore >DefaultTrustedKeyStore, provide password and select the signature_validation.crt.
Under Encryption Key Identifier, choose keystore >DefaultTrustedKeyStore, provide password and select the encryption.crt.
No changes required under Server Validation Certificate
Load the Configuration.
Validate the changes
Check the partner status(should be enabled) before testing the federation.
Restart WAS if federation fails to work.(Not Mandatory)
 
  Thanks,
  Nandavaram Pavan Kumar



Deleting TAM/ISAM Users from registry

Sometimes runtime configuration(policy Server in Appliance) fails (or partially configured) in TAM/ISAM due to some issues.

When the users tries to reconfigure it again, ISAM throws an error message its already configured but it will not be in running state.

So its better to delete the default user entries created by TAM/ISAM before reconfiguring it.

Below are the commands to delete the default ISAM users(created during the runtime configuration) from the registry before reconfiguring it.

cd /opt/ibm/ldap/V6.3/bin
./idsldapdelete -D cn=root -w <password> cn=Subdomains,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Resources,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=ResourceGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Default,cn=Policies,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=SecurityGroup,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=SecurityGroup,cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=ivacld-servers,cn=SecurityGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=ivacld-servers,cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=remote-acl-users,cn=SecurityGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=remote-acl-users,cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=SecurityMaster,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Policy,cn=Policies,principalName=sec_master,cn=Users,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Policy,cn=Policies,principalName=ivmgrd/master,cn=Users,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Policies,principalName=sec_master,cn=Users,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Policies,principalName=ivmgrd/master,cn=Users,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=ivmgrd-servers,cn=SecurityGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=ivmgrd-servers,cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=iv-admin,cn=SecurityGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=iv-admin,cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=secmgrd-servers,cn=SecurityGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=secmgrd-servers,cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=webseal-servers,cn=SecurityGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=webseal-servers,cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=webseal-mpa-servers,cn=SecurityGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=webseal-mpa-servers,cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=ivmgrd/master,cn=SecurityDaemons,secAuthority=Default
./idsldapdelete -D cn=root -w <password> principalName=ivmgrd/master,cn=Users,secAuthority=Default
./idsldapdelete -D cn=root -w <password> principalName=sec_master,cn=Users,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Users,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Groups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=SecurityGroups,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=Policies,secAuthority=Default
./idsldapdelete -D cn=root -w <password> cn=SecurityDaemons,secAuthority=Default
./idsldapdelete -D cn=root -w <password> secAuthority=Default


./idsldapsearch -D cn=root -w <password> -b 'secAuthority=Default' -s sub '(objectclass=*)'


Thanks,
Nandavaram Pavan Kumar

Simple Steps to customize TFIM (Software version) error pages

It is essential to customize the TFIM error pages after configuring Federation to display custom error pages to end user

Below are the simple steps to customize it.

Customize required TFIM error pages as per the requirement (Deafult location of the Webpages: /opt/IBM/FIM/pages/C/saml20) and publish the pages from WAS console to take into effect.


Steps to publish

Log into the WAS Application Server Console
Select the Tivoli Federated Identity Manager section
Select the Domain Management
Click the Publish pages button
Click the “Load Configuration Domains “ button.

Now you should see the customized error page

Thanks,
Nandavaram Pavan Kumar

Tuesday 15 March 2016

Qradar Integration with IBM SAM for E-Bussiness(VA)

Lately, I been working on the IBM products like ISIG and Qradar and trying to get them integrated with the existing IBM Products like ISIM and ISAM.
ISIG/IGI seems to be a good tool to look upto in future with a strong Workflow system and application integration of ISIM with the Identity/Access Governance features of ISIG it has the capability to become a strong contender for other governance products....
Ok,... Now Leaving all those aside lets look into the Qradar tool..
Qradar is a powerfull tool known across in the IAM World as one of the Strong Monitoring Tools provided by IBM.
So with the IBM trying to promote Virtual Appliance in its IAM World. I thought of trying to integrate Qradar with ISAM for monitoring and naturally with my lack on knowledge on monitoring tools, i came across a few issues while configuring and did not find much help in internet as well...
Except for a great reference from Shane Wheeden(He is like the Hercules in IAM World for IBM Technologies, I mean this guy is everywhere and seems to have done EVERYTHING, "Cheers Mate and may you live longggggggggggg")...

ok So moving on.....

In this integration ISAM VA is configured to send the logs to the Qradar machine on IP 514 and Qradar picks up this logs and provides the event based on the logs.

So if the logs sre sent to Qradar then will the VA do not contain any logs?....
No, The logs will be created in ISAM VA also, The VA will create a seperate instance on logs on the VA apart from the logs being sent to the Qradar and deleting or modifying of these logs do not affect the Qradar instance of log files...

Qradar will read the logs and create the events according to the configuration or the log source extension and based on that it will decode on how to display it in the log events....

Blah blah blah.... and so on and on... Ahhhhhhhh.... Too much explanation.....

Steps to configure ISAM(VA) as a log source with Qradar:

Network Based Configurations:
1. Make sure you have 514 port open from ISAM(VA) to the Qradar(Trust me everyone forgets this).

Qradar Side Configurations:
1. Create a Log Source Extension with the below values.
Name: (Provide a name of your choice)
Description: (Anything that explains why you have this extension created)
Use Condition: Parsing Enhancement
Log Source Type: IBM Tivoli access manager for e-bussiness

2. Now in the Extension Document make sure you type everything that is given below without missing a word or a line.

<?xml version="1.0" encoding="UTF-8"?>
<device-extension xmlns="event_parsing/device_extension">

<pattern id="allEventNames" xmlns=""><![CDATA[(.*)]]></pattern>

<pattern id="RequestLogEventPattern" xmlns=""><![CDATA[<114>1 (.*)]]></pattern>

<pattern id="TimeJan" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-01-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeFeb" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-02-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeMar" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-03-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeApr" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-04-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeMay" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-05-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeJun" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-06-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeJul" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-07-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeAug" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-08-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeSep" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-09-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeOct" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-10-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeNov" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-11-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>
<pattern id="TimeDec" xmlns=""><![CDATA[TS:([0-9][0-9][0-9][0-9])-12-([0-9][0-9])T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])]]></pattern>

<pattern id="UsernamePattern" xmlns=""><![CDATA[ U:(.*) AL:]]></pattern>

<match-group order="1" description="IDaaS Request Log Events" xmlns="">

<matcher field="DeviceTime" order="1" pattern-id="TimeJan" capture-group="Jan \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="2" pattern-id="TimeFeb" capture-group="Feb \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="3" pattern-id="TimeMar" capture-group="Mar \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="4" pattern-id="TimeApr" capture-group="Apr \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="5" pattern-id="TimeMay" capture-group="May \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="6" pattern-id="TimeJun" capture-group="Jun \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="7" pattern-id="TimeJul" capture-group="Jul \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="8" pattern-id="TimeAug" capture-group="Aug \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="9" pattern-id="TimeSep" capture-group="Sep \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="10" pattern-id="TimeOct" capture-group="Oct \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="11" pattern-id="TimeNov" capture-group="Nov \2 \3:\4:\5" enable-substitutions="true"/>
<matcher field="DeviceTime" order="12" pattern-id="TimeDec" capture-group="Dec \2 \3:\4:\5" enable-substitutions="true"/>

<matcher field="EventName" order="1" pattern-id="RequestLogEventPattern" capture-group="Miscellaneous Webseal-Instance Event" enable-substitutions="true" />
<matcher field="UserName" order="1" pattern-id="UsernamePattern" capture-group="1"/>

<event-match-single event-name="Miscellaneous Webseal-Instance Event" device-event-category="Information" send-identity="OverrideAndNeverSend" />

</match-group>

</device-extension>

3. save or submit and then go to the log Souces now..
4. Create a log source with the below values.
Name: (Anything you prefer)
Description: (Anything that explains why you have this extension created)
Log Source Type: Choose IBM tivoli access manager for e-bussiness.
Protocol Configuration: Syslog
Log Source Identifier: ip address of the VA/ Hostname of the VA machine
Enabled: check the box
Credibility: 5
Target Event Collector: eventcollector0 :: qradarisamlog -- (This might change,.. basically you will get only one option so select that)
Do not check the Collascing Event Check box
Incoming Payload Encoding: UTF-8
Store event Paylod : check the box.
Log source Extension: (Provide the name of you extension that you have created previously)
Entension Use Condition: Parsing Enhancement

5. Now save and submit.

ISAM Side Configurations:
To get the events for the Webseal related scenerio's:

1. Edit the configuration file of the Webseal.
In the [aznapi-Configuration] Stanza modify the logcfg parameter as below.

logcfg = audit.azn:rsyslog server="ip/hostname of qradar",port=514,log_id=webseal-websealname
logcfg = audit.authn:rsyslog server="ip/hostname of qradar",port=514,log_id=webseal-websealname
logcfg = http:rsyslog server="ip/hostname of qradar",port=514,log_id=webseal-websealname

To get the Events for the Administration related events for scenerios concering policy server:

1. Edit the ivmgrd configuration file in the Runtime Configuration.
In the [aznapi-Configuration] Stanza modify the logcfg paramter as below.

logcfg = audit.mgmt:rsyslog server="ip/hostname of qradar",port=514,log_id=PDMgrAudit
logcfg = audit.azn:rsyslog server="ip/hostname of qradar",port=514,log_id=PDMgrAudit
logcfg = audit.authn:rsyslog server="ip/hostname of qradar",port=514,log_id=PDMgrAudit


Now you might be wondering if you have multiple webseal what happens then?...
The Qradar gives the events based on the webseal name that you configured so if the log_id is different then the name of the event will have that id as well which will help you in identifying if they are coming from a dfferent webseal.

As there is only policy server so it will give you all the events related to the administration tasks done for other webseals also.. Basically alll the senerios being undertaken in policy server will be recorded in Qradar as an event(Like ACL, POP and User creation)... Even the login to the WPM also..

Note: Do not miss any steps as all the steps mentioned above are mandatory...  :-)