grant-0.1.0 has been yanked.
grant.rs
Manage Redshift database roles and privileges in GitOps style.
Usage
Install binary from crates.io
Using grant tool:
)
Generate project structure
# or
&&
Apply privilege changes
Dry run:
Apply to cluster:
# [2021-11-15T03:37:38Z INFO grant::apply] Try to apply definition from "./examples/example.yaml", dryrun=false, conn=None
# [2021-11-15T03:37:38Z INFO grant::apply] SQL = GRANT CREATE, TEMP ON DATABASE db1, db2 TO duyet;
# [2021-11-15T03:37:38Z INFO grant::apply] SQL = GRANT CREATE, USAGE ON SCHEMA TO duyet;
# [2021-11-15T03:37:38Z INFO grant::apply] SQL = GRANT CREATE, USAGE ON SCHEMA common, dwh1, dwh2 TO duyet;
# [2021-11-15T03:37:38Z INFO grant::apply] SQL = GRANT CREATE, TEMP ON DATABASE db1, db2 TO duyet2;
# [2021-11-15T03:37:38Z INFO grant::apply] SQL = GRANT CREATE, USAGE ON SCHEMA TO duyet2;
# [2021-11-15T03:37:38Z INFO grant::apply] SQL = GRANT CREATE, USAGE ON SCHEMA common, dwh1, dwh2 TO duyet2;
Generate random password
)
Developement
Clone the repo:
&&
Postgres is required for testing, you might need to use the docker-compose.yaml:
Make sure you have connection to postgres://postgres:postgres@localhost:5432/postgres.
To run the unittest:
TODO
- Support store encrypted password in Git
- Support Postgres
- Visuallization (who can see what?)
LICENSE
MIT