Skip to content

Commit

Permalink
Added example log outputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
bglynn committed Jan 22, 2024
1 parent 76aeed8 commit 0a304e3
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion docs/quickstart/access-control/postgres.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ import CodeBlock from "@theme/CodeBlock";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

export const Terminal = ({children}) => (
<div
style={{
backgroundColor: '#eee',
borderRadius: '5px',
fontSize: '12px',
fontWeight: '600',
color: 'darkgreen',
padding: '1rem',
fontFamily: 'monospace, monospace'
}}>
{children}
</div>
);


Otterize Simplifies PostgreSQL Least Privilege Service Access

Expand All @@ -28,7 +43,7 @@ In this tutorial, we will:

# Prerequisites

1. **~[MiniKube](https://minikube.sigs.k8s.io/docs/start/)~** - We will be running our cluster locally.
1. **[MiniKube](https://minikube.sigs.k8s.io/docs/start/)** - We will be running our cluster locally.
```shell
minikube start
```
Expand Down Expand Up @@ -98,6 +113,12 @@ After the client, server, and database are up and running, we can see that the s
kubectl logs -f -n otterize-tutorial-postgres deploy/server
```


Example Log:
<Terminal>
pq: password authentication failed for user "svc_9cigb2qemv_otterize_tutorial_postgres_server"
</Terminal>

### Define our access intents

ClientIntents are Otterize’s way of defining access through unique relationships, which lead to perfectly scoped access. In this example, we provide our `server` service the ability to insert select records to allow it to access the database.
Expand Down Expand Up @@ -129,6 +150,12 @@ We can now apply our intents. Behind the scenes, Otterize Cloud creates the appr
kubectl apply -f intents.yaml
```

Example Log:
<Terminal>
Successfully INSERTED into our table
Successfully SELECTED, most recent value: 2024-01-22T18:48:43Z
</Terminal>

That’s it! If your service’s functionality changes, adding or removing access is as simple as updating your ClientIntents definitions. For fun, try altering the `operations` to just `SELECT` or `INSERT`.
# Teardown
To remove the deployed examples, run:
Expand Down

0 comments on commit 0a304e3

Please sign in to comment.