Auditing Ops Manager User Activity

Page last updated:

This topic describes how operators can audit the activity of Pivotal Operations Manager users. The sections in this topic define the relevant logs for auditing user activity and describe how to access and forward the logs.

Overview

You can audit Ops Manager user activity to help improve security practices for your Pivotal Platform environment. Auditing user activity also helps you ensure that your environment is compliant with existing security standards.

For example, you can view the timestamp of any requests made in the Ops Manager UI as well as the username of the user that made the request.

You can find relevant information for auditing user activity in Ops Manager in the following Ops Manager logs:

Access Logs on the Ops Manager VM

You can access logs for auditing user activity by logging on to the Ops Manager VM using SSH.

To access logs for auditing user activity, do the following:

  1. SSH onto the Ops Manager VM using your private SSH key.

  2. Navigate to the location of the logs and open or preview the log file. For example, to view the audit_log.txt file, run the following command:

    cat /var/log/opsmanager/audit_log.txt
    

Logs for Auditing User Activity

The following table describes the types of user actions that you can audit with logs. The table also lists the location of the logs.

For information about how to access the logs in the following table, see Access Logs on the Ops Manager VM.

User Action Description Location of Logs Example Log Trace
SSH Logins User logs onto the Ops Manager VM with SSH. /var/log/auth.log 2019-06-20T21:58:50.864147+00:00 HOSTNAME sshd[18028]: Accepted publickey for USERNAME from IPADDRESS port PORT ssh2: RSA SHA256:SIGNATURE 2019-06-20T21:58:50.865750+00:00 HOSTNAME sshd[18028]: pam_unix(sshd:session): session
UAA Logins User logs into Ops Manager through UAA. /home/tempest-web/uaa/
tomcat/logs/uaa.log
[2019-08-01 07:57:45.830] uaa - 5320 [http-nio-127.0.0.1-8080-exec-7] .... INFO --- Audit: IdentityProviderAuthenticationSuccess ('admin'): principal=1df75be4-7875-4e7e-97fa-fe76dbff4a41, origin=[remoteAddress=127.0.0.1, sessionId=], identityZoneId=[uaa], authenticationType=[uaa] [2019-08-01 07:57:45.832] uaa - 5320 [http-nio-127.0.0.1-8080-exec-7] .... INFO --- Audit: UserAuthenticationSuccess ('admin'): principal=1df75be4-7875-4e7e-97fa-fe76dbff4a41, origin=[remoteAddress=127.0.0.1, sessionId=], identityZoneId=[uaa] ...
Failed UAA Logins User makes failed login attempt through UAA. /home/tempest-web/uaa/
tomcat/logs/uaa.log
[2019-07-31 23:13:48.437] uaa - 1184 [http-nio-127.0.0.1-8080-exec-5] .... INFO --- Audit: IdentityProviderAuthenticationFailure ('admin'): principal=null, origin=[remoteAddress=209.234.137.222, sessionId=], identityZoneId=[uaa], authenticationType=[uaa] [2019-07-31 23:13:48.438] uaa - 1184 [http-nio-127.0.0.1-8080-exec-5] .... INFO --- Audit: UserAuthenticationFailure ('admin'): principal=2bdf7f2a-862d-47d7-bf7f-ba92da6850c0, origin=[remoteAddress=209.234.137.222, sessionId=], identityZoneId=[uaa] ...
User Requests User makes requests in the Ops Manager app. The audit_log.txt file includes metadata about user requests in the Ops Manager app. /var/log/opsmanager/
audit_log.txt
See Ops Manager Audit Logs Text File for information about the properties in the audit_log.txt file.

Audit Logs Text File

The Ops Manager audit_log.txt file includes metadata about actions taken by users in the Ops Manager app in JSON format.

The following is an example of the content in the audit_log.txt file:

{
    "timestamp":"2019-07-13T00:43:08.783+00:00",
    "component":"Ops Manager 2.7.0-build.87",
    "component_scheme":"https",
    "component_host":"pcf.example.opsmanager.cf-app.com",
    "component_port":443,
    "result":200,
    "target":"/proxy_settings",
    "event_type":"PUT",
    "origination":"123.456.789",
    "user_identification":"admin",
    "uaa_authentication_mechanism":"uaa",
    "request_body":{ 
        "authenticity_token":"[FILTERED]",
        "proxy_settings":{ 
            "http_proxy":"http://example.com",
            "https_proxy":"https://example.com",
            "no_proxy":"1.2.3.4"
        }   
    }
}   

The following table describes the properties in the audit_log.txt file. It also provides example values for each property.

User Action Property Description Example Value
user_identification The username or client ID that submitted a request. admin
uaa_authentication_mechanism The authentication method used to make the request.

(unauthenticated) for unauthenticated requests, uaa for a UAA user login, or client_authenticated for an API-only client.
uaa
origination The IP address that made the request to the server. 198.10.1.25
timestamp The time that the server received the request. 2019-07-21 08:34:00
target The relative URL path associated with the request. /infrastructure/director/resource_config/edit
event_type The HTTP verb associated with the request. GET
result The HTTP response code associated with the request.

Results beginning with 2 indicate a successful request. Results beginning with 4 indicate a failed request due to user error. Results beginning with 5 indicate a server error.
200
component The version of Ops Manager on which the request was made. Ops Manager 2.7.0-build.234
component_scheme The transport protocol used for the request. HTTPS
component_host The domain name used for the request. pcf.my-ops-manager.com
component_port The port used for the request. 443
request_body A JSON object that contains the contents of the query paramaters, request body, and routing parameters for the request. Any credentials sent within the request are replaced with the value [FILTERED]. Any file uploads are excluded. { "authenticity_token": "[FILTERED]", "director_configuration": { "ntp_servers_string": "ntp-server", "encryption": { "keys": "[FILTERED]" }, "blobstore_type": "local" } }

Forward Logs

You can forward some Ops Manager logs using syslog forwarding. This allows you to forward logs to a syslog server or other third-party destination for storage and analysis.

The following logs contain relevant information for auditing user activity and can be forwarded using syslog forwarding:

  • audit_log.txt
  • uaa.log
  • uaa_events.logs

When syslog forwarding is enabled, Ops Manager automatically forwards BOSH Director access events. These events allow you to audit BOSH Director access and the execution of BOSH CLI commands. For more information about BOSH Director access events, see Logging API Access in BOSH Documentation.

For more information about syslog forwarding in Ops Manager, see the Syslog section in the Using the Ops Manager Interface topic.