grants

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 14 Imported by: 0

README

Grants

This is a tool for declaring database permissions for PostgreSQL (and soon MySQL). The idea is you specify a user and password, and which database tables it has which permissions to select or modify.

An example input file:

users:
  myuser:
    password: $PASSWORD_FROM_ENVIRONMENT_VARIABLE
    grants:
      - LOGIN
    databases:
      $DATABASE_NAME_FROM_ENVIRONMENT_VARIABLE:
        grants:
          - CONNECT
        schemas:
          public:
            grants:
              - USAGE
            tables:
              sometable:
                grants:
                  - SELECT
              othertable anothertable athirdtable:
                grants:
                  - SELECT
                  - INSERT
                  - UPDATE
                  - DELETE
            sequences:
              othertable_id_seq:
                grants:
                  - USAGE
              anothertable athirdtable:
                grants:
                  - USAGE

Installation

go install github.com/yobert/grants

Usage

grants [path/to/yaml/file]

More information in --help and --example. Please file issues if you find bugs! Thanks!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL