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

Feature Request: Possiblilty to pass PGSSLMODE to mapnik renderer #6

Open
cueball23 opened this issue Sep 15, 2017 · 2 comments
Open

Comments

@cueball23
Copy link

To check the ssl certificate of the postgres server I need to set the PGSSLMODE environment variable for the renderer process.

I added the environment in the execute_renderer function in https://github.com/geofabrik/Tirex/blob/master/bin/tirex-backend-manager.

442 $ENV{'TIREX_BACKEND_SOCKET_FILENO'} = $socket_fileno;
443 $ENV{'PGSSLMODE'} = 'verify-full';
444 $ENV{'TIREX_BACKEND_DEBUG'} = 1 if ($Tirex::DEBUG || $renderer->get_debug());

It works for me, but I guess is shouldn't be hardcoded.
Maybe someone will find this useful.

@cueball23
Copy link
Author

For this to work, you need the CA bundle in ~/.postgresql/root.crt, and a signed certificate on the postgres server.

@stephankn
Copy link
Contributor

Does someone clear the environment? Otherwise you could simply set it before starting the backend manager and have it inherited.

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