|
5 | 5 | [](https://opensource.org/licenses/Apache-2.0) |
6 | 6 | [](https://codecov.io/gh/ncode/vault-audit-filter) |
7 | 7 |
|
8 | | -`vault-audit-filter` is a Go-based tool designed to filter and log HashiCorp Vault audit logs based on configurable rules. It provides fine-grained control over how Vault audit events are processed and categorized, allowing you to capture critical events while reducing noise from routine operations. |
| 8 | +`vault-audit-filter` is designed to filter and log HashiCorp Vault audit logs based on configurable rules. It provides fine-grained control over how Vault audit events are processed and categorized, allowing you to capture critical events while reducing noise from routine operations. |
9 | 9 |
|
10 | 10 | ## Features |
11 | 11 |
|
@@ -33,7 +33,7 @@ These instructions will help you set up and run `vault-audit-filter` on your loc |
33 | 33 |
|
34 | 34 | ### Prerequisites |
35 | 35 |
|
36 | | -- **Go**: Ensure you have Go 1.22.3 or later installed. You can download it here: <https://golang.org/dl/> |
| 36 | +- **Go**: Ensure you have Go 1.25.5 or later installed. You can download it here: <https://golang.org/dl/> |
37 | 37 | - **Vault**: You should have HashiCorp Vault installed and configured. Instructions can be found here: <https://www.vaultproject.io/docs/install> |
38 | 38 |
|
39 | 39 | ### Installation |
@@ -143,16 +143,34 @@ Rules are written using the `expr` language, a simple and safe expression langua |
143 | 143 |
|
144 | 144 | ## Usage |
145 | 145 |
|
146 | | -To run `vault-audit-filter` with your configuration file, use: |
| 146 | +`vault-audit-filter` provides two subcommands: |
| 147 | + |
| 148 | +### Setup Vault Audit Device |
| 149 | + |
| 150 | +Configure Vault to send audit logs to this service: |
| 151 | + |
| 152 | +```bash |
| 153 | +./vault-audit-filter setup --config config.yaml |
| 154 | +``` |
| 155 | + |
| 156 | +### Start the Audit Server |
| 157 | + |
| 158 | +Start the UDP server to receive and filter Vault audit logs: |
147 | 159 |
|
148 | 160 | ```bash |
149 | | -$ ./vault-audit-filter --config config.yaml |
| 161 | +./vault-audit-filter auditServer --config config.yaml |
150 | 162 | ``` |
151 | 163 |
|
152 | 164 | ### Command-Line Options |
153 | 165 |
|
154 | | -- `--config`: Specify the path to the configuration file (default is `config.yaml`). |
155 | | -- `--log-level`: Set the logging level (`debug`, `info`, `warn`, `error`). |
| 166 | +**Global flags:** |
| 167 | + |
| 168 | +- `--config`: Specify the path to the configuration file (default is `$HOME/.vault-audit-filter.yaml`). |
| 169 | +- `--vault.address`: Vault server address (default: `http://127.0.0.1:8200`). |
| 170 | +- `--vault.token`: Vault authentication token. |
| 171 | +- `--vault.audit_path`: Path for the Vault audit device (default: `/vault-audit-filter`). |
| 172 | +- `--vault.audit_address`: Address for receiving audit logs (default: `127.0.0.1:1269`). |
| 173 | +- `--vault.audit_description`: Description for the Vault audit device. |
156 | 174 |
|
157 | 175 | ### Environment Variables |
158 | 176 |
|
|
0 commit comments