Skip to content
This repository was archived by the owner on Oct 15, 2019. It is now read-only.

Conversation

dannysauer
Copy link
Contributor

Create DB user only if user doesn't already exist, and set password based on file contents. This should help with backup/restore procedure, and generally makes more sense in that it won't generate error output in logs due to the user already existing.

Also added a couple of sanity / security checks while I was in there:

  • make sure the $ENV variable is safe to use in a query
  • make sure that the password files aren't empty.

Work-in-progress while doing some additional testing

Danny Sauer added 3 commits February 27, 2019 20:13
If a user already exists but teh secret file has been modified, the database
user's password will not be changed for an existing user.  Further, the create
user command will generate an error if run against a user which already exists.
Separate out the user create and password set commands so the create can add
the "if not exsts" option and so the password can be resync'd with the file
contents.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant