Skip to content

Commit

Permalink
clean up sample log in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Sep 12, 2017
1 parent c4a739a commit 873b124
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@ audit2rbac is in the nascent stages of development, and will change internal and
* `v1alpha1` or `v1beta1` audit events are supported.
* The `Metadata` log level works best to minimize log size.
* To exercise all API calls, it is sometimes necessary to grant broad access to a user or application to avoid short-circuiting code paths on failed API requests. This should be done cautiously, ideally in a development environment.
* A ([sample log](testdata/demo.log)) containing requests from `alice`, `bob`, and the service account `ns1:sa1` is available.
* A [sample log](testdata/demo.log) containing requests from `alice`, `bob`, and the service account `ns1:sa1` is available.
2. Identify a specific user you want to scan for audit events for and generate roles and role bindings for:
* Specify a normal user with `--user <username>`
* Specify a service account with `--serviceaccount <namespace>:<name>`
3. Run `audit2rbac`, capturing the output:
```sh
curl -s -O -L https://github.com/liggitt/audit2rbac/raw/master/testdata/demo.log
audit2rbac --filename demo.log --user alice > alice-roles.yaml
audit2rbac --filename demo.log --user bob > bob-roles.yaml
audit2rbac --filename demo.log --serviceaccount ns1:sa1 > sa1-roles.yaml
audit2rbac -f https://git.io/v51iG --user alice > alice-roles.yaml
audit2rbac -f https://git.io/v51iG --user bob > bob-roles.yaml
audit2rbac -f https://git.io/v51iG --serviceaccount ns1:sa1 > sa1-roles.yaml
```
4. Inspect the output to verify the generated roles/bindings:
```sh
Expand Down

0 comments on commit 873b124

Please sign in to comment.