Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Database password should be not visible to other processes #729

Closed
Mic92 opened this issue May 27, 2018 · 5 comments
Closed

Database password should be not visible to other processes #729

Mic92 opened this issue May 27, 2018 · 5 comments
Labels

Comments

@Mic92
Copy link

Mic92 commented May 27, 2018

Currently the password is not cleared from /proc/self/cmdline and visible to any other unprivileged process on the same machine, such as top:

Noticed here: NixOS/nixpkgs#39482 (comment)

@Chiiruno
Copy link
Contributor

Probably having meguca create and read a config file would be ideal for this.

@Chiiruno
Copy link
Contributor

Actually, I wonder if we might be able to read shadowed files. (Assuming Linux)

@bakape bakape added the server label May 28, 2018
@bakape
Copy link
Owner

bakape commented May 28, 2018

Probably having meguca create and read a config file would be ideal for this.

Yes, this is best. But I want to preserve the current flag functionality too, so maybe shaving everything except the process name from argv[0] with https://github.com/ErikDubbelboer/gspt is needed as well.

@bakape
Copy link
Owner

bakape commented May 28, 2018

Notes to self:

  • flags should override config file
  • simple JSON config file in project root folder
  • don't panic, if config file missing
  • add to .gitignore
  • the mode keyword (debug|start|stop|...) should remain unchanged

@bakape
Copy link
Owner

bakape commented Jun 3, 2018

Also, I realized Postgres uses peer authentication by default and the password is not even needed on most systems.

nekto-nekto pushed a commit to 0-chan-ru/tetuca that referenced this issue May 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants