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

postgresql configuration #12

Open
disassembler opened this issue May 18, 2017 · 5 comments
Open

postgresql configuration #12

disassembler opened this issue May 18, 2017 · 5 comments

Comments

@disassembler
Copy link

I'm working on making passopolis easier to use for nixos folks by adding a package to nixpkgs. Currently, I have it building fine, but I'm not sure how to go about making postgresql configuration changes. The way I've done it manually is to alter build.xml and rebuild, but wondering if there's a better way.

Here's a link to my nixpkgs expression: https://github.com/disassembler/nixpkgs/blob/passopolis-server/pkgs/servers/passopolis/default.nix

@teh
Copy link
Member

teh commented May 18, 2017

Nice!

We don't have a better config system - happy to accept PRs though :)

@disassembler
Copy link
Author

Made some progress looking at build.xml and the resulting process started using ant server command. The database_url is passed as a parameter to the java process. I don't see any easy way to add authentication, but using trust 127.0.0.1 in postgresql config it works. Here's my PR for nixpkgs to get this service added:

NixOS/nixpkgs#25907

@disassembler
Copy link
Author

The PR we have works using host based ident authorization with postgresql, but that's inherently insecure and not recommended. The other option we have is passing user/pass in the database_url parameter, but then anyone on the system can run a ps and get the database credentials. Are there any secure ways to get the database_url into the application? I know you said you don't have a config system in place, but is your team just using ident postgresql authentication? Or are you doing something different? Thanks for your help!

@teh
Copy link
Member

teh commented May 31, 2017

We're using nixops which supports deploy keys [1], but we're also a single-purpose machine so using ident auth would be OK as well in our case.

[1]
https://nixos.org/nixops/manual/#idm140737318306400

@disassembler
Copy link
Author

disassembler commented May 31, 2017 via email

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

No branches or pull requests

2 participants