Audit Log

The audit log records creation, modification, and deletion of all user-accessible configuration elements, access to critical security data such as public keys. For each logged event it provides associated user-id, date, time, event type, and success/failure data for each event. As a result, the log supports after the fact investigation of loss or impropriety, and appropriate management response. Only admin-level users have audit log access. These users can retrieve, read, copy, and upload the audit log. The original log cannot be deleted or edited by any operator action.

The audit log is transferred to a previously configured SFTP server or servers when one of three specified conditions is satisfied.
  • A configurable amount of time has elapsed since the last transfer.
  • The size of the audit log (measured in Megabytes) has reached a configured threshold.
  • The size of the audit log has reached a configured percentage of the allocated storage space.

Transfer is targeted to a designated directory of each SFTP target server.

Audit logs can be viewed after they transfer.

Audit Log Syntax

The audit log file is stored on the target SFTP server or servers with a filename that takes the format:

<hostname>-audit<timestamp>
Where:
  • <hostname> is the name of the host to which the log gets sent.
  • <timestamp> is a 12-digit string that takes the format YYYYMMDDHHMM.
myhost-audit-200903051630

Names an audit log file transferred to an SFTP server named 'myhost' on March 5, 2009 at 4:30 PM.

Audit Log Format

Audit log events are comma-separated-values (CSV) lists that have the following format:

{TimeStamp,user-id@address:port,Category,EventType,Result,Resource,Details,...}

{2009-0305 15:19:27,sftp-elvis@192.2.0.10:22,security,login,success,authentication,,.}

TimeStamp specifies the time that the event was written to the log

Category takes the values: security | configuration | system

EventType takes the values: create | modify | delete | login | logout | data-access | save-config | reboot | acquire-config

Result takes the values: successful | unsuccessful

Resource identifies the configuration element accessed by the user

Details (which is displayed only in verbose mode) provides fine-grained configuration details
  • If EventType = create, details is “New = element added”
  • If EventType = modify, details is “Previous = oldValue New = newValue”
  • If EventType = delete, details is “Element = deleted element”
  • If EventType = data-access, details is “Element = accessed element”
The following lists and describes the actions that generate audit log events.
  • Login—Every login attempt
    2009-03-05 17:31:14,sftp-elvis@192.2.0.10:22,security,login,
success,authentication,,. 
  • Logout—Every logout attempt
    2009-03-05 18:44:03,sftp-elvis@192.2.0.10:22,security,logout,success,authentication,,. 
  • save-config—Every save-config CLI command
    2009-03-05 15:45:29,acliConsole-admin@console,configuration,
save-config,success,CfgVersion=111,,.
  • activate-config—Every activate-config CLI command
    2009-03-05 15:45:36,acliConsole-admin@console,configuration,activate-config,success,RunVersion=111,,.
  • DataAccess
    • a) attempt to retrieve data using SFTP
    • b) attempt to export using ssh-key
    • c) attempt to display security info using show security
    • d) attempt to kill a session using kill
    2009-03-05 15:25:59,sftp-elvis@192.2.0.10:22,security,data-access,
success,code/auditaudit200903051518,,.
  • Create
    • a) any action that creates a configuration property
    • b) any action that creates a file
      2009-03-05 15:45:01,acliConsole-admin@console,configuration,create,
success,public-key, 
      Element= 
      <?xml version=’1.0’ standalone=’yes’?> 
      <sshPubKeyRecord 
        name=’dummy’ 
        comment=’’ 
        keyType=’2’ 
        encrType=’1’ 
        keySize=’1024’ 
        pubKey=’’ 
        privKey=’’ 
        fingerPrint=’’ 
        fingerPrintRaw=’’ 
        lastModifiedBy=’acmin@console’ 
        lastModifiedDate=’2009-03-05 15:45:01> 
      </sshPubKeyRecord 
  • Modify
    • a) any action that modifies a configuration property
      2009-03-05 15:48:01,acliConsole-admin@console,configuration,modify,
