The auditing capability of the Grey Matter Sidecar enables observability for all events within Grey Matter Fabric. This tutorial will guide you through a few easy steps to add an audit trail for your Fabric service.
Prerequisites
To complete this tutorial, you’ll need an understanding of, and local access to the following environments and tools:
Unix/Linux setup
Microservices and mesh architecture
Grey Matter Sidecar - v0.7.2 +
Grey Matter xDS
Docker () - v17.03 and newer
Docker Compose ()
Kafka - v2.12-0 - 10.2.1
Step 1: Add Kafka to the Sidecar
Since the Sidecar will emit events into Kafka to be collected as the user wants, you will need to set up Kafka in Fabric. To emit a full GEM payload into Kafka, add the following environment variables to the hello-service-proxy section of the docker-compose.yml file.
Once you have made these changes, proceed to step 2.
Step 2: Add Kafka to Fabric
You'll need to add Kafka to Fabric so Kafka can start tracking audits and push them to Fabric. To add Kafka to Fabric, add the following code to the docker-compose-yml file:
Once you have added Kafka to Fabric, proceed to Step 3.
Step 3: Test Audit Event Results
Now verify that the audit trails work. Anytime someone visits a route that goes to the hello-service, the hello-service-proxy will emit an audit event in Kafka that says that something happened.