Unable configure pgadmin on Google Cloud Run with SSL certs

From: rossco <rosscoe(dot)pico(at)gmail(dot)com>
To: pgadmin-support(at)lists(dot)postgresql(dot)org
Subject: Unable configure pgadmin on Google Cloud Run with SSL certs
Date: 2021-04-20 21:42:21
Message-ID: CADaBrPxzw7vR37SeVr2x9MDGvyxbMNQxLaMpW8pwtTtB_mn-4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

I would like to know how I can use pgadmin with a database that requires
SSL Certificates

The Problem

- I am deploying pgadmin onto Google Cloud Run which does not allow
mapped drives when starting the container
- I have tried uploading the certificates via the pgadmin UI, however
the key file has the wrong permissions and I am unable to change them
- Error message says key file requires 0600 permissions
- I have tried adding the certificates with a small modified Dockerfile,
however the files end up in /pgadmin which I can not access from the UI

*Simple Dockerfile to try and pre-load the certs*

FROM dpage/pgadmin4
COPY client-cert.pem client-key.pem server-ca.pem ./

*The files have been added to the container - but I can not access them
from teh UI*
$ docker exec -it
b5ad237a7eee2873190087c0c132a21007b80c856d3aabf77119ae498683d892 ls -al

total 192
drwxr-xr-x 1 root root 4096 Apr 20 21:33 .
drwxr-xr-x 1 root root 4096 Apr 20 21:34 ..
-rw-rw-r-- 1 root root 65149 Mar 23 13:53 DEPENDENCIES
-rw-rw-r-- 1 root root 1026 Mar 23 13:53 LICENSE
-rw-r--r-- 1 root root 1261 Apr 20 05:59 client-cert.pem
-rw------- 1 root root 1679 Apr 20 06:00 client-key.pem
-rw-rw-r-- 1 root root 25393 Mar 23 13:53 config.py
-rw-r--r-- 1 pgadmin pgadmin 158 Apr 20 21:34 config_distro.py
drwxr-xr-x 4 root root 12288 Mar 23 14:05 docs
-rw-rw-r-- 1 root root 52 Mar 23 13:53 gunicorn_config.py
drwxrwxr-x 3 root root 4096 Mar 23 13:53 migrations
-rw-rw-r-- 1 root root 8596 Mar 23 13:53 pgAdmin4.py
-rw-rw-r-- 1 root root 949 Mar 23 13:53 pgAdmin4.wsgi
drwxrwxr-x 19 root root 4096 Mar 23 13:53 pgadmin
-rw-rw-r-- 1 root root 142 Mar 23 13:53 pgadmin.themes.json
-rw-rw-r-- 1 root root 70 Mar 23 13:53 run_pgadmin.py
-rw-r--r-- 1 root root 1273 Apr 20 06:00 server-ca.pem
-rw-rw-r-- 1 root root 16479 Mar 23 13:53 setup.py

*I can't look around the file system as I don't know the sudo password*
$ docker exec -it
b5ad237a7eee2873190087c0c132a21007b80c856d3aabf77119ae498683d892 sudo ls /

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for pgadmin:

Can you please suggest a way I can pre-load certificates before deploying
the container, or provide any examples of someone else using Google Cloud
Run with CloudSQL & certificates?

Thanks,

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2021-04-21 08:35:58 Re: Unable configure pgadmin on Google Cloud Run with SSL certs
Previous Message Aditya Toshniwal 2021-04-20 12:43:03 Re: Pgadmin4 fail !!!