success,public-key, 
      Previous= 
      <?xml version=’1.0’ standalone=’yes’?> 
      <sshPubKeyRecord 
        name=’dummy’ 
        comment=’’ 
        keyType=’2’ 
        encrType=’1’ 
        keySize=’1024’ 
        pubKey=’’ 
        privKey=’’ 
        fingerPrint=’’ 
        fingerPrintRaw=’’ 
        lastModifiedBy=’acmin@console’ 
        lastModifiedDate=’2009-03-05 15:45:01> 
      </sshPubKeyRecord 
      
      New= 
      <?xml version=’1.0’ standalone=’yes’?> 
      <sshPubKeyRecord 
        name=’dummy’ 
        comment=’’ 
        keyType=’2’ 
        encrType=’2’ 
        keySize=’1024’ 
        pubKey=’’ 
        privKey=’’ 
        fingerPrint=’’ 
        fingerPrintRaw=’’ 
        lastModifiedBy=’acmin@console’ 
        lastModifiedDate=’2009-03-05 15:48:01> 
      </sshPubKeyRecord 
  • Delete
    • a) any action that deletes a configuration property
    • b) any action that deletes a file
      2009-03-05 15:51:39,acliConsole-admin@console,configuration,delete,
success,public-key, 
      Element= 
      <?xml version=’1.0’ standalone=’yes’?> 
      <sshPubKeyRecord 
        name=’dummy’ 
        comment=’’ 
        keyType=’2’ 
        encrType=’2’ 
        keySize=’1024’ 
        pubKey=’’ 
        privKey=’’ 
        fingerPrint=’’ 
        fingerPrintRaw=’’ 
        lastModifiedBy=’acmin@console’ 
        lastModifiedDate=’2009-03-05 15:51:39> 
      </sshPubKeyRecord 

Audit Log Format for HTTP Headers

When audit-http is enabled, the SBC logs HTTP requests so administrators can audit which IP address requested what resource.

When logging HTTP headers with detail-level set to brief, the log contains one line per request, and each line contains the following information separated by a comma:
  • Timestamp
  • Source IP and port
  • The literal string "http"
  • The destination IP and port
  • The HTTP request line
  • The HTTP return status
  • The HTTP Referer
  • The HTTP User-Agent
  • All headers (only if detail-level is set to verbose)

Audit Log Samples

Examples of audit log entries may be related to authentication, file access, configuration changes, or http headers.

Authentication

An example of a successful login from the console:

2020-03-27 12:59:57,console-admin@console,security,login,success,authentication,,.

An example of a successful login with SSH:

2020-03-27 13:25:04,ssh-admin@10.0.0.1,security,login,success,keyboard-interactive/pam for admin from 10.0.0.1 port 52687 ssh2,,.

An example of a failed login with SSH:

2020-03-27 10:34:28,ssh-admin@10.0.0.1,security,login,failure,keyboard-interactive/pam for admin from 10.0.0.1 port 51368 ssh2,,.

An example of a successful login with SFTP:

2020-03-27 13:13:30,sftp-admin@10.0.0.1,security,data access,success,".",,.

File Access

An example of successfully accessing a file over SFTP:

2020-03-27 13:56:34,sftp-admin@10.0.0.1,security,create,success,"/opt/logs/syslog" flags READ mode 0666,,.

An example of failing to access a file over SFTP because of the file permissions:

2020-03-27 13:57:26,sftp-admin@10.0.0.1,security,create,failure,"/code/ssh/ssh_host_dsa_key.pub" flags READ mode 0666,,.

An example of successfully deleting a file over SFTP:

2020-03-27 13:34:25,sftp-admin@10.0.0.1,security,delete,success,name "/code/audit/ADMINSEC-audit202003261134",,.

An example of failing to delete a file over SFTP because of the file permissions:

2020-03-27 14:23:00,sftp-admin@10.0.0.1,security,delete,failure,name "/boot/bootloader",,.

An example of failing to delete a directory:

2020-03-27 14:09:51,sftp-admin@10.0.0.1,security,delete,failure,name "/code/ssh/",,.

Configuration Changes

An example of security information:

2020-03-27 13:59:32,console-admin@127.0.0.1:0,configuration,data access,failure,show security ssh-pub-key,,.

An example of saving the configuration:

2020-03-27 14:33:02,console-admin@127.0.0.1:0,configuration,save-config,success,CfgVersion=12,,.

