IBM QRadar Integration
IBM QRadar Integration Guide
Forward Keycloak authentication events and logs to IBM QRadar for enterprise security monitoring, threat detection, and compliance reporting.
Overview
This guide shows you how to configure Skycloak to send security events to IBM QRadar using syslog with LEEF (Log Event Extended Format). QRadar is ideal for enterprises requiring advanced threat intelligence and regulatory compliance.
What You’ll Achieve
- Real-time authentication event forwarding to QRadar
- Automatic event categorization and normalization
- Integration with QRadar’s threat detection rules
- Compliance reporting for audit requirements
Prerequisites
Before starting, ensure you have:
-
Skycloak Requirements
- Enterprise plan with SIEM Integration add-on
- Workspace Owner or Admin permissions
- Network connectivity from Skycloak to your QRadar console
-
QRadar Requirements
- IBM QRadar 7.3+ (SIEM or XDR)
- Administrative access to create log sources
- Network access to receive syslog data
Step 1: Create QRadar Log Source
Using QRadar Console UI
- Log in to QRadar Console
- Navigate to Admin → Data Sources
- Click Log Sources → Add
- Configure the log source:
Log Source Details:
-
Log Source Name:
Skycloak Keycloak Events -
Log Source Description:
Authentication events from Skycloak managed Keycloak -
Log Source Type:
Syslog -
Protocol Configuration:
- Select
Syslog - Choose your protocol:
TCP(recommended) orUDP
- Select
- Log Source Identifier: Leave empty (auto-detect from hostname)
Log Source Parameters:
-
Coalescing Events:
True(recommended) -
Store Event Payload:
True(for detailed forensics) - Enabled: Check this box
- Click Save → Deploy Changes
Using QRadar CLI (Alternative)
SSH into your QRadar console and run:
# Create syslog log source
/opt/qradar/bin/logSourceManagement.pl -a create \
-name "Skycloak Keycloak Events" \
-type "Syslog" \
-protocol "TCP" \
-port 514 \
-enabled true
# Deploy configuration
/opt/qradar/bin/contentManagement.pl -a deployStep 2: Configure QRadar Syslog Listener
Enable Syslog Reception
Navigate to Admin → System Configuration
Select your Event Collector
Click Syslog tab
-
Configure:
-
Listen on Port:
514(standard) or custom port -
Protocol:
TCP(recommended) orUDP - TLS Encryption: Enable for secure transmission
-
Listen on Port:
Click Save → Deploy Changes
Firewall Configuration
Ensure QRadar can receive syslog traffic:
# Check firewall rules
iptables -L INPUT -n | grep 514
# If needed, add rule (run as root):
iptables -I INPUT -p tcp --dport 514 -j ACCEPT
service iptables saveStep 3: Configure Skycloak SIEM Destination
- Log in to your Skycloak dashboard
- Navigate to SIEM Integration in the left sidebar
- Click Add Destination
- Configure the destination:
Basic Information
-
Name:
Production QRadar -
Destination Type:
Syslog
Connection Details
-
Syslog Host: Your QRadar console hostname or IP (e.g.,
qradar.company.comor10.0.1.100) -
Port: Match your QRadar syslog port (default:
514) -
Protocol:
TCP(recommended) orTLSfor encryption -
Format:
LEEF(Log Event Extended Format - optimized for QRadar)
Event Filtering
Select events to forward:
-
LOGIN- Successful logins -
LOGIN_ERROR- Failed login attempts -
LOGOUT- User logouts -
UPDATE_PASSWORD- Password changes -
UPDATE_EMAIL- Email changes -
REGISTER- New user registrations -
CODE_TO_TOKEN- Token exchanges -
REFRESH_TOKEN- Token refreshes
Include Server Logs: Enable if you need detailed application logs for troubleshooting
Batching Configuration
-
Batch Size:
500(recommended for QRadar) -
Batch Interval:
120seconds
- Click Complete Setup
- Toggle Enable to start forwarding events
Step 4: Verify Data Flow
Check Log Source Status
- In QRadar, navigate to Log Activity tab
- Click Log Sources
- Find your
Skycloak Keycloak Eventslog source - Verify:
- Status: Green (receiving events)
- Events per Second: Should show activity
- Last Event Time: Should be recent
Search for Keycloak Events
Use QRadar’s search to find events:
- Navigate to Log Activity tab
- Use Advanced Search with this AQL query:
SELECT * FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
LAST 10 MINUTESTest with Login Event
- Log in to one of your Keycloak realms
- Wait 2-3 minutes for batch processing
- Run this search:
SELECT username, sourceip, eventname, DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') as event_time
FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname ILIKE '%LOGIN%'
LAST 5 MINUTESStep 5: Create Custom Rules
Example: Detect Brute Force Attacks
- Navigate to Offenses → Rules
- Click Actions → New Event Rule
- Configure:
Rule Details:
-
Rule Name:
Keycloak Brute Force Attempt -
Rule Type:
Event
Rule Test:
SELECT * FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname = 'LOGIN_ERROR'
AND username IS NOT NULLRule Response:
- Create Offense: When the rule tests true
-
Offense Name:
Potential Brute Force Attack on Keycloak - Credibility: 5
- Severity: 7
-
Category:
Authentication
Group By: username, sourceip
Time Window: Count events where there are 5 or more events in 5 minutes
- Click Save
Example: Detect Privileged Account Changes
Alert on password changes for admin accounts:
SELECT * FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname = 'UPDATE_PASSWORD'
AND (username ILIKE '%admin%' OR username ILIKE '%root%')Example: Multiple Failed Login Locations
Detect logins from multiple geographic locations:
SELECT username, COUNT(DISTINCT sourceip) as unique_ips
FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname = 'LOGIN'
GROUP BY username
HAVING COUNT(DISTINCT sourceip) > 3
LAST 1 HOURStep 6: Create Custom Dashboards
Example: Authentication Overview Dashboard
- Navigate to Dashboard tab
- Click Create Dashboard
- Add widgets:
Widget 1: Login Success Rate
- Type: Pie Chart
- Search:
SELECT eventname, COUNT(*) as count
FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname IN ('LOGIN', 'LOGIN_ERROR')
GROUP BY eventname
LAST 24 HOURSWidget 2: Top Failed Login Users
- Type: Bar Chart
- Search:
SELECT username, COUNT(*) as failures
FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname = 'LOGIN_ERROR'
GROUP BY username
ORDER BY failures DESC
LAST 24 HOURSWidget 3: Login Activity Timeline
- Type: Time Series
- Search:
SELECT DATEFORMAT(starttime, 'YYYY-MM-dd HH:00') as hour, COUNT(*) as logins
FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname = 'LOGIN'
GROUP BY hour
LAST 7 DAYSLEEF Format Reference
Format Structure
Skycloak sends events in LEEF 2.0 format optimized for QRadar:
LEEF:2.0|Skycloak|Keycloak|1.0|LOGIN|devTime=Jan 15 2024 14:30:00|src=203.0.113.42|usrName=john.doe|realm=production|identSrc=web-app
Field Mapping
| LEEF Field | Description | Example |
|---|---|---|
devTime |
Event timestamp | Jan 15 2024 14:30:00 |
src |
Source IP address | 203.0.113.42 |
usrName |
Username | john.doe |
realm |
Keycloak realm | production |
identSrc |
Client application | web-app |
eventId |
Unique event ID | evt_123abc |
cat |
Event category | Authentication |
QRadar Field Extraction
QRadar automatically extracts LEEF fields into normalized properties:
-
usrName→ Username -
src→ Source IP -
realm→ Custom Property 1 -
identSrc→ Custom Property 2
Useful QRadar Queries
Recent Failed Logins
SELECT DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') as time,
username, sourceip, realm
FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname = 'LOGIN_ERROR'
ORDER BY starttime DESC
LAST 1 HOURUser Login History
SELECT username, sourceip,
DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') as login_time
FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname = 'LOGIN'
AND username = 'john.doe'
ORDER BY starttime DESC
LAST 30 DAYSLogin Activity by Realm
SELECT realm, COUNT(*) as login_count
FROM events
WHERE "Log Source" = 'Skycloak Keycloak Events'
AND eventname = 'LOGIN'
GROUP BY realm
ORDER BY login_count DESC
LAST 7 DAYSOffenses Related to Keycloak
SELECT offense_id, description, severity,
DATEFORMAT(start_time, 'YYYY-MM-dd HH:mm:ss') as offense_time
FROM offense_view
WHERE log_source_name = 'Skycloak Keycloak Events'
ORDER BY start_time DESC
LAST 30 DAYSTroubleshooting
No Events in QRadar
-
Check log source status:
- Navigate to Admin → Log Sources
- Verify status is green and last event time is recent
-
Check Skycloak destination:
- Go to SIEM Integration page
- Verify “Healthy” status
- Check “Events Sent” metric
-
Test network connectivity:
# From Skycloak network (if accessible): telnet qradar.company.com 514 -
Check QRadar system logs:
tail -f /var/log/qradar.log | grep -i syslog
Events Not Creating Offenses
-
Verify rules are enabled:
- Navigate to Offenses → Rules
- Check rule status
- Test rule manually
-
Check rule logic:
- Use rule search query directly in Log Activity
- Verify events match rule criteria
-
Review rule responses:
- Ensure “Create Offense” is selected
- Check credibility and severity thresholds
Performance Issues
If QRadar is slow processing Keycloak events:
- Check event collector CPU/memory: Navigate to Admin → System → Event Collector
- Reduce batch size: Lower to 200-300 events
- Filter events: Only forward critical event types
- Tune coalescing: Adjust log source coalescing settings
LEEF Parsing Issues
If fields aren’t being extracted:
-
Check DSM (Device Support Module):
- Navigate to Admin → DSM Editor
- Search for Keycloak or Syslog
- Create custom parsing if needed
Verify LEEF version: Ensure QRadar supports LEEF 2.0
Check field names: Review event payload for correct LEEF syntax
Best Practices
- Use TCP Protocol: More reliable than UDP for QRadar
- Enable TLS: Encrypt syslog traffic for sensitive data
- Create Custom Properties: Map Keycloak-specific fields (realm, client_id) to QRadar custom properties
- Set Up Building Blocks: Create reusable rule building blocks for common patterns
- Regular Offense Review: Schedule daily reviews of Keycloak-related offenses
- Tune Rules: Adjust rule thresholds based on your environment’s baseline
- Archive Old Events: Configure retention policies based on compliance requirements
Next Steps
- Create custom rules for your security requirements
- Build comprehensive dashboards for security team
- Integrate with QRadar incident response playbooks
- Configure email/SNMP notifications for critical offenses
- Review QRadar Use Case Manager for pre-built Keycloak rules
Support
For assistance: