SV: Login form

From: Henrik Uggla <Henrik(dot)Uggla(at)kristianstad(dot)se>
To: Dave Page <dpage(at)pgadmin(dot)org>, Oygun Josef <josef(dot)oygun(at)scania(dot)com>
Cc: "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: SV: Login form
Date: 2018-09-04 13:20:21
Message-ID: 950ae85a2650429c862c51bcd9398e01@kristianstad.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

The containers are constructed in such a way that when it is started with a server mode variable, it modifies the Pgadmin config before Pgadmin is started. Take a look at my Pgadmin4 container: https://hub.docker.com/r/huggla/pgadmin-alpine/

________________________________________
Från: Dave Page <dpage(at)pgadmin(dot)org>
Skickat: den 4 september 2018 15:07:16
Till: Oygun Josef
Kopia: Henrik Uggla; pgadmin-support(at)lists(dot)postgresql(dot)org
Ämne: Re: Login form

Hi

Please re-read my earlier message. SERVER_MODE is a pgAdmin config option (actually a Python variable). It's not an environment variable you can pass to the container.

On Tue, Sep 4, 2018 at 2:04 PM, Oygun Josef <josef(dot)oygun(at)scania(dot)com<mailto:josef(dot)oygun(at)scania(dot)com>> wrote:
Hi Dave & Henrik,

I still was not able to disable the login, I even deleted the persistent volume and the claim in case these

This is how my env variables looks like.

containers:
- name: pgadmin
image: dpage/pgadmin4:3.2
env:
- name: SERVER_MODE
value: 'False'
- name: PGADMIN_DEFAULT_USER
valueFrom:
configMapKeyRef:
name: configmap-dummy
key: username-dummy
- name: PGADMIN_DEFAULT_EMAIL
valueFrom:
configMapKeyRef:
name: configmap-dummy
key: email-dummy
- name: PGADMIN_DEFAULT_PASSWORD
valueFrom:
secretKeyRef:
name: secrets-dummy
key: password-dummy

-----Ursprungligt meddelande-----
Från: Henrik Uggla [mailto:Henrik(dot)Uggla(at)kristianstad(dot)se<mailto:Henrik(dot)Uggla(at)kristianstad(dot)se>]
Skickat: den 4 september 2018 11:59
Till: Dave Page <dpage(at)pgadmin(dot)org<mailto:dpage(at)pgadmin(dot)org>>
Kopia: Oygun Josef <josef(dot)oygun(at)scania(dot)com<mailto:josef(dot)oygun(at)scania(dot)com>>; pgadmin-support(at)lists(dot)postgresql(dot)org<mailto:pgadmin-support(at)lists(dot)postgresql(dot)org>
Ämne: SV: Login form

As I said, most images has the option to set SERVER_MODE at runtime, using an environment variable. If security is important then you shouln't disable the PGAdmin login form.
________________________________________
Från: Dave Page <dpage(at)pgadmin(dot)org<mailto:dpage(at)pgadmin(dot)org>>
Skickat: den 4 september 2018 11:05:28
Till: Henrik Uggla
Kopia: Oygun Josef; pgadmin-support(at)lists(dot)postgresql(dot)org<mailto:pgadmin-support(at)lists(dot)postgresql(dot)org>
Ämne: Re: Login form

On Tue, Sep 4, 2018 at 10:02 AM, Henrik Uggla <Henrik(dot)Uggla(at)kristianstad(dot)se<mailto:Henrik(dot)Uggla(at)kristianstad(dot)se><mailto:Henrik(dot)Uggla(at)kristianstad(dot)se<mailto:Henrik(dot)Uggla(at)kristianstad(dot)se>>> wrote:
Many docker images have the option to set SERVER_MODE = False/True. Most has SERVER_MODE = False as default.

Mine will never have that as a default, as we follow a principal of "secure by default".

________________________________________
Från: Dave Page <dpage(at)pgadmin(dot)org<mailto:dpage(at)pgadmin(dot)org><mailto:dpage(at)pgadmin(dot)org<mailto:dpage(at)pgadmin(dot)org>>>
Skickat: den 4 september 2018 10:28:41
Till: Oygun Josef
Kopia: pgadmin-support(at)lists(dot)postgresql(dot)org<mailto:pgadmin-support(at)lists(dot)postgresql(dot)org><mailto:pgadmin-support(at)lists(dot)postgresql(dot)org<mailto:pgadmin-support(at)lists(dot)postgresql(dot)org>>
Ämne: Re: Login form

On Tue, Sep 4, 2018 at 8:53 AM, Oygun Josef <josef(dot)oygun(at)scania(dot)com<mailto:josef(dot)oygun(at)scania(dot)com><mailto:josef(dot)oygun(at)scania(dot)com<mailto:josef(dot)oygun(at)scania(dot)com>><mailto:josef(dot)oygun(at)scania(dot)com<mailto:josef(dot)oygun(at)scania(dot)com><mailto:josef(dot)oygun(at)scania(dot)com<mailto:josef(dot)oygun(at)scania(dot)com>>>> wrote:
Hi!

Is it possible to disable the PGAdmin login form?

I have the deployment as a docker image on kubernetes.

https://hub.docker.com/r/dpage/pgadmin4/

No, there's no straightforward way of doing this at present. You'd need to set SERVER_MODE = False in the config before the first time the container is run (as it affects the config DB that's created at first startup), but there isn't a simple way to do that at the moment.

You could create a dockerfile to create your own version of the container that did something like:

----
FROM pgadmin4:latest
COPY config_local.py /pgadmin4
----

Where config_local.py included the SERVER_MODE override.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2018-09-04 13:23:50 Re: Login form
Previous Message Dave Page 2018-09-04 13:07:16 Re: Login form