An example of activating the configuration:

2020-03-27 14:33:07,console-admin@127.0.0.1:0,configuration,activate-config,success,RunVersion=12,,.

HTTP Headers

When audit-http is enabled and detail-level is set to brief, the following is an example log from a Web GUI HTTP request:

2019-11-22 12:11:44,10.0.0.1:49026,http,10.0.0.3:81,"POST /egi/acmePacketWebService HTTP/1.1",200,"http://10.0.0.3:81/","Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0",

And the following is an example log from a REST request:

2019-11-22 14:47:29,10.0.0.4:59296,http,10.0.0.3:8443,"POST /rest/v1.0/auth/token HTTP/1.1",200,,"curl/7.29.0",

Configure the Audit Log

The single instance audit-logging configuration element enables, sizes, and locates the audit log within the local file structure. It also specifies the conditions that trigger transfer of the log to one or more SFTP servers.

  1. Access the audit-logging configuration element.
    ORACLE# configure terminal
    ORACLE(configure)# security
    ORACLE(security)# admin-security
    ORACLE(admin-security)# audit-logging
    ORACLE(audit-logging)#
    
  2. state—Enables or disables audit logging.

    Set to enabled to use audit logging. Retain the default value (disabled) to disable the log.

  3. detail-level—Specifies the level of detail associated with audit log entries.

    Retain the default value (brief) to write succinct log entries; use verbose to generate more detailed entries.

  4. audit-trail—Enables logging every command that is successfully processed by the SBC.
    Use enabled to enable the audit logging all successful commands. Retain the default value (disabled) to log only relevant information. The value of state must be set to enabled for audit-trail to work.

    Note:

    When enabled, the SBC logs only commands that the SBC is able to process. For example, if a command is entered incorrectly, it will not be logged.
  5. audit-http—Enables logging HTTP requests.
  6. audit-record-output—Indicates how the SBC logs audit records.
    • syslog—The SBC logs audit records over syslog.
    • file—The SBC logs audit records to a file. This is the default value.
    • both—The SBC logs audit records over both syslog and to a file.
  7. file-transfer-time—Specifies the maximum interval (in hours) between audit-log transfers to a previously-configured SFTP server or servers.

    Allowable values are integers within the range 0 through 65535.

    The value 0 disables time-based-transfer of the audit log. Consequently, upload to an SFTP server is triggered only by exceeding the percentage-based or absolute-size-based thresholds established by the percentage-full and max-file-size properties, or by manual SFTP file transfer performed by a properly privileged admin-level user.

    Retain the default value (720 hours/30 days), or provide an alternate value to trigger time-based-transfer. With time-based-transfer enabled, automatic upload of the audit file to an SFTP server or servers is triggered when the interval decrements to 0. At that time the audit log is transferred, an alarm alerting the recipient to the transfer is generated, and the timer re-sets to its configured value. Assuming the file transfer succeeds, the audit log is deleted. If the file transfer fails, the audit log is retained until it exceeds the value specified by max-storage-space.

    Note:

    The file-transfer-time interval is reset to its configured value with any audit log transfer regardless of cause.
  8. max-storage-space—Specifies the maximum disk space (measured in Megabytes) available for audit log storage.

    Allowable values are integers within the range 1 through 32.

    Allocate space for the audit log by retaining the default value, or by selecting a new value from within the allowable range.

  9. percentage-full—Specifies a file size threshold (expressed as a percentage of max-storage-space) that triggers audit file transfer to a previously-configured SFTP server or servers.

    Allowable values are integers within the range 0 through 99.

    The value 0 disables percentage-based-transfer of the audit log. Consequently, upload to an SFTP server is triggered only by exceeding the time-based and absolute-size-based thresholds established by the file-transfer-time and max-file-size properties, or by manual SFTP file transfer performed by a properly privileged admin-level user.

    Retain the default value (75 percent), or provide an alternate value to trigger percentage-based-transfer. With percentage-based-transfer enabled, automatic upload of the audit file to an SFTP server or servers is triggered when audit log size exceeds the value max-storage-space x (percentage-full/100). At that time the audit log is transferred, and an alarm alerting the recipient to the transfer is generated. Assuming the file transfer succeeds, the audit log is deleted. If the file transfer fails, the audit log is retained until it exceeds the value specified by max-storage-space.

  10. max-file-size—Specifies a file size threshold (expressed as an absolute file size measured in Megabytes) that triggers audit file transfer to a previously-configured SFTP server or servers.

    Allowable values are integers within the range 0 through 10.

    The value 0 disables absolute-size-based-transfer of the audit log. Consequently, upload to an SFTP server is triggered only by exceeding the time-based and percentage-based thresholds established by the file-transfer-time and percentage-full properties, or by manual SFTP file transfer performed by a properly privileged admin-level user.

    Retain the default value (5 Megabytes), or provide an alternate value to trigger absolute-size-based-transfer. With absolute-size-based-transfer enabled, automatic upload of the audit file to an SFTP server or servers is triggered when audit log size exceeds the value max-file-size. At that time the audit log is transferred and an alarm alerting the recipient to the transfer is generated. Assuming the file transfer succeeds, the audit log is deleted. If the file transfer fails, the audit log is retained until it exceeds the value specified by max-storage-space.

  11. storage-path—Specifies the directory that houses the audit log.

    Retain the default value (/code/audit), or identify another local directory.

  12. Type done to save your configuration.

Example 1-1 Example Configuration

A sample audit log configuration appears below:

ORACLE(audit-logging)# state enabled
ORACLE(audit-logging)# file-transfer-time 1
ORACLE(audit-logging)# percentage-full 0
ORACLE(audit-logging)# max-file-size 0
ORACLE(audit-logging)# audit-http enabled

This configuration allocates 32MB (the default value) for audit logging HTTP headers in brief mode. Audit log transfer to a configured SFTP server or servers occurs on an hourly schedule; other transfer triggers are disabled.

Configure SFTP Audit Log Transfer

Prior to using SFTP-enabled file transfer, import a copy of the SFTP server’s host key as a known host on the SBC. Then export the SBC's public key and add it to the authorized_keys file of the SFTP server.

  1. Add the SBC's public key to the authorized_keys file on the SFTP server.
    1. SSH to the SBC.
    2. Run the show security public-host-key rsa command.
      ADMINSEC# show security public-host-key rsa
      OpenSSH rsa public-key: 2048 SHA256:pslVj6X0Qau3AAKRpBr0T7WrT199/MEcmnbLClVl4BU root@ADMINSEC (RSA)
      
      ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjKIoiW4r7g+laRMK/Ib+SjKSMZWeBYLJaVj/VAX+UtNxfw63MOmsgIVzMc29YAap1YQ6EL18BT6i9nYhRO/RNGCBI3GoQEB1R8fEQxuWcVENzcE5LZewVi/rQt4r/pNMiOKx0ftAXiy9RKIIoNdu3+CcjJqDp4noq/KM9puN0P+08GMCLKZKq4u8o1umIzc4zeaqDxpXNLRSLuEh2qMlxXvu5R8JFhW1Afr9q6BUwJvROg2c8q3B+V3Pmo+mFIZZXLdjqytU2jZHpA0hrY7SUz5gjMRqxEuae1VmLRBs+aosb5u6G7l1iO1rOUWrjqfcyAJV4KRJTsi+NfM3vIKGH root@ADMINSEC
      ADMINSEC#
    3. Copy the last line of output that begins with ssh-rsa.
    4. SSH to the SFTP server.
    5. Append the copied public key to the .ssh/authorized_keys file.
      echo '[paste public key here]' >> .ssh/authorized_keys

      For example:

      echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjKIoiW4r7g+laRMK/Ib+SjKSMZWeBYLJaVj/VAX+UtNxfw63MOmsgIVzMc29YAap1YQ6EL18BT6i9nYhRO/RNGCBI3GoQEB1R8fEQxuWcVENzcE5LZewVi/rQt4r/pNMiOKx0ftAXiy9RKIIoNdu3+CcjJqDp4noq/KM9puN0P+08GMCLKZKq4u8o1umIzc4zeaqDxpXNLRSLuEh2qMlxXvu5R8JFhW1Afr9q6BUwJvROg2c8q3B+V3Pmo+mFIZZXLdjqytU2jZHpA0hrY7SUz5gjMRqxEuae1VmLRBs+aosb5u6G7l1iO1rOUWrjqfcyAJV4KRJTsi+NfM3vIKGH root@ADMINSEC' >> .ssh/authorized_keys
    6. Set the correct permissions for the authorized_keys file.
      chmod 600 .ssh/authorized_keys
  2. Import the SFTP server's host key into the SBC.
    1. SSH to the SFTP server.
    2. Print the host key in RFC 4716 format.
      [user@logserver ~]$ ssh-keygen -ef /etc/ssh/ssh_host_rsa_key.pub
      ---- BEGIN SSH2 PUBLIC KEY ----
      Comment: "2048-bit RSA, converted by user@logserver from OpenSSH"
      AAAAB3NzaC1yc2EAAAADAQABAAABAQDJXglzdoOfZ39TiU7jhywifpOpBKoDhzgbPGQTw0
      qIgcI3T8J6n0jHwgZIlRtD0e5y6YBzDksvwKttObk8SSiTVB1PzMNxF0dWVoZl1mqE4xPX
      j3zEVw1hBISW57PRbSulHwaiHN7ieYT/qJwZZc6nrQ56JH9Lcjej1JX96QCX6iHplfhJO4
      oHWs5mDybHNnSvU64F1AMBRjLbZrclvvt8vofIzraGIUzxVse5NMYl8bbdId/4UBci1fON
      rgvGKRhnmqFbV227PsOfPLy80p7IpL3RIhMzejbyhEK+e0KW7a+T6mAoq8UdGe3F9i1g49
      PwNPS1/LONj0cjvcKUgQxN
      ---- END SSH2 PUBLIC KEY ----
      [user@logserver ~]$
    3. SSH to the SBC.
    4. Import the SFTP server's host key as a known host. For SFTP push to work properly, the <name> parameter must be the IP address or hostname of the SFTP server.
      ADMINSEC# ssh-key known-host import logserver
      IMPORTANT:
      Please paste SSH public key in the format defined in RFC 4716.
      Terminate the key with ";" to exit.......
      ---- BEGIN SSH2 PUBLIC KEY ----
      Comment: "2048-bit RSA, converted by user@logserver from OpenSSH"
      AAAAB3NzaC1yc2EAAAADAQABAAABAQDJXglzdoOfZ39TiU7jhywifpOpBKoDhzgbPGQTw0
      qIgcI3T8J6n0jHwgZIlRtD0e5y6YBzDksvwKttObk8SSiTVB1PzMNxF0dWVoZl1mqE4xPX
      j3zEVw1hBISW57PRbSulHwaiHN7ieYT/qJwZZc6nrQ56JH9Lcjej1JX96QCX6iHplfhJO4
      oHWs5mDybHNnSvU64F1AMBRjLbZrclvvt8vofIzraGIUzxVse5NMYl8bbdId/4UBci1fON
      rgvGKRhnmqFbV227PsOfPLy80p7IpL3RIhMzejbyhEK+e0KW7a+T6mAoq8UdGe3F9i1g49
      PwNPS1/LONj0cjvcKUgQxN
      ---- END SSH2 PUBLIC KEY ----
      SSH public key imported successfully....
      WARNING: Configuration changed, run "save-config" command to save it
      and run "activate-config" to activate the changes
      ADMINSEC#
    5. Save and activate the configuration.

