You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-2Lines changed: 53 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,8 @@
13
13
-**Dynamic Logging**: Log audit events to specified files with log rotation and size limits.
14
14
-**Supports Multiple Operations**: Filters common Vault operations, including KV operations, metadata updates, and deletion events.
15
15
-**Performance-Oriented**: Built with `gnet` to handle high concurrency.
16
+
-**Flexible Forwarding**: Forward filtered audit logs to specified UDP addresses for further processing or monitoring.
17
+
-**Messaging Integration**: Send notifications about matched audit logs to messaging platforms like Mattermost.
16
18
17
19
## Table of Contents
18
20
@@ -30,7 +32,7 @@ These instructions will help you set up and run `vault-audit-filter` on your loc
30
32
31
33
### Prerequisites
32
34
33
-
-**Go**: Ensure you have Go 1.21 or later installed. You can download it here: <https://golang.org/dl/>
35
+
-**Go**: Ensure you have Go 1.22.3 or later installed. You can download it here: <https://golang.org/dl/>
34
36
-**Vault**: You should have HashiCorp Vault installed and configured. Instructions can be found here: <https://www.vaultproject.io/docs/install>
35
37
36
38
### Installation
@@ -54,7 +56,7 @@ Once you have built the project, you can run the `vault-audit-filter` executable
54
56
55
57
## Configuration
56
58
57
-
`vault-audit-filter` uses a YAML-based configuration file that allows you to define rule groups, specify logging files, and configure Vault settings.
59
+
`vault-audit-filter` uses a YAML-based configuration file that allows you to define rule groups, specify logging files, configure Vault settings, set up forwarding options, and configure messaging integration.
58
60
59
61
### Sample Configuration (`config.yaml`)
60
62
@@ -75,6 +77,12 @@ Once you have built the project, you can run the `vault-audit-filter` executable
To run the test suite for `vault-audit-filter`, use the following command:
168
+
169
+
```bash
170
+
go test -v ./...
171
+
```
172
+
173
+
For running tests with race condition detection:
174
+
175
+
```bash
176
+
go test -race -v ./...
177
+
```
178
+
179
+
To run a specific test, such as the concurrent forwarding test:
180
+
181
+
```bash
182
+
go test -v -run TestUDPForwarder_ConcurrentForwarding ./pkg/forwarder
183
+
```
184
+
185
+
To generate a test coverage report:
186
+
187
+
```bash
188
+
go test -v -coverprofile=coverage.out ./...
189
+
go tool cover -html=coverage.out
190
+
```
191
+
142
192
### Development
143
193
144
194
For development purposes, you can use the provided Makefile located at `configs/development/Makefile` to build and run the project using Docker and Docker Compose. This is how I test my changes and have a playground of sorts.
@@ -151,6 +201,7 @@ Before submitting a pull request, ensure that:
151
201
- The code compiles without errors.
152
202
- All tests pass.
153
203
- Your changes are well-documented.
204
+
- You've added or updated tests to cover your changes.
0 commit comments