Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Latest commit

 

History

History

postgres_role_strategy

PostgreSQL Role Strategy

Manage access to an RDS PostgreSQL instance by temporarily assigning roles to existing database users.

Tutorial

Our step-by-step PostgreSQL on AWS tutorial walks you through setup for this example.

Setting up an example database

Enable the postgres_db module to provision an RDS PostgreSQL database in a VPC that you can use to test the integration.

You can enable the module by setting the db_enabled variable to true.

Refer to the README for instructions on tunneling to the example database.

Local testing

You can iterate on your handler function locally by setting up a docker compose based PostgreSQL database and then invoking your handler function directly.

  1. Start the local database with docker compose up.
  2. Copy env.example to .env and then source it into your shell
  3. Create a test user, database and role with init-users.sh.
  4. Run pip install -r requirements.txt
  5. Run cat test/escalate.json | python handler.py to grant a user access to the readonly role.
  6. Verify the user grants by running \du from the psql console.

About Sym

This workflow is just one example of how Sym Implementers use the Sym SDK to create Sym Flows.