krux / starport

Apache License 2.0
2 stars 7 forks source link

create users script #16

Closed talbright closed 5 years ago

talbright commented 5 years ago

Allow management of DB users (RW + RO) while lowering the temptation to include the master username/password in the conf file:

$ jaava -cp ./starport-core/target/scala-2.12/starport-core.jar \
      -Dstarport.config.url=file:///Users/talbright/Code/krux/ds/starport/conf-template/starport-local.conf \
      com.krux.starport.db.tool.CreateUsers --help
Usage: com.krux.starport.db.tool.CreateUsers [options]

  --help                   prints this usage text
  -u, --masterUser <value>
                           the db master user
  -p, --masterPassword <value>
                           the db master password

@itsdawomb this should address the missing RO user you mentioned in a previous PR.

talbright commented 5 years ago

For some reason the DDL for the RO user is allowing me to create tables in the starport DB, not sure where I went wrong there. Anything obvious I'm missing @sushengloong? I can dig into it more tomorrow.

sushengloong commented 5 years ago

@talbright grantsForReadOnlyUser looks fine to me. I saw the slack discussion thread between you and JBudd. Have you tested out REVOKE CREATE?

talbright commented 5 years ago

@realstraw ready for another look

realstraw commented 5 years ago

Let's also update the patch version

talbright commented 5 years ago

bumping and merging