SIEM & Log Forwarding
Reach this screen by following Administration → System Settings → SIEM & Log Forwarding. Only users with the Administrator (Admin) role can open it. Click Save and Deploy to save; changes are pushed to the running Gateway environments immediately.
Overview
Apinizer's configuration database is the system of record for audit, session, token and application events. Whatever you forward to a SIEM is a copy, produced for correlation, alerting and long-term archiving on your side.
The delivery contract is best effort:
- Events are handed to the connector on the path that produced them; the connector buffers and sends them.
- When a connector's queue is full, events are dropped rather than blocking the request that produced them.
- Over UDP and plain TCP syslog, "delivered" cannot be observed. For that reason the test button reports Queued, not Sent, for syslog destinations.
- Nothing is retried from a durable outbox. If the SIEM was unreachable, the record is still in the Apinizer database — it is not in your SIEM.
Do not design a compliance control that depends on the SIEM copy alone. Query the Apinizer database (Audit Records, Login Records, Token Requests, Application Logs) when you need the authoritative answer, and use the SIEM copy for correlation and alerting.
Concepts
Streams
A stream is one family of events. Each stream has its own producer, its own collection in the Apinizer database, its own event types and its own way of deriving an outcome.
| Stream | What it records | Apinizer database collection | Event types | Outcome |
|---|---|---|---|---|
| Audit | Administrative changes, Management Console requests, rejected requests, sensitive-access events (secret disclosure, package export, API token lifecycle, PII unmask), and operation events (deployments, promotion executions, ACL grants and revokes) | audit_event | ENTITY, MANAGER_REQUEST, ACCESS_DENIED, SECRET_REVEALED, EXPORT, API_TOKEN_CREATED, API_TOKEN_REVOKED, PII_UNMASK, DEPLOY, UNDEPLOY, PROMOTION_REQUESTED, PROMOTION_APPROVED, PROMOTION_REJECTED, PROMOTION_STARTED, PROMOTION_EXECUTED, PROMOTION_CANCELLED, ACL_GRANT, ACL_REVOKE | SUCCESS, FAILURE, DENIED |
| Session | Management Console and API Portal sign-in, sign-out, token refresh, lockout, and the password lifecycle of a locally managed user | persistent_audit_event | LOGIN_SUCCESS, LOGIN_FAILURE, LOGOUT, TOKEN_REFRESH_SUCCESS, TOKEN_REFRESH_FAILURE, ACCOUNT_LOCKED, PASSWORD_CHANGED, PASSWORD_CHANGE_REQUIRED, PASSWORD_POLICY_VIOLATION | derived from the event type; ACCOUNT_LOCKED is DENIED, PASSWORD_POLICY_VIOLATION is FAILURE, the rest are SUCCESS |
| Token | Token issuance, refresh and rejection on the Gateway | log_tokentraffic | TOKEN_ISSUED, TOKEN_REFRESHED, TOKEN_REJECTED | SUCCESS when there is no error, FAILURE when there is; authentication errors are DENIED |
| Application | Component logs from the Management Console, Gateway, Cache and Integration modules | apinizer_log | LOG.TRACE … LOG.ERROR | WARN and ERROR are FAILURE, everything else SUCCESS |
| API Security | Gateway requests blocked by a policy or failed with an error, across HTTP, gRPC and WebSocket traffic | log_apisecurityevent | AUTHENTICATION, AUTHORIZATION, QUOTA, THROTTLING, VALIDATION, IP_SECURITY, THREAT, ROUTING, GATEWAY, OTHER | DENIED when the request was blocked, FAILURE when it errored |
| API Access | Every request that passes through the Gateway — successful ones included — as bodiless metadata, across HTTP, gRPC and WebSocket traffic | log_apiaccess | the same ten categories as API Security | SUCCESS when the request completed, DENIED when it was blocked, FAILURE when it errored |
| Portal | The API Portal's own domain events — an application registered or removed, a subscription requested/approved/rejected/cancelled, an organization membership or join request managed, a support ticket opened, a personal API access token created or revoked | audit_event (the same collection as Audit — see Portal Events) | PORTAL_APP_CREATED, PORTAL_APP_DELETED, PORTAL_SUBSCRIPTION_REQUESTED, PORTAL_SUBSCRIPTION_APPROVED, PORTAL_SUBSCRIPTION_REJECTED, PORTAL_SUBSCRIPTION_CANCELLED, PORTAL_ORG_MEMBER_INVITED, PORTAL_ORG_MEMBER_ADDED, PORTAL_ORG_MEMBER_ROLE_CHANGED, PORTAL_ORG_MEMBER_REMOVED, PORTAL_ORG_JOIN_REQUESTED, PORTAL_ORG_JOIN_APPROVED, PORTAL_ORG_JOIN_REJECTED, PORTAL_TICKET_CREATED, PORTAL_API_TOKEN_CREATED, PORTAL_API_TOKEN_REVOKED | SUCCESS, FAILURE, DENIED |
Portal sign-ins and sign-outs are not part of the Portal stream — they are Session events, physically recorded in a separate collection, portal_login_logs, rather than persistent_audit_event. A PORTAL_LOGIN_SUCCESS, PORTAL_LOGIN_FAILURE, PORTAL_LOGOUT, PORTAL_ACCOUNT_LOCKED, PORTAL_ACCOUNT_UNLOCKED, PORTAL_PASSWORD_CHANGED, PORTAL_PASSWORD_CHANGE_REQUIRED, PORTAL_PASSWORD_RESET_REQUESTED, PORTAL_PASSWORD_POLICY_VIOLATION or PORTAL_ACCOUNT_DISABLED event type on the Session row above carries source.component: PORTAL and data.portalId, so a rule can select or exclude portal sign-ins without touching Management Console ones — see API Portal Login Logs for the full catalog (ten types in all). PORTAL_ACCOUNT_DISABLED is written only by the inactive-account job so far; PORTAL_ACCOUNT_UNLOCKED only by an administrator's explicit Unlock on Accounts/Developers — a lock that simply expires on its own writes no event of its own, the sign-in row that follows says what happened.
API Access produces one event per request, so it grows at the rate of your traffic rather than at the rate of your incidents. Two switches govern it, and both are off by default:
- Local storage — whether the events are written to the
log_apiaccesscollection at all, on the Streams tab. Turning it on asks for confirmation, because from that moment every request costs a database write. - Authority — whether the stream is dispatched from the destinations on this page.
Before you turn either on, set a short retention for the collection — 3 to 7 days is the recommendation — from the API Access Events row on Application Log Cleanup Tasks, and consider sampling the rule that forwards it.
A request that a policy blocks or that ends in an error produces both an API Security event and an API Access event — the two streams overlap on purpose, so that a destination can subscribe to security incidents without the traffic, or to the traffic without duplicating incidents.
If you forward both streams to the same destination, set Outcomes to SUCCESS on the API Access rule. The API Security rule then carries the blocked and failed requests and the API Access rule carries only the successful ones, and nothing is counted twice.
Full traffic logs — the ones with request and response payloads — are still a separate mechanism and are not part of the SIEM streams; they continue to be forwarded by the log connectors of the Gateway environment. An API Access event is metadata only and never carries a body, a header or a query string.
Destinations
A destination is one connector plus everything that is applied before an event reaches it:
| Part | Meaning |
|---|---|
| Connector | The connection configuration that carries the payload — Syslog, Kafka, Webhook, RabbitMQ, ActiveMQ, Logback, Elasticsearch, Graylog or a database connector. |
| Payload profile | The format of the payload. See below. |
| Stream rules | Per stream: whether the stream is sent to this destination at all, and which of its events are selected. |
| Privacy profile | Optional masking, hashing, deletion or encryption applied to the payload before it leaves Apinizer. |
| Size policy | Optional maximum event size and what happens when an event exceeds it. |
A destination that has no rule for a stream never receives that stream. The same connection configuration can be used by several destinations.
Payload profiles
| Profile | What it produces | Available for |
|---|---|---|
| Legacy Raw | Today's output for your connector type, unchanged — a database connector still writes SQL columns, a Graylog connector still writes a GELF message, an Elasticsearch connector still writes its own document, and the string-based connectors still receive the same JSON they receive today. The field list is frozen: fields added to Apinizer in later versions do not appear in this output. | Every connector type |
| Apinizer JSON v2 | The canonical envelope described under Schema v2 — a stable field order, a typed field allowlist, a severity value, and a data object that carries only the fields explicitly permitted for that stream. | Syslog, Kafka, Webhook, RabbitMQ, ActiveMQ, Logback, Elasticsearch, Graylog |
| CEF 0 | A single-line ArcSight Common Event Format record, produced from the v2 envelope after the privacy profile and the size policy have been applied. See CEF and LEEF. | Syslog |
| LEEF 2.0 | A single-line, tab-separated IBM QRadar Log Event Extended Format record, produced the same way. See CEF and LEEF. | Syslog |
Database connectors write into fixed table columns and therefore cannot carry the v2 envelope; they stay on Legacy Raw. Privacy profiles and size policies are applied on every profile except Legacy Raw, so a destination that needs masking must be switched to Apinizer JSON v2, CEF 0 or LEEF 2.0.
For an Elasticsearch destination, leave the Cluster Administration switch on the connection turned off. Enter an Index Name that is separate from the API traffic log index. Apinizer does not create the SIEM index template. The organization that owns the Elasticsearch cluster creates and manages the template, the ILM policy and the data stream. Ready-made commands are on Elasticsearch Index Templates for SIEM Destinations.
The same rule applies to a Database destination. Apinizer does not create the tables. The organization creates the log_AuditEvent, log_LoginLog, log_TokenTraffic and log_Application tables that Legacy Raw writes to. See Table Creation Commands for Apinizer Logs.
Legacy Raw is kept byte-for-byte compatible so an existing SIEM parser keeps working after the upgrade. It also keeps whatever it emits today, including fields such as the token log's clientInfo. The v2 profile is where the field list is curated: token values, passwords, and Authorization, Cookie and API-key headers are never part of it, and any remaining field whose name looks like a credential is dropped a second time before the payload is sent.
Authority
Every stream is served by exactly one of two sources, and you switch between them per stream:
| Authority | Where the destinations come from | Are rules applied? |
|---|---|---|
| Legacy | The recipient lists that were previously configured under General Settings | No — every event goes to every recipient, exactly as before the upgrade |
| Active | The destinations on this page | Yes — rules, payload profile, privacy profile and size policy all apply |
Switching a stream is immediate in both directions, so you can move one stream at a time and roll it back without losing events.
The Portal stream has no legacy recipient list to fall back to — its sixteen domain events simply reach no destination while it is on Legacy (which is also its default after an upgrade). Switch it to Active to start forwarding them at all. Portal sign-ins and sign-outs are unaffected by this switch: they follow the Session stream's authority instead, as explained under Migration and cutover below.
The page
The page has three tabs.
Destinations
The destination list shows the name, the connector type and connection configuration, the payload profile, a badge for every stream routed to it, and whether it is enabled. Add Destination opens the destination dialog, where you configure:
- Name, Description and the Enabled switch.
- Connector — Select Connector opens the same connector editor used elsewhere in Apinizer; Edit Connector reopens it for an existing destination.
- Payload Profile — the list is filtered by connector type. CEF 0 and LEEF 2.0 are single-line syslog formats and are offered only when the destination's connector is a Syslog connector.
- Size Policy — Limit event size, the maximum event size in bytes, and the action taken when the limit is exceeded.
- Privacy Profile — Apply privacy profile plus Apply recommended SIEM profile, which fills in the identity rules for you.
- Stream Rules — one section per stream, each starting with Send this stream to this destination.
A Database destination's connector uses the same Operation field as the Gateway Runtime connectors — only Insert-Update-Delete is offered, regardless of database type. See Adding Log Connectors for details.
Use Send test event on a saved destination to verify connectivity before you switch a stream over.

