Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
gertd committed Aug 12, 2024
1 parent 055dc0a commit 63f7d8b
Show file tree
Hide file tree
Showing 6 changed files with 1,972 additions and 1,568 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,51 @@

Converts directory check assertions into authorizer check_decision assertions

## Usage

```
Usage: check2decision [flags]
converts directory check assertions into authorizer check_decision assertions
Flags:
-h, --help Show context-sensitive help.
-i, --input=STRING assertions file path
-o, --output=STRING decisions file path
--policy-name="policy-rebac" policy name
--policy-path="rebac.check" policy package path
--policy-rule="allowed" policy rule name
--identity-type="sub" identity type (sub|jwt|manual|none)
--stdin read input from StdIn
--version version info
```

## Example

Install the gdrive template using:

```
topaz templates install gdrive --force
```

Execute directory check assertions

```
topaz ds test exec $(topaz config info config.topaz_tmpl_dir -r)/gdrive/assertions/gdrive_assertions.json
```

Convert directory check assertions into authorizer decisions

```
GDRIVE_ASSERTIONS_DIR=$(topaz config info config.topaz_tmpl_dir -r)/gdrive/assertions
check2decision -i ${GDRIVE_ASSERTIONS_DIR}/gdrive_assertions.json -o ${GDRIVE_ASSERTIONS_DIR}/gdrive_decisions.json
```

Execute authorizer decision assertions

```
topaz az test exec ${GDRIVE_ASSERTIONS_DIR}/gdrive_decisions.json
```

## Installation

189 changes: 162 additions & 27 deletions api/check2decision.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 63f7d8b

Please sign in to comment.