IBM QRadar Integration
Forward Keycloak authentication events and logs to IBM QRadar for enterprise security monitoring, threat detection, and compliance reporting.
Overview
Section titled “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
Section titled “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
Section titled “Prerequisites”Before starting, ensure you have:
-
Skycloak Requirements
- Enterprise plan, or a Launch or Business plan with the SIEM Export 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
Section titled “Step 1: Create QRadar Log Source”Using QRadar Console UI
Section titled “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)
Section titled “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 deploy
Step 2: Configure QRadar Syslog Listener
Section titled “Step 2: Configure QRadar Syslog Listener”Enable Syslog Reception
Section titled “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
Section titled “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 save
Step 3: Configure Skycloak SIEM Destination
Section titled “Step 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
Section titled “Basic Information”- Name:
Production QRadar - Destination Type:
Syslog
Connection Details
Section titled “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
Section titled “Event Filtering”Select events to forward:
LOGIN- Successful loginsLOGIN_ERROR- Failed login attemptsLOGOUT- User logoutsUPDATE_PASSWORD- Password changesUPDATE_EMAIL- Email changesREGISTER- New user registrationsCODE_TO_TOKEN- Token exchangesREFRESH_TOKEN- Token refreshes
Include Server Logs: Enable if you need detailed application logs for troubleshooting
Batching Configuration
Section titled “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
Section titled “Step 4: Verify Data Flow”Check Log Source Status
Section titled “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
Section titled “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 MINUTES
Test with Login Event
Section titled “Test 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 MINUTES
Step 5: Create Custom Rules
Section titled “Step 5: Create Custom Rules”Example: Detect Brute Force Attacks
Section titled “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 NULL
Rule 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
Section titled “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
Section titled “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 HOUR
Step 6: Create Custom Dashboards
Section titled “Step 6: Create Custom Dashboards”Example: Authentication Overview Dashboard
Section titled “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 HOURS
Widget 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 HOURS
Widget 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 DAYS
LEEF Format Reference
Section titled “LEEF Format Reference”Format Structure
Section titled “Format Structure”Skycloak sends events in LEEF 2.0 format. The header carries the Keycloak event type as the Event ID; attributes are tab-separated:
LEEF:2.0|Keycloak|Skycloak|1.0|LOGIN|src=203.0.113.42 usrName=john.doe realmId=550e8400-e29b-41d4-a716-446655440000 realmName=production clientId=web-app workspaceId=f1e2d3c4-b5a6-4789-a012-345678901234 clusterId=a1b2c3d4-e5f6-4789-a012-345678901234 sessionId=7f3e9c8a-1b4d-4e5f-a6c7-8d9e0f1a2b3c browser=Chrome os=macOS country=United States city=San Francisco
Field Mapping
Section titled “Field Mapping”| LEEF Field | Description | Example |
|---|---|---|
src |
Source IP address | 203.0.113.42 |
usrName |
Username | john.doe |
realmId |
Realm UUID | 550e8400-e29b-41d4-a716-446655440000 |
realmName |
Realm name | production |
clientId |
Client application | web-app |
workspaceId |
Skycloak workspace UUID | f1e2d3c4-b5a6-4789-a012-345678901234 |
clusterId |
Skycloak cluster UUID | a1b2c3d4-e5f6-4789-a012-345678901234 |
error |
Error code — present only on error events (e.g. LOGIN_ERROR) |
user_not_found |
sessionId |
Session ID | 7f3e9c8a-1b4d-4e5f-a6c7-8d9e0f1a2b3c |
browser |
Browser | Chrome |
os |
Operating system | macOS |
country |
GeoIP country | United States |
city |
GeoIP city | San Francisco |
QRadar Field Extraction
Section titled “QRadar Field Extraction”QRadar’s built-in LEEF parser normalizes the standard fields it recognizes (src → Source IP, usrName → Username). The Skycloak-specific attributes (realmId, realmName, clientId, workspaceId, clusterId, etc.) are not part of the LEEF standard, so QRadar surfaces them as raw custom attributes rather than auto-mapping them to named Custom Properties — map them to Custom Properties yourself via a DSM extension if you want them as first-class searchable fields (see Troubleshooting below).
Useful QRadar Queries
Section titled “Useful QRadar Queries”Recent Failed Logins
Section titled “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 HOUR
User Login History
Section titled “User 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 DAYS
Login Activity by Realm
Section titled “Login 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 DAYS
Offenses Related to Keycloak
Section titled “Offenses 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 DAYS
Troubleshooting
Section titled “Troubleshooting”No Events in QRadar
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “Support”For assistance: