Auditing Secure Tunnel
You can check Secure Tunnel configuration changes, such as tunnel connection or application mapping configuration changes for auditing.
How to audit Secure Tunnel
Go to Administration > Secure Tunnel on IBM Cloud Pak for Watson AIOps console. You see the Audit operations and Audit traffic tabs.
-
In the Audit operations tab, you can see the operation logs, such as deleting a connection or creating a connection. You can filter the logs by changing the start time and end time in the Start time and End time fields. Note: You can click the Operation details column to see more about the tunnel operation.
-
In the Audit traffic tab, the tunnel
open/close
connection events are listed, and a totalsend/receive
data amount for the specific connection is listed in theclose
event. You can filter the logs by changing the start time and end time in the Start time and End time fields.
Configuring Secure Tunnel audit logs
Secure Tunnel can send audit logs to its container log, a MongoDB database, and a remote syslog server. By default, Secure Tunnel sends audit logs to its container log, and thus you can't see audit logs on the Secure Tunnel console. To check audit logs on the Secure Tunnel console, you need to send audit logs to MongoDB. To check audit logs on the query user interface of a specific syslog, you need to send audit logs to the remote syslog server.
Configuring with the operator UI when creating a Secure Tunnel installation
-
When you create the Secure Tunnel instance from your OpenShift console, click Operators > Installed Operators.
-
From the Project dropdown menu, select the project that you want to create the Secure Tunnel instance in. Use the project that you created earlier in Create a Secure Tunnel project (namespace).
-
Select IBM Secure Tunnel operator.
-
Click Create Installation on the Tunnel box. The default Form View is displayed. Edit the Audit logs to configure the audit log receivers of the Secure Tunnel:
-
Show audit logs in the container log: If the Secure Tunnel should send audit logs to its container log(the pod terminal).
-
Audit Receiver: to add a MongoDB audit log receiver or a Syslog audit log receiver
- Click the MongoDB receiver > Add MongoDB receiver button. To add a MongoDB audit log receiver > click MongoDB Information. Enter the following values:
-
Receiver name: The name of the MongoDB receiver, it's the unique name of the audit log receiver. for example:
mongodb-receiver-1
. -
TLS Secret: if you want the MongoDB to support TLS, you should create a TLS Kubernetes secret for the MongoDB TLS certification, and enter the k8s secret name to here. the Kubernetes secret should be in the Secure Tunnel namespace and contain the "ca.crt", "tls.crt" and "tls.key" of the mongoDB TLS. TLS secret example:
kind: Secret apiVersion: v1 metadata: name: mongodb-tls-certificate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
mongodb-audit-log-receiver-1
-
Adress: The MongoDB receiver address. For example:
<IP or hostname>:27017
-
MongoDB log in Username, Password Secret:
-
By default, MongoDB does not require a username and password to access, but it can be enabled by configuring the authentication. If the MongoDB has a username and password, you should create a Kubernetes secret that contains
user: <MongoDB username>
andpassword: <MongoDB password>
in the Secure Tunnel namespace, then enter the secret name here.Kubernetes secret example:
kind: Secret apiVersion: v1 metadata: name: mongodb-credential namespace: tunnel-stand-alone data: password: YmJiYg== user: YWFhYQ== type: Opaque
-
-
- Click Syslog receiver > Add Syslog receiver to add a Syslog audit log receiver, Enter the following values:
- Receiver name: the name of the Syslog receiver. It's a unique name of the audit log receiver. for example:
syslog-receiver-1
. - Address: The syslog server address. for example:
<IP or hostname>:5514
- Receiver name: the name of the Syslog receiver. It's a unique name of the audit log receiver. for example:
- Click the MongoDB receiver > Add MongoDB receiver button. To add a MongoDB audit log receiver > click MongoDB Information. Enter the following values:
Configuring YAML to update the existing Tunnel instance
-
From the Openshift console, click Operators > Installed Operators.
- From the Project dropdown menu, select the project that you created the Secure Tunnel instance in.
- Click the IBM Secure Tunnel > Tunnel tab > click the existing sre-tunnel instance > change to YAML tab.
-
To make Secure Tunnel send audit logs to its container log, the YAML file that open in the step 1 should be as follows:
spec: ... showInContainerLog: true ...
-
To make Secure Tunnel send audit logs to MongoDB, configure the YAML as follows:
spec: ... auditReceiver: mongoDB: - mongoAddress: mongoAddress: '<IP or hostname that the MongoDB running in>:27017' mongoDatabaseName: secure-tunnel-001 name: mongodb-audit-log passwordSecretName: <The name of the Kubernetes secret that saved the MongoDB username and password> tlsSecret: <The name of the Kubernetes secret that saved the SSL certificate of the MongoDB service> ...
-
To make Secure Tunnel send audit logs to a remote syslog server, configure the YAML as follows:
spec: ... auditReceiver: syslog: - name: syslog syslogAddress: '<IP or hostname that the Syslog service running in>:5514' ...
Tip: It's easier to configure the audit log with the Configuring with the operator UI when create Secure Tunnel Installation method, so you can configure it from there, then switch to the YAML view and obtain the configuration yaml, then update the existing Secure Tunnel instance yaml to configure the audit log.