Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use included file for database connection parameters #9

Open
atombaby opened this issue Apr 28, 2020 · 2 comments
Open

Use included file for database connection parameters #9

atombaby opened this issue Apr 28, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@atombaby
Copy link
Contributor

The current mechanism puts the database connection string (including username and password) in the process stack where it is viewable by anyone on the system. This is somewhat undesirable- though I don't know precisely what harm could come, general "best practices" would suggest we improve this.

I've done a little work and it looks like we may be able to specify database connection parameters in a file separate from the general Cromwell config (e.g. fh-slurm-sing-cromwell.conf) and use HOCON's include directive:

include required(classpath("application"))
include required(file("database.conf"))
###### FH Slurm Backend, with call caching, without docker/singularity
   ....

Where database.conf contains the database section as specified by Cromwell:

database {
  profile = "slick.jdbc.MySQLProfile$"
  db {
    driver = "com.mysql.cj.jdbc.Driver"
    url = "jdbc:mysql://mydb:32222/cromdb?rewriteBatchedStatements=true&serverTimezone=UTC"
    user = "username"
    password = "password"
    connectionTimeout = 5000
  }
}

The path above doesn't have to be in the current directory- my understanding is that we could specify any path for that, though I'm not sure if things like "~" are expanded.

@atombaby atombaby added the enhancement New feature or request label Apr 28, 2020
@vortexing
Copy link
Collaborator

This makes things a bit more awkward and requires people to customize more in the way that I'm looking at this now. I need to figure out how to pass the path to the database.conf to the java command so it knows where to look for it in cromServer.sh. If I could figure that out, then it'd be awesome and totally doable.

@vortexing
Copy link
Collaborator

@atombaby in the current setup, is this still the case? I've made a lot of changes since then and I'm not sure it's still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants