Audit token

Airlock Gateway allows adding an audit token to a session. The audit token is visible in the summary log message for each request and is useful for monitoring, auditing, and statistics purposes. A common way to use an audit token is to add it after successful authentication so it will appear in all subsequent requests of the authenticated session. Often, the user name is used in audit tokens, but Airlock Gateway imposes no restrictions. Whitespace characters in the audit token are replaced by underscore characters.

;; AUDIT_TOKEN
audit-token-command       = audit-token-command-name "=" audit-token-command-value
audit-token-command-name  = "AUDIT_TOKEN"
audit-token-command-value = audit-token-value
                            ;at this place 'audit-token-value' must be percent encoded

Example:
The pseudo code examples below show how to set audit tokens using the control API:

Pseudo code:

response.header="Set-Cookie: AL_CONTROL="+URL_Encode("AUDIT_TOKEN="+URL_Encode(UTF8_Encode("jsmith")))

Results in:

Set-Cookie: AL_CONTROL=AUDIT_TOKEN%3Djsmith

Pseudo code:

response.header="Set-Cookie: AL_CONTROL="+URL_Encode("AUDIT_TOKEN="+URL_Encode(UTF8_Encode("John_Smith_authenticated_Mon_Jan_01_16:00:30_CET_2007")))

Results in:

Set-Cookie: AL_CONTROL=AUDIT_TOKEN%3DJohn_Smith_authenticated_Mon_Jan_01_16%253A00%253A30_CET_2007

The examples shown above use the pseudo function UTF8_Encode(). UTF-8 encoding is required for audit tokens to be displayed correctly in Airlock Gateway Logviewer. However, depending on the system configuration, the audit token could also be sent to other servers by using syslog. The encoding used must consider specifics of all involved target components.