Once web, SaaS and private application traffic runs through a security service edge, the SSE platform sees more user activity than any other single control, yet most SOCs only forward its block events. Secure web gateway (SWG), cloud access security broker (CASB) and zero trust network access (ZTNA) logs carry identity, device, destination, data volume and policy outcome in one record, which makes them some of the richest detection sources available. This guide sets out which fields matter in each log type, the detections worth building from them, how to normalise the logs to the Open Cybersecurity Schema Framework (OCSF), and the mistakes that leave the data unused. It is written for detection engineers and the owners of SASE and SSE platforms, and is vendor-neutral: field names are described generically, so map them to your platform's own names. For the architecture itself, see the SASE and SSE Guide.
Key takeaways
- Forward allowed traffic, not just blocks. Exfiltration, account misuse and policy bypass mostly look like allowed traffic; block-only forwarding misses them.
- Identity and device context are the value. SSE records tie a user, a device posture and an application to each request, which network logs alone cannot do.
- Three log families, different questions. SWG answers where users went and what they sent, CASB answers what they did inside SaaS, and ZTNA answers who reached which private application from where.
- Normalise to OCSF early. HTTP Activity, File Hosting Activity, Web Resource Access Activity, Authentication and Tunnel Activity cover most SSE events and let one rule run across platforms.
- Watch the gaps as well as the events. A user whose traffic stops appearing in SWG logs while their identity stays active is a detection in its own right.
Why SSE logs matter for detection
NIST SP 800-207 describes zero trust as moving defences from network perimeters to users, assets and resources, with no implicit trust granted because of network location. SSE platforms are where that model is enforced for many organisations, so their logs record each access decision with its context. That gives detection engineers three things that firewall and proxy logs of the past rarely did.
- Identity on every record: the user principal from the identity provider, not just an IP address, even for users off the corporate network.
- Decrypted application context: where TLS inspection is in place, the full URL, HTTP method, file name and application activity (for example "upload" or "share") are visible.
- Policy outcome and risk scoring: the rule that matched, the action taken and the platform's own risk rating of the destination application.
MITRE ATT&CK notes that exfiltration to cloud storage (T1567.002) blends in because hosts already talk to those services, and lists web proxies enforcing outbound policy as a mitigation. The SSE layer is where that traffic is both visible and controllable, which is why it belongs in the detection programme rather than only in the network team's console. For general detection engineering method, see the Detection Engineering Guide.
Key fields by log type
Platforms name fields differently, but the concepts are consistent. The tables list the fields that detections depend on and what each is used for.
Secure web gateway (SWG) logs
| Field (generic name) | What it holds | Detection use |
|---|---|---|
| Timestamp | Request time, ideally UTC | Sequencing, impossible travel, beaconing intervals |
| User and group | Identity provider user principal and group membership | Per-user baselines, privileged user watchlists |
| Device ID and posture | Managed or unmanaged, compliance state, client version | Unmanaged device access, outdated client |
| Source IP and egress location | Client public IP, service point of presence | Geolocation, anonymiser and hosting provider detection |
| URL, host and domain | Full URL where decrypted; otherwise SNI host | Newly registered domains, threat intel matching |
| URL category | Platform category such as file sharing or generative AI | Policy exceptions, risky categories |
| HTTP method and status | GET, POST, PUT; response code | Upload detection, failed access patterns |
| Bytes sent and received | Request and response sizes | Exfiltration volume, upload ratio |
| User agent | Client software string | Scripted clients, unusual tools |
| File name, type and hash | Files uploaded or downloaded | Sensitive file types, malware matches |
| Policy, rule and action | Matched rule, allow, block, warn, isolate | Override abuse, blocked attempt bursts |
| TLS inspection status | Inspected or bypassed and the bypass reason | Blind spots, bypass list abuse |
| DLP result | Matched data profile and severity | Sensitive data leaving |
CASB logs (inline and API)
Inline CASB events come from the proxy and look like SWG records with richer application activity. API-mode events come from the SaaS provider's own audit feed via the CASB, so they also cover activity from unmanaged devices and from integrations. See the CASB Guide for the two modes.
| Field (generic name) | What it holds | Detection use |
|---|---|---|
| Application and instance | SaaS application and tenant (corporate or personal instance) | Uploads to personal instances of sanctioned apps |
| Activity | Login, upload, download, share, delete, admin change | Mass download, mass delete, sharing changes |
| Object | File, folder, record or channel acted on | Sensitive object tracking |
| Sharing scope | Internal, external named, public link | Public link creation on sensitive content |
| Application risk score | Platform rating of the application | Use of high-risk or unrated apps |
| Actor type | Human user, service account or connected application | Integration and token misuse |
| Third-party app and scopes | OAuth application name and granted permissions | New high-privilege grants |
| DLP and malware verdict | Profile matched, verdict | Sensitive data at rest or in motion |
ZTNA logs
| Field (generic name) | What it holds | Detection use |
|---|---|---|
| User and authentication context | User, MFA used, identity provider session | Access without strong authentication |
| Device and posture result | Device ID, posture checks passed or failed | Access from failing or unknown devices |
| Private application and segment | Application definition, host and port reached | First-time access, crown jewel access |
| Connector or gateway | Which connector served the session | Unexpected path, connector health |
| Session start, end and duration | Session lifecycle | Long-lived sessions, odd hours |
| Bytes transferred | Per-session volume | Bulk data pulls from internal apps |
| Decision and reason | Allowed or denied and why (policy, posture, location) | Repeated denials, probing of segments |
| Client source IP and location | Public IP and geolocation | Impossible travel, unexpected countries |
For the ZTNA model, see the ZTNA Guide.
Use cases and detections
Each detection below describes the logic, the fields it uses and the main tuning points. Build them as SIEM or data lake rules and test against at least 30 days of history before alerting.
Impossible travel and anomalous access
- Logic: for each user, compare consecutive SSE events from different client source locations; alert when the implied speed between them is not physically possible, or when access arrives from a country not seen for that user in the baseline period.
- Fields: user, timestamp, client source IP, geolocation, device ID.
- Tuning: use the client source IP, not the SSE point of presence egress IP, which reflects the provider's network. Exclude known corporate egress ranges and require a device change or a ZTNA access to a sensitive application to raise severity. The identity provider's own sign-in risk usually covers the authentication event; the SSE version adds what the user did afterwards. See the Impossible Travel and Anomalous Sign-In Detection guide.
Risky application upload
- Logic: alert on uploads (POST or PUT, or CASB activity "upload") above a byte threshold to applications in file sharing, personal storage or generative AI categories that are unsanctioned, high risk or a personal instance of a sanctioned app.
- Fields: user, application, instance, category, risk score, HTTP method or activity, bytes sent, file name, DLP result.
- Tuning: baseline per user over 30 days and alert on deviation plus an absolute floor; raise severity when a DLP profile matches, when the user is on a leaver list, or when an archive file type is uploaded. This maps to ATT&CK T1567.002 Exfiltration to Cloud Storage. For AI tools specifically, see AI Gateway vs CASB/SSE for Controlling Shadow AI.
Policy bypass
- Client gap: a user or device active in the identity provider or EDR, but with no SWG traffic for a set period during working hours, suggests the client was disabled or traffic is leaving another way.
- Anonymisers and tunnels: allowed or blocked requests to proxy, VPN and anonymiser categories, and long sessions with steady low-volume traffic to a single uncategorised host, which can indicate tunnelling (ATT&CK T1572 Protocol Tunneling, T1090.003 Multi-hop Proxy).
- Bypass list growth: changes to TLS inspection bypass lists or steering exceptions, from the platform admin audit log, reviewed against change tickets.
- Override abuse: users repeatedly clicking through "warn" or "coach" pages to the same risky category.
- Direct egress: firewall logs showing web traffic from managed endpoints that did not pass through the SSE service.
Further detections worth building
| Detection | Source | Key fields | ATT&CK |
|---|---|---|---|
| Mass download from a SaaS app before resignation date | CASB API | User, activity, object count, HR leaver feed | T1530 Data from Cloud Storage |
| Public link created on content with a DLP match | CASB API | Sharing scope, DLP result | T1567.002 |
| Service account or token used from a new location | CASB API | Actor type, source IP, application | T1078.004 Cloud Accounts |
| First access to a crown jewel private app | ZTNA | User, application, decision | T1133 External Remote Services |
| Repeated ZTNA denials across many segments | ZTNA | Decision reason, application count | T1133 |
| Beaconing to newly registered domains | SWG | Host, interval, bytes, domain age enrichment | T1071.001 Web Protocols |
Where identity fits
CASB API logs record actions by connected applications and service accounts as well as people. An OAuth integration that suddenly downloads every file, or an API token used from a hosting provider address, is a non-human identity incident that the identity provider may never see. Tag non-human actors during normalisation and baseline them separately. See the Service Account Behavioural Baselining Guide and Detection Engineering for Non-Human Identities Guide.
Normalisation and enrichment
OCSF mapping
The OCSF schema groups events into categories and classes. The classes below, taken from the OCSF schema repository, cover most SSE records; the class UID is the category number times 1,000 plus the class number.
| SSE event | OCSF class (UID) | Key OCSF attributes |
|---|---|---|
| SWG web request | HTTP Activity (4002) | http_request (url, http_method, user_agent, x_forwarded_for), http_response, src_endpoint, dst_endpoint, proxy, tls, traffic, app_name |
| SWG or CASB allow or block decision on a web resource | Web Resource Access Activity (6004) | activity_id (Access Grant, Access Deny, Access Revoke, Access Error), web_resources, proxy, http_request |
| CASB file upload, download, share | File Hosting Activity (6006) | activity_id (Upload, Download, Share, Unshare, Sync and others), actor, file, share_type, expiration_time |
| CASB SaaS object activity | Web Resources Activity (6001) | activity_id (Create, Read, Update, Delete, Search, Import, Export, Share), web_resources |
| ZTNA or SSE client sign-in | Authentication (3002) | user, is_mfa, is_remote, auth_protocol, session, dst_endpoint |
| ZTNA session or client tunnel | Tunnel Activity (4014) | activity_id (Open, Close, Renew), tunnel_type, session, user, src_endpoint, dst_endpoint, traffic |
| Raw connection records | Network Activity (4001) | src_endpoint, dst_endpoint, traffic, connection_info |
Map the policy outcome to the OCSF security control attributes: action_id (Allowed, Denied), disposition_id (for example Allowed, Blocked, Logged, Alert), policy, risk_level and risk_score. Put URL categories in url.categories. Keep the vendor's original fields in unmapped or raw_data so nothing is lost during mapping. The OCSF schema is still developing, so pin the version you map to and re-check when you upgrade.
Enrichment
- Identity: department, manager, privileged role, leaver date and human or non-human type from the identity provider and HR feed.
- Device: ownership and EDR status from the endpoint management platform.
- Destination: domain age, threat intelligence matches and sanctioned or unsanctioned application status.
- Geolocation: resolve client source IP, flag hosting providers and anonymiser ranges.
Rollout
- Inventory feeds: list every SSE log type and admin audit log, its delivery method (streaming, API pull, storage export) and latency.
- Forward everything to cheap storage: send all allowed and blocked events to the data lake; send a filtered subset to the SIEM if cost requires.
- Normalise: map to OCSF classes and validate field fill rates for user, device, URL and bytes.
- Build detections in monitor mode: run each rule silently for two to four weeks, measure volume and true positive rate, tune, then promote to alerting.
- Roll back safely: keep rules versioned so a noisy release can be reverted, and alert on feed silence so a broken pipeline is not mistaken for a quiet network.
Measuring it
| Metric | Target direction |
|---|---|
| Percentage of SSE events with user and device populated after normalisation | Up, towards full coverage |
| Percentage of managed endpoints seen in SWG logs each day | Up |
| Share of web traffic exempt from TLS inspection | Down, with every exemption justified |
| True positive rate per SSE detection | Up after tuning |
| Median time from SSE event to SIEM availability | Down |
A small organisation with one SSE platform can often rely on its built-in analytics and forward only alerts plus upload and admin events. Large organisations with several platforms gain most from OCSF normalisation, because one rule set then runs across all of them. For metric design, see the Detection Engineering Metrics and KPIs Guide.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | AU-12 Audit Record Generation; AU-6 Audit Record Review, Analysis, and Reporting; SI-4 System Monitoring; AC-4 Information Flow Enforcement | Generating, collecting and analysing SSE records |
| NIST CSF 2.0 | DE.CM-01; DE.AE-02; DE.AE-03 | Network monitoring, event analysis, correlation across sources |
| MITRE ATT&CK | T1567.002, T1530, T1572, T1090.003, T1078.004, T1133, T1071.001 | Techniques the detections above target |
Common failure patterns
- Block-only forwarding: only denied events reach the SIEM, so exfiltration through allowed applications is invisible.
- Egress IP used as user location: impossible travel rules fire on the SSE provider's point of presence changes rather than on the user's real source IP.
- Uninspected categories treated as safe: large TLS bypass lists for convenience leave file sharing or personal email traffic with host names only.
- No feed health monitoring: a broken log export goes unnoticed for weeks and looks like a quiet period.
- Human-only baselines: service accounts and connected applications are mixed in with users, so their unusual behaviour is lost or they flood the user alerts.
- Admin audit logs ignored: policy and bypass changes on the SSE platform itself are not monitored, although they are the easiest way to switch off controls. See the CASB and SSE platform health check.
Practitioner checklist
- Forward allowed and blocked SWG, CASB and ZTNA events plus the platform admin audit log.
- Confirm that user, device, client source IP, URL, bytes and action are populated in every record.
- Map events to OCSF classes, pin the schema version and keep vendor fields in unmapped.
- Enrich with identity, HR, device and destination context, and tag non-human actors.
- Build impossible travel, risky upload and policy bypass detections first, in monitor mode.
- Add mass download, public sharing, token misuse and ZTNA first-access rules next.
- Alert on feed silence and on endpoints missing from SWG logs.
- Review TLS inspection bypass and steering exceptions monthly against change records.
- Track the five coverage and quality metrics and report them with detection results.
Standards and references
- OCSF: Open Cybersecurity Schema Framework schema repository
- NIST: SP 800-207 Zero Trust Architecture
- MITRE ATT&CK: T1567.002 Exfiltration to Cloud Storage
- MITRE ATT&CK: T1572 Protocol Tunneling
- MITRE ATT&CK: T1078.004 Cloud Accounts
- MITRE ATT&CK: T1530 Data from Cloud Storage
Related NHI Mgmt Group resources: SASE and SSE Guide · CASB Guide · ZTNA Guide · Detection Engineering Guide