Streams
One row per stream, with four columns:
| Column | What it does |
|---|---|
| Stream | The stream's name. A stream that exists in the platform but is not configurable yet would carry a Planned badge; as of this release every stream is configurable. |
| Apinizer Database / Local Retention | Whether the stream is stored locally, plus a Retention settings link to the retention configuration for that log family. Audit, Session, API Security and Portal are marked Always stored and cannot be turned off. Token and Application have a Store in the Apinizer database switch that is on by default. API Access has the same switch but it is off by default and asks for confirmation before it is turned on — see the warning above. The Audit row also carries the Audit manager requests switch, which remains a General Settings value and controls whether Management Console requests are recorded at all. |
| Destinations | A summary of the rule for each destination configured for that stream. When no destination is configured the cell says so, and streams still on Legacy show Rules take effect once the authority is ACTIVE. |
| Authority | The Legacy ⇄ Active switch, with a confirmation dialog and the recommended cutover order. The switch is saved on its own, immediately, and it carries over only what has already been saved: destination edits you have not saved yet stay on screen but are not part of the cutover, and the dialog says so. Save them first if the switch should cover them. |

Schema & Samples
Pick a stream and a profile and the tab renders the payload the running platform produces for that combination, together with the field allowlist. All four profiles can be previewed here, including the CEF and LEEF lines, independently of which connector the destination actually uses. Use it to build your parser, and read the note next to it: new fields may be added without raising the schema version, so your parser must ignore unknown fields.
Below the payload the tab also shows the RFC 5424 STRUCTURED-DATA sample — the framing metadata a Syslog connection writes when structured data is enabled on it. It is not part of the payload. The number in the apinizer@ element of the sample is an example: the real value is the Enterprise Number (PEN) on the Syslog connection, and when that field is empty the element is not written at all.

