question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatically obtain database password from db-specific external source if not explicitly specified

See original GitHub issue

I’d like to use the PGPASSWORD environment variable to pass the password through to Postgresql, as allowed by psql. That way, I don’t end up with a password visible to other users.

To reproduce, instead of using flyway migrate -password=example, use PGPASSWORD=example flyway migrate.

Great tool, thanks for the no-nonsense SQL-based migrations.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tuukkamustonencommented, May 19, 2015

Just bumped into this. It doesn’t sound technically difficult to resort to ~/.pgpass if -password <pass> is not given. But, I assume ~/.pgpass is for psql CLI only and JDBC driver is completely another beast…?

Would be nice feature, still.

1reaction
cbandycommented, Mar 16, 2015

@ToBeReplaced if security is your concern, the PGPASSWORD environment variable may not be what you want.

http://www.postgresql.org/docs/current/static/libpq-envars.html

Use of this environment variable is not recommended for security reasons, as some operating systems allow non-root users to see process environment variables via ps; instead consider using the ~/.pgpass file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Security in MySQL :: 4.15 Password Management
MySQL enables database administrators to expire account passwords manually, and to establish a policy for automatic password expiration. Expiration policy can ...
Read more >
3 Configuring Authentication - Oracle Help Center
You can configure Oracle Database to authenticate (that is, verify the identity of) users or other entities that connect to the database.
Read more >
Manage data source settings and permissions (Power Query)
To add or change a permission, select Edit. In the dialog box left pane (colored green), select the credential type you want: Note...
Read more >
RESTORE DATABASE command - IBM
If this parameter is not specified for an automatic storage database, then the storage paths remain as they are defined within the backup...
Read more >
Features - H2 Database Engine
In some cases, only one connection to a in-memory database is required. This means the database to be opened is private. In this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found