Skip to content

Commit 0755295

Browse files
authored
Merge pull request #9 from ncode/juliano/readme
fix: update readme and root.go
2 parents f7acb11 + 44eaa66 commit 0755295

File tree

2 files changed

+32
-16
lines changed

2 files changed

+32
-16
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
66
[![codecov](https://codecov.io/gh/ncode/vault-audit-filter/graph/badge.svg?token=PTW9OYF19R)](https://codecov.io/gh/ncode/vault-audit-filter)
77

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.
99

1010
## Features
1111

@@ -33,7 +33,7 @@ These instructions will help you set up and run `vault-audit-filter` on your loc
3333

3434
### Prerequisites
3535

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/>
3737
- **Vault**: You should have HashiCorp Vault installed and configured. Instructions can be found here: <https://www.vaultproject.io/docs/install>
3838

3939
### Installation
@@ -143,16 +143,34 @@ Rules are written using the `expr` language, a simple and safe expression langua
143143

144144
## Usage
145145

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:
147159

148160
```bash
149-
$ ./vault-audit-filter --config config.yaml
161+
./vault-audit-filter auditServer --config config.yaml
150162
```
151163

152164
### Command-Line Options
153165

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.
156174

157175
### Environment Variables
158176

cmd/root.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,14 @@ var cfgFile string
3535
// rootCmd represents the base command when called without any subcommands
3636
var rootCmd = &cobra.Command{
3737
Use: "vault-audit-filter",
38-
Short: "A brief description of your application",
39-
Long: `A longer description that spans multiple lines and likely contains
40-
examples and usage of using your application. For example:
41-
42-
Cobra is a CLI library for Go that empowers applications.
43-
This application is a tool to generate the needed files
44-
to quickly create a Cobra application.`,
45-
// Uncomment the following line if your bare application
46-
// has an action associated with it:
47-
// Run: func(cmd *cobra.Command, args []string) { },
38+
Short: "Filter and log HashiCorp Vault audit logs based on configurable rules",
39+
Long: `vault-audit-filter is a tool designed to filter and log HashiCorp Vault
40+
audit logs based on configurable rules. It provides fine-grained control over
41+
how Vault audit events are processed and categorized, allowing you to capture
42+
critical events while reducing noise from routine operations.
43+
44+
Use 'setup' to configure Vault to send audit logs to this service.
45+
Use 'auditServer' to start the UDP server that receives and filters logs.`,
4846
}
4947

5048
// Execute adds all child commands to the root command and sets flags appropriately.

0 commit comments

Comments
 (0)