This topic describes how operators can audit the activity of VMware Tanzu Operations Manager (Ops Manager) users. The sections in this topic define the relevant logs for auditing user activity and describe how to access and forward the logs.
You can audit Ops Manager user activity to help improve security practices in your 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 and 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:
SSH login logs. For more information, see Logs for Auditing User Activity.
UAA login and failed UAA login logs. For more information, see Logs for Auditing User Activity.
The Ops Manager audit_log.txt
file. For more information, see Audit Logs Text File.
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:
SSH onto the Ops Manager VM using your private SSH key. For more information, see Log Into the Ops Manager VM.
Navigate to the location of the logs and open or preview the log file. For example, to view the audit_log.txt
file, run:
cat /var/log/opsmanager/audit_log.txt
The table below describes the types of user actions that you can audit with logs, and the location of the logs.
For information about how to access the logs in this table, see Access Logs on the Ops Manager VM.
User Action | Description | Location of Logs | Example Log Trace |
---|---|---|---|
SSH logins | User logs on to 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 in to Ops Manager through UAA. | /home/tempest-web/uaa/ |
[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=
|
Failed UAA logins | User makes failed login attempt through UAA. | /home/tempest-web/uaa/ |
[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=
|
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/ |
For information about the properties in the audit_log.txt file, see Ops Manager 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 shows 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 table below describes the properties in the audit_log.txt
file and 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.ops-manager-domain.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" } } |
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.
These 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 the BOSH documentation.
For more information about syslog forwarding in Ops Manager, see Syslog in Using the Ops Manager Interface.