Configuring SFTP Servers

The multi-instance push-receiver configuration element identifies remote SFTP servers that receive audit log transfers.

  1. Access the audit-logging configuration element.
    ORACLE# configure terminal
    ORACLE(configure)# security
    ORACLE(security)# admin-security
    ORACLE(admin-security)# audit-logging
    ORACLE(audit-logging)# push-receiver
    ORACLE(push-receiver)#
    
  2. Select the push-receiver object to edit.
    ORACLE(push-receiver)# select
    <server>:<port>:
    1: 192.168.54.55:22 server = 192.168.54.55, port = 22
    
    selection: 1
    ORACLE(push-receiver)#
  3. server—In conjunction with port, specifies an SFTP server IP address:port pair.

    Provide the IP address of an SFTP server that receives transferred audit logs. For example,

    ORACLE(push-receiver)# server 10.0.2.100
    ORACLE(push-receiver)# 
  4. port—In conjunction with server, specifies an SFTP server IP address:port pair.

    Provide the port number monitored by server for incoming audit log transfers. This parameter defaults to port 22, the well-known Secure Shell (SSH) port. Retain the default value, or identify the monitored port with an integer within the range from 1 through 65535.

    ORACLE(push-receiver)# port 22
    ORACLE(push-receiver)# 
  5. remote-path—Specifies the absolute file path to the remote directory that stores transferred audit log files.
    ORACLE(push-receiver)# remote-path /home/acme/auditLogs
    ORACLE(push-receiver)# 
  6. filename-prefix—Specifies an optional prefix that can be appended to the audit log file name when transferred to an SFTP server.
    ORACLE(push-receiver)# filename-prefix sbc01-
    ORACLE(push-receiver)# 
  7. auth-type—Specifies the authentication type required by this remote SFTP server.

    Two authentication types are supported: simple password or public keys.

    Refer to SSH Configuration for more information on SSH authentication.

    Enter either password (the default) or public-key. For example:

    ORACLE(push-receiver)# auth-type public-key
    ORACLE(push-receiver)# 
  8. username—Specifies the username used to authenticate to this SFTP server.
    ORACLE(push-receiver)# username acme
    ORACLE(push-receiver)# 
  9. password—Specifies the password used in conjunction with username to authenticate the SSH client to this SFTP server.

    Required when auth-type is password, and otherwise ignored.

    ORACLE(push-receiver)# password =yetAnotherPW!
    ORACLE(push-receiver)# 
  10. public-key—Leave blank, regardless of authentication type.
  11. Type done to save your configuration.

