Skip to content

Commit dfe4501

Browse files
authored
upd README.md (#699)
1 parent 4ec4ba5 commit dfe4501

File tree

4 files changed

+42
-41
lines changed

4 files changed

+42
-41
lines changed

README.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ Join the community [Slack channel](https://www.aserto.com/slack) for questions a
6565

6666
* Via Homebrew for macOS or LinuxBrew for Linux
6767

68-
```shell
69-
brew install --cask topaz
70-
```
68+
```console
69+
$ brew install --cask aserto-dev/tap/topaz
70+
```
7171

7272
* Via a GO install
7373

74-
```shell
75-
go install github.com/aserto-dev/topaz/topaz@latest
76-
```
74+
```console
75+
$ go install github.com/aserto-dev/topaz/topaz@latest
76+
```
7777

7878
### Building from source
7979

@@ -82,17 +82,17 @@ Join the community [Slack channel](https://www.aserto.com/slack) for questions a
8282
1. Clone the repo
8383
2. Build and run the executable
8484

85-
```shell
86-
make build && ./dist/build_linux_amd64/topaz
87-
```
85+
```console
86+
$ make build && ./dist/build_linux_amd64/topaz
87+
```
8888

8989
### Running with Docker
9090

9191
You can run as a Docker container:
9292

93-
```shell
94-
docker run -it --rm ghcr.io/aserto-dev/topaz:latest --help
95-
```
93+
```console
94+
$ docker run -it --rm ghcr.io/aserto-dev/topaz:latest --help
95+
```
9696

9797
## Quickstart
9898

@@ -102,8 +102,8 @@ These instructions help you get Topaz up and running as the authorizer for a sam
102102

103103
The Topaz authorizer is packaged as a Docker container. You can get the latest image using the following command:
104104

105-
```shell
106-
topaz install
105+
```console
106+
$ topaz install
107107
```
108108

109109
**NOTE:** If you get the following errors/warnings from Topaz commands:
@@ -121,16 +121,16 @@ Topaz has a set of pre-built templates that contain three types of artifacts:
121121

122122
You can use the CLI to install the todo template:
123123

124-
```shell
125-
topaz templates install todo
124+
```console
125+
$ topaz templates install todo
126126
```
127127

128128
#### Artifacts
129129

130130
This command will install the following artifacts in `$HOME/.config/topaz/`:
131131

132-
```shell
133-
tree $HOME/.config/topaz
132+
```console
133+
$ tree $HOME/.config/topaz
134134
/Users/ogazitt/.config/topaz
135135
├── cfg
136136
│ └── todo.yaml
@@ -148,8 +148,8 @@ tree $HOME/.config/topaz
148148
* `todo/data/` contains the objects and relations for the Todo template - in this case, a set of 5 users and 4 groups that are based on the "Rick & Morty" cartoon.
149149
* `todo/model/manifest.yaml` contains the manifest file which describes the domain model.
150150

151-
```shell
152-
tree ~/.local/share/topaz
151+
```console
152+
$ tree ~/.local/share/topaz
153153
/Users/ogazitt/.local/share/topaz
154154
├── certs
155155
│   ├── gateway-ca.crt
@@ -194,16 +194,16 @@ To verify that Topaz is running with the right policy image, you can issue a `cu
194194

195195
This API call retrieves the set of policies that Topaz has loaded:
196196

197-
```shell
198-
curl -k https://localhost:8383/api/v2/policies
197+
```console
198+
$ curl -k https://localhost:8383/api/v2/policies
199199
```
200200

201201
### Issue an authorization request
202202

203203
Issue an authorization request using the `is` REST API to verify that the user Rick is allowed to GET the list of todos:
204204

205-
```shell
206-
curl -k -X POST 'https://localhost:8383/api/v2/authz/is' \
205+
```console
206+
$ curl -k -X POST 'https://localhost:8383/api/v2/authz/is' \
207207
-H 'Content-Type: application/json' \
208208
-d '{
209209
"identity_context": {
@@ -225,8 +225,9 @@ To start an interactive session with the Topaz endpoints over gRPC, see the [gRP
225225

226226
## Command line options
227227

228-
```shell
229-
topaz --help
228+
```console
229+
$ topaz --help
230+
230231
Usage: topaz <command> [flags]
231232

232233
Topaz CLI
@@ -261,14 +262,14 @@ Run "topaz <command> --help" for more information on a command.
261262

262263
To interact with the authorizer endpoint, install [grpcui](https://github.com/fullstorydev/grpcui) or [grpcurl](https://github.com/fullstorydev/grpcurl) and point them to `localhost:8282`:
263264

264-
```shell
265-
grpcui --insecure localhost:8282
265+
```console
266+
$ grpcui --insecure localhost:8282
266267
```
267268

268269
To interact with the directory endpoint, use `localhost:9292`:
269270

270-
```shell
271-
grpcui --insecure localhost:9292
271+
```console
272+
$ grpcui --insecure localhost:9292
272273
```
273274

274275
For more information on APIs, see the [docs](https://www.topaz.sh/docs/intro).

docs/fflag/topaz-edit-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
For those topaz CLI commands, that accept inline JSON request payloads, like:
44

5-
```shell
6-
topaz directory get object '{"object_type":"user", "object_id":"euang@acmecorp.com"}' --insecure
5+
```console
6+
$ topaz directory get object '{"object_type":"user", "object_id":"euang@acmecorp.com"}' --insecure
77
```
88

99
we have added the ability to construct these requests using a text editor.

docs/fflag/topaz-fflag.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ which enables both the editor and prompter (1 | 2 = 3)
2020

2121
To set the feature flags for the terminal sesssion:
2222

23-
```shell
23+
```console
2424
export TOPAZ_FFLAG=3
2525
```
2626

docs/fflag/topaz-prompt-mode.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
For those topaz CLI commands, that accept inline JSON request payloads, like:
44

5-
```shell
6-
topaz directory get object '{"object_type":"user", "object_id":"euang@acmecorp.com"}' --insecure
5+
```console
6+
$ topaz directory get object '{"object_type":"user", "object_id":"euang@acmecorp.com"}' --insecure
77
```
88

99
we have added the ability to construct these requests using an input prompter.
@@ -43,9 +43,9 @@ Authorizer:
4343

4444
For example:
4545

46-
```shell
47-
export TOPAZ_FFLAG=2
48-
topaz directory check --insecure
46+
```console
47+
$ export TOPAZ_FFLAG=2
48+
$ topaz directory check --insecure
4949
```
5050
Opening prompt:
5151

@@ -55,12 +55,12 @@ Finished prompt:
5555

5656
![prompter](topaz-prompt-finish.png)
5757

58-
5958
Result:
6059

61-
```
62-
topaz directory check --insecure
60+
```console
61+
$ topaz directory check --insecure
6362
{
6463
"check": true,
6564
"trace": []
6665
}
66+
```

0 commit comments

Comments
 (0)