Skip to content

Commit

Permalink
docs: add getting started guide to readme (#1094)
Browse files Browse the repository at this point in the history
Co-authored-by: hackerman <[email protected]>
  • Loading branch information
hperl and aeneasr authored Oct 28, 2022
1 parent b31e744 commit e3b88d2
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,58 @@
Ory Keto is the first and most popular open source implementation of "Zanzibar:
Google's Consistent, Global Authorization System"!

## Get Started

You can use
[Docker to run Ory Keto locally](https://www.ory.sh/docs/keto/install) or use
the Ory CLI to try out Ory Keto:

```sh
# This example works best in Bash
bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -b . ory
sudo mv ./ory /usr/local/bin/

# Or with Homebrew installed
brew install ory/tap/cli
```

create a new project (you may also use
[Docker](https://www.ory.sh/docs/keto/install))

```sh
ory create project --name "Ory Keto Example"
export project_id="{set to the id from output}"
```

and follow the quick & easy steps below.

## Create a namespace with the Ory Permission Language

```sh
# Write a simple configuration with one namespace
echo "class Document implements Namespace {}" > config.ts

# Apply that configuration
ory patch opl --project $project_id -f file://./config.ts

# Create a relationship that grants tom access to a document
echo "Document:secret#read@tom" \
| ory parse relation-tuples --project=$project_id --format=json - \
| ory create relation-tuples --project=$project_id -

# List all relationships
ory list relation-tuples --project=$project_id
# Output:
# NAMESPACE OBJECT RELATION NAME SUBJECT
# Document secret read tom
#
# NEXT PAGE TOKEN
# IS LAST PAGE true
```

Now, check out your project on the [Ory Network](https://console.ory.sh/) or
continue with a [more in-depth guide](https://www.ory.sh/docs/keto/quickstart).

### Ory Keto on the Ory Network

The [Ory Network](https://www.ory.sh/cloud) is the fastest, most secure and
Expand Down Expand Up @@ -507,7 +559,7 @@ TheCrealm.

<!--END ADOPTERS-->

### Installation
## Installation

Head over to the documentation to learn about ways of
[installing Ory Keto](https://www.ory.sh/docs/keto/install).
Expand Down

0 comments on commit e3b88d2

Please sign in to comment.