Rules
Rules are evaluated at the source, on the path that produced the event, before anything is handed to a connector. There is no scripting and no regular expression matching — the evaluation is a fixed sequence of checks, so it stays cheap even on the token path.
Evaluation order
| Step | Check | Result when it matches |
|---|---|---|
| 1 | The rule is switched off | Not sent |
| 2 | The event type is in Excluded event types | Not sent — exclusion always wins over inclusion |
| 3 | Included event types is not empty and does not contain the event type | Not sent |
| 4 | Any dimension of Scope — exclude matches | Not sent |
| 5 | Scope — include is not empty and no dimension matches | Not sent |
| 6 | The threshold rejects the event — Minimum level for Application, Outcomes for every other stream | Not sent |
| 7 | Sample percent is set (API Access only) and this event is not in the sampled share | Not sent — sampled out |
| 8 | Maximum events per second has been exhausted for this second | Throttled |
| 9 | — | Sent |
An empty list always means everything: no included event types means every type, no outcomes means every outcome, no scope means every event. Within Scope — include the dimensions are combined with OR — the event has to match at least one filled dimension — while an event matching any dimension of Scope — exclude is dropped.
Sampling
The Sample percent field appears on the API Access rule only, and it is the knob that makes a per-request stream affordable for a SIEM that is priced or sized by event count. Leave it empty to forward every event that matched the rule; set it to 10 to forward roughly a tenth of them.
Two things about it are worth being precise on:
- It thins forwarding, never storage. Sampling decides what leaves for the destination. It does not affect what is written to the
log_apiaccesscollection — that is governed solely by the local storage switch, so the Security Events screen keeps showing every event regardless of the sample percent. - The decision is deterministic, not random. It is derived from the event's own identifier, so the same event always gets the same verdict, and a request either reaches every destination that sampled it in or none of them. Re-evaluating the same event never flips the result.
Sampling is the wrong tool for reducing a specific kind of noise — use Outcomes, Scope — include or Scope — exclude for that, and keep sampling for the case where you want a representative slice of everything.
Sampling is not compatible with using API Access as an audit trail. A sampled destination holds a statistical picture of your traffic, not a complete one; do not point a compliance report at it.
Scope dimensions
| Dimension | Matched against | Streams where it is meaningful |
|---|---|---|
| Project ids | The project the affected object belongs to | Audit, Session, Token |
| API proxy ids, API proxy names | The API proxy the event belongs to | Token, Application |
| HTTP methods | The HTTP method of the token request | Token |
| Credentials | The credential or client key that requested the token | Token |
| Environment ids | The environment that produced the event | Token, Application |
| Components | The Apinizer component that wrote the log — Manager, Gateway, Cache, Integration, Portal | Application |
| Client CIDR blocks | The client IP address, matched against IPv4 or IPv6 CIDR blocks | Audit, Session, Token |
| Portal ids | The API Portal the event belongs to | Session (portal sign-in/sign-out events only), Portal |
Names are matched case-insensitively; identifiers must match exactly.
Management Console request and access-denied audit events belong to no project. If you fill Project ids with a project identifier, those events stop matching and disappear from that destination. To keep them, add the literal value admin to the list — it selects the events that have no project.
Management Console sign-ins have no Portal ids to match, and portal sign-ins have no Project ids to match — a filled-in Portal ids scope on the Session stream selects only the portal side of it, exactly the way Project ids already selects only the Management Console side.
Examples
| Goal | How to configure it |
|---|---|
| Send only failed and rejected administrative operations | Audit rule → Outcomes: FAILURE, DENIED |
| Keep the high-volume Management Console request stream out of a destination | Audit rule → Excluded event types: MANAGER_REQUEST |
| Forward only one project's events | Audit rule → Scope — include → Project ids: the project identifier (add admin as well to keep platform-level events) |
| Forward warnings and errors only | Application rule → Minimum level: WARN |
| Protect a shared syslog target from a token burst | Token rule → Maximum events per second: 200 |
| Forward successful API traffic without duplicating the security incidents | API Access rule → Outcomes: SUCCESS (leave the API Security rule to carry the blocked and failed requests) |
| Keep a per-request stream affordable on a metered SIEM | API Access rule → Sample percent: 10 — roughly a tenth of the matching events is forwarded, the collection still stores all of them |
| Send token rejections only | Token rule → Included event types: TOKEN_REJECTED |
| Forward only one portal's sign-ins/sign-outs | Session rule → Scope — include → Portal ids: the portal identifier |
| Forward a portal's application/subscription/ticket activity but not its sign-ins | Portal rule with no scope restriction; leave the Session rule for that destination off (or scoped to a different portal) |
Rules apply only to streams whose authority is Active. While a stream is on Legacy, every recipient of the legacy list still receives every event.
Privacy profile
Sensitive data is handled in two layers.
The first layer cannot be turned off. Token values, passwords and password hashes, Authorization, Cookie and Set-Cookie headers, API-key headers, query strings, certificate and key material, and the privacy salt itself are never part of a v2 payload. They are not in the allowlist, and a second check removes any remaining field whose name resembles a credential. The same check runs over the change list described under Fields per stream: a changed field whose name resembles a credential carries "[REDACTED]" in place of both the old and the new value. The token-signing key of a Gateway Runtime (the RSA private key shown on the JWT Token Validation Keys tab) belongs to this layer as well: it appears neither in the environment's audit record, nor in the change list, nor in a captured request body.
The second layer is the privacy profile you configure per destination. It is optional and it applies on every profile except Legacy Raw, after the envelope has been produced and before the size policy runs. On a CEF 0 or LEEF 2.0 destination it therefore runs before the line is formatted, so a masked field reaches the line already masked. Each rule targets an envelope field by name, by regular expression, or by built-in PII type (national identity number, IBAN, e-mail address, phone number, card number) and applies one operation: mask, hash, delete, encrypt or detect.
The recommended profile, applied with a single click in the destination dialog, hashes the identity fields — user, email and the credential name — leaves the IP address readable, and runs built-in PII detection over the free-text fields.
A destination you are creating starts with masking already on for the API Security stream. The moment you switch that stream on for a new destination, its privacy profile is filled with three built-in PII rules — Turkish identity number, Turkish IBAN and card number — each set to mask. An API Security event carries no body, but its credential and path fields can still hold an identifier a caller typed into a URL or sent as a quota key. The three rules appear in the destination's privacy table and you can remove any of them before saving. Nothing is applied to a destination that already exists, a profile you emptied or switched off yourself is never overwritten, and removing the stream rule later does not remove the profile — from that point on it is ordinary configuration. The same default is applied on the server, so a destination created through the API rather than this page is protected too. Note that a privacy profile belongs to the destination, not to one stream: if that destination also forwards Audit, Session or Application events, these three rules apply to them as well.
| Rule of thumb | Why |
|---|---|
| Hash identities instead of deleting them | A salted hash keeps the same user consistent across events, so correlation and user-based alerting still work. |
| Leave the IP address readable | Most SIEM detections — impossible travel, brute force, unusual source — are built on it. |
| Do not mask everything | Excessive masking removes the very signals your SIEM needs; an over-masked feed passes an audit and detects nothing. |
| Set a salt before you use hashing | A hash rule without a salt is rejected. |
| Rotate the salt deliberately | After a rotation the same user hashes to a different value, so pseudonym correlation across the rotation boundary is broken. Plan it with your SIEM team. |
If masking fails for an event, that event is not sent at all rather than sent unmasked. Losing a copy is preferred over leaking sensitive data. These events are counted separately so you can see them.
The envelope's structural fields — logType, schemaVersion, timestamp, everything under event, and everything under apinizer — are protected. A privacy rule that targets them is ignored, because masking them would break every parser downstream.
Privacy profiles are not applied to Legacy Raw destinations, which reproduce today's output exactly. Switch the destination to Apinizer JSON v2, CEF 0 or LEEF 2.0 if you need masking.
Size policy
The size policy applies on every profile except Legacy Raw and bounds the UTF-8 size of the whole payload, envelope included. On a CEF 0 or LEEF 2.0 destination it is applied to the envelope before the line is formatted; a formatted line that is still over the limit is dropped rather than shortened a second time.
| Setting | Behaviour |
|---|---|
| Off (default) | No limit — the same behaviour as before the upgrade. |
| Truncate data | The bulk fields inside data — reference, message, stackTrace, changes — are shortened largest-first until the payload fits, each one marked with a truncation note, and apinizer.truncated is set to true. The envelope fields are never touched. If truncation is not enough, the event is dropped. |
| Drop the event | The event is not sent and is counted as an oversize drop. |
| Replace data with a hash | data is replaced by its SHA-256 digest and byte count, so the event is still correlatable but carries no payload. |
The minimum you can configure is 1024 bytes. For syslog destinations, 8192 bytes with Truncate data is a good starting point — most RFC 5424 receivers accept between 2 and 8 KB per message and silently cut anything longer. Kafka, Webhook and Elasticsearch destinations normally need no limit.
Application stack traces, audit reference objects and audit change lists are the fields that make an event large. All three are opt-in or bounded: the reference object is off by default on the Audit stream, the change list is on by default but is already capped before this policy ever runs — at most 200 entries, each value cut at 512 characters, the whole list at 512 KB — and the stack trace switch on the Application stream can be turned off for a destination that does not need it.
This is a different control from the Max Message Size (Bytes) on a Syslog connection itself. This size policy shortens, drops or hashes the event's content so it fits a target size; the Syslog connection's setting instead keeps all of the content and splits an oversized message into several syslog messages. See Splitting Oversized Messages for how the two relate when a destination uses both.