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

Document authentication #254

Merged
merged 1 commit into from Dec 17, 2021
Merged

Document authentication #254

merged 1 commit into from Dec 17, 2021

Conversation

miohtama
Copy link
Contributor

@miohtama miohtama commented Dec 2, 2021

How to pass the password to the PSQL connection is not obvious from the current documentation.
Add a basic example with links to the more documentation.

Copy link
Member

@dlax dlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miohtama, thank you for your contribution!

@blogh, what do you think about this addition?

README.md Outdated
You can pass the password for the database connection in `PGPASSWORD`
in environment variable, or other
[PostgreSQL environment variable](https://www.postgresql.org/docs/current/libpq-envars.html)
supported by `psycopg2` library.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not specific to psycopg2, it's just libpq:

Suggested change
supported by `psycopg2` library.
supported by `libpq`.

@blogh
Copy link
Collaborator

blogh commented Dec 3, 2021

This is a libpq feature and there are many different ways to do this.

I'd rather have this in the FAQ part and would prefer something like :

pg_activity uses libpq to access to PostgreSQL. All the traditional methods are available.

You can pass the password for the database connection in a password file. Information can also be given
via PostgreSQL's environment variables (PGPASSFILE or PGPASSWORD) or via the connection string parameters.

The password file is preferred since it's more secure (security is deferred to the OS). Please avoid password in connection strings at all cost.

@blogh
Copy link
Collaborator

blogh commented Dec 3, 2021

Also : @miohtama, thank you for your contribution :)

@blogh
Copy link
Collaborator

blogh commented Dec 13, 2021

Are you guys ok with this ? If so I can do the PR.

@dlax
Copy link
Member

dlax commented Dec 13, 2021 via email

How to pass the password to the PSQL connection is not obvious from the
current documentation.  Add a basic example with links to the more
documentation.
@blogh blogh merged commit 6715ba0 into dalibo:master Dec 17, 2021
@blogh
Copy link
Collaborator

blogh commented Dec 17, 2021

Pushed it that way.

@miohtama, thanks for the patch
@dlax, thanks for reviewing

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

Successfully merging this pull request may close these issues.

None yet

3 participants