Audit Log Alarms and Traps

Three audit log alarms and traps are provided to report significant or anomalous audit log activity.

The ALARM_AUDIT_LOG_FULL trap/alarm is generated in response to (1) the expiration of the file-transfer-time interval, (2) the crossing of the percentage-full threshold, or (3) the crossing of the max-file-size threshold. This trap/alarm is cleared when storage apace becomes available, generally upon successful transfer of the audit log to a remote SFTP server or servers.

The ALARM_ADMIN_AUDIT_PUSH_FAIL trap/alarm is generated in response to failure to transfer the audit log to a designated SFTP server. This trap/alarm is cleared when a subsequent transfer to the same recipient succeeds.

The ALARM_AUDIT_WRITE_FAILED trap/alarm is generated in response to failure to record an auditable event in the audit log. This trap/alarm is cleared when a subsequent write succeeds.

Configure Login Timeouts

Use the ssh-config configuration element to set the SSH and TCP timeout values.
  1. Access the ssh-config element.
    ORACLE# configure terminal
    ORACLE(configure)# security
    ORACLE(security)# admin-security
    ORACLE(admin-security)# ssh-config
    ORACLE(ssh-config)#
  2. rekey-interval—Set the time in minutes after which the SBC rekeys an SSH or SFTP session.
    • Min: 60
    • Max: 600
    • Default: 60
  3. rekey-byte-count—Set the number of bytes transmitted, in powers of 2, before rekeying an SSH or SFTP session.
    For example, entering a value of 24 sets this parameter to 2^24 (16777216) bytes.
    • Min: 20
    • Max: 31
    • Default: 31
  4. proto-neg-time—Set the time in seconds to complete the SSH protocol negotiation, establishing the secure connection.
    • Min: 30
    • Max: 60
    • Default: 60
  5. keep-alive-enable—Enable the TCP keepalive timer. Valid Values are:
    • enabled | disabled
    • Default: enabled
  6. keep-alive-idle-timer—Set the interval in seconds between the last data packet sent and the first keepalive probe.
    • Min: 15
    • Max: 1800
    • Default: 15
  7. keep-alive-interval—Set the interval in seconds between two successful keepalive transmissions.
    • Min: 15
    • Max: 120
    • Default: 15
  8. keepalive-retries—Set the number of retransmission attempts before the SBC declares the remote end is unavailable.
    • Min: 2
    • Max: 10
    • Default: 2
  9. Type done to save the configuration.