From 0a304e379d889a2f0a837dcc81eb2786c7baa6e6 Mon Sep 17 00:00:00 2001 From: bglynn Date: Mon, 22 Jan 2024 11:01:04 -0800 Subject: [PATCH] Added example log outputs. --- docs/quickstart/access-control/postgres.mdx | 29 ++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/quickstart/access-control/postgres.mdx b/docs/quickstart/access-control/postgres.mdx index a10c261c8..5633b517a 100644 --- a/docs/quickstart/access-control/postgres.mdx +++ b/docs/quickstart/access-control/postgres.mdx @@ -8,6 +8,21 @@ import CodeBlock from "@theme/CodeBlock"; import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +export const Terminal = ({children}) => ( +
+ {children} +
+); + Otterize Simplifies PostgreSQL Least Privilege Service Access @@ -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 ``` @@ -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: + + pq: password authentication failed for user "svc_9cigb2qemv_otterize_tutorial_postgres_server" + + ### 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. @@ -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: + + Successfully INSERTED into our table + Successfully SELECTED, most recent value: 2024-01-22T18:48:43Z + + 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: