Обсуждение: Running pgadmin4:5.5 behind reverse-proxy only shows progress indicator after successful login
Hi,
I'm trying to run pgadmin in a Kubernetes cluster with the following setup:
+-------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+
pgadmin runs in a container at endpoint /pgadmin4 behind a reverse proxy using nginx (version 1.21.1). Proxy header X-Forwarded-* are set as follows:
1. X-Forwarded-For: $proxy_add_x_forwarded_for
2. X-Forwarded-Proto: https
3. X-Forwarded-Host: dev.<...>.com
4. X-Forwarded-Port: 443
5. X-Forwarded-Prefix: /pgadmin4
6. X-Script-Name: /pgadmin4
Vouch Proxy (version 0.32.0) checks client credentials via a configured IDP.
pgadmin itself is only configured with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD and runs using port 80, which is also used in nginx proxy configuration.
After successful login I only see the progress indicator (see attachment). Looking at browser developer tools I see that besides 200 status responses there are a lot of 302 responses too, e.g., 302 GET dev.<...>.com /pgadmin4/browser
Creating a port-forward in Kubernetes towards the /pgadmin4 container works right away.
I tried to modify the pgadmin environment according to https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#pgadmin-x-forwarded-configuration by setting all values to "1". But it did not work. Furthermore, I don't understand the purpose and possible configuration setups.
What can I do?
Thanks in advance
Jörg Liebig
Вложения
Re: Running pgadmin4:5.5 behind reverse-proxy only shows progress indicator after successful login
От
richard coleman
Дата:
Hi Jörg Liebig,
If it's the same issue that *still exists* when I connect over an RDP session, I would try moving the window? I find that the screen doesn't refresh and it is actually all set behind that screen. Moving the window clears it up. That might not be *your* problem, but it won't hurt to try.
Good luck,
rik.
On Wed, Aug 11, 2021 at 12:05 PM Jörg Liebig <joliebig@gmail.com> wrote:
Hi,I'm trying to run pgadmin in a Kubernetes cluster with the following setup:+-------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+pgadmin runs in a container at endpoint /pgadmin4 behind a reverse proxy using nginx (version 1.21.1). Proxy header X-Forwarded-* are set as follows:1. X-Forwarded-For: $proxy_add_x_forwarded_for2. X-Forwarded-Proto: https3. X-Forwarded-Host: dev.<...>.com4. X-Forwarded-Port: 4435. X-Forwarded-Prefix: /pgadmin46. X-Script-Name: /pgadmin4Vouch Proxy (version 0.32.0) checks client credentials via a configured IDP.pgadmin itself is only configured with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD and runs using port 80, which is also used in nginx proxy configuration.After successful login I only see the progress indicator (see attachment). Looking at browser developer tools I see that besides 200 status responses there are a lot of 302 responses too, e.g., 302 GET dev.<...>.com /pgadmin4/browserCreating a port-forward in Kubernetes towards the /pgadmin4 container works right away.I tried to modify the pgadmin environment according to https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#pgadmin-x-forwarded-configuration by setting all values to "1". But it did not work. Furthermore, I don't understand the purpose and possible configuration setups.What can I do?Thanks in advanceJörg Liebig
Hi rik,
thanks for the fast response. I tried that, but it didn't work.
Best regards
Jörg Liebig
On Wed, Aug 11, 2021 at 6:12 PM richard coleman <rcoleman.ascentgl@gmail.com> wrote:
Hi Jörg Liebig,If it's the same issue that *still exists* when I connect over an RDP session, I would try moving the window? I find that the screen doesn't refresh and it is actually all set behind that screen. Moving the window clears it up. That might not be *your* problem, but it won't hurt to try.Good luck,rik.On Wed, Aug 11, 2021 at 12:05 PM Jörg Liebig <joliebig@gmail.com> wrote:Hi,I'm trying to run pgadmin in a Kubernetes cluster with the following setup:+-------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+pgadmin runs in a container at endpoint /pgadmin4 behind a reverse proxy using nginx (version 1.21.1). Proxy header X-Forwarded-* are set as follows:1. X-Forwarded-For: $proxy_add_x_forwarded_for2. X-Forwarded-Proto: https3. X-Forwarded-Host: dev.<...>.com4. X-Forwarded-Port: 4435. X-Forwarded-Prefix: /pgadmin46. X-Script-Name: /pgadmin4Vouch Proxy (version 0.32.0) checks client credentials via a configured IDP.pgadmin itself is only configured with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD and runs using port 80, which is also used in nginx proxy configuration.After successful login I only see the progress indicator (see attachment). Looking at browser developer tools I see that besides 200 status responses there are a lot of 302 responses too, e.g., 302 GET dev.<...>.com /pgadmin4/browserCreating a port-forward in Kubernetes towards the /pgadmin4 container works right away.I tried to modify the pgadmin environment according to https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#pgadmin-x-forwarded-configuration by setting all values to "1". But it did not work. Furthermore, I don't understand the purpose and possible configuration setups.What can I do?Thanks in advanceJörg Liebig
Re: Running pgadmin4:5.5 behind reverse-proxy only shows progress indicator after successful login
От
Aditya Toshniwal
Дата:
Hi Jorg,
Are you getting any console errors in browser developer tools ?
On Wed, Aug 11, 2021 at 9:35 PM Jörg Liebig <joliebig@gmail.com> wrote:
Hi,I'm trying to run pgadmin in a Kubernetes cluster with the following setup:+-------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+pgadmin runs in a container at endpoint /pgadmin4 behind a reverse proxy using nginx (version 1.21.1). Proxy header X-Forwarded-* are set as follows:1. X-Forwarded-For: $proxy_add_x_forwarded_for2. X-Forwarded-Proto: https3. X-Forwarded-Host: dev.<...>.com4. X-Forwarded-Port: 4435. X-Forwarded-Prefix: /pgadmin46. X-Script-Name: /pgadmin4Vouch Proxy (version 0.32.0) checks client credentials via a configured IDP.pgadmin itself is only configured with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD and runs using port 80, which is also used in nginx proxy configuration.After successful login I only see the progress indicator (see attachment). Looking at browser developer tools I see that besides 200 status responses there are a lot of 302 responses too, e.g., 302 GET dev.<...>.com /pgadmin4/browserCreating a port-forward in Kubernetes towards the /pgadmin4 container works right away.I tried to modify the pgadmin environment according to https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#pgadmin-x-forwarded-configuration by setting all values to "1". But it did not work. Furthermore, I don't understand the purpose and possible configuration setups.What can I do?Thanks in advanceJörg Liebig
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
Hi Aditya,
No, I'm not getting any errors in browser developer tools. Besides the effect I already mentioned before with the progress indicator, I'm getting more 302 (see attachment) and redirection errors shown in the browser. This happens during authentication at the login screen. Additionally, when trying to login I get "CSRF tokens do not match" and the layout of the page is disrupted (see attachment).
What can I do?
Jörg Liebig
On Thu, Aug 12, 2021 at 6:35 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Jorg,Are you getting any console errors in browser developer tools ?On Wed, Aug 11, 2021 at 9:35 PM Jörg Liebig <joliebig@gmail.com> wrote:Hi,I'm trying to run pgadmin in a Kubernetes cluster with the following setup:+-------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+pgadmin runs in a container at endpoint /pgadmin4 behind a reverse proxy using nginx (version 1.21.1). Proxy header X-Forwarded-* are set as follows:1. X-Forwarded-For: $proxy_add_x_forwarded_for2. X-Forwarded-Proto: https3. X-Forwarded-Host: dev.<...>.com4. X-Forwarded-Port: 4435. X-Forwarded-Prefix: /pgadmin46. X-Script-Name: /pgadmin4Vouch Proxy (version 0.32.0) checks client credentials via a configured IDP.pgadmin itself is only configured with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD and runs using port 80, which is also used in nginx proxy configuration.After successful login I only see the progress indicator (see attachment). Looking at browser developer tools I see that besides 200 status responses there are a lot of 302 responses too, e.g., 302 GET dev.<...>.com /pgadmin4/browserCreating a port-forward in Kubernetes towards the /pgadmin4 container works right away.I tried to modify the pgadmin environment according to https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#pgadmin-x-forwarded-configuration by setting all values to "1". But it did not work. Furthermore, I don't understand the purpose and possible configuration setups.What can I do?Thanks in advanceJörg Liebig--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
Вложения
Re: Running pgadmin4:5.5 behind reverse-proxy only shows progress indicator after successful login
От
Aditya Toshniwal
Дата:
Hi Jorg,
Can you try setting - PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=False for docker env ?
On Thu, Aug 12, 2021 at 11:06 AM Jörg Liebig <joliebig@gmail.com> wrote:
Hi Aditya,No, I'm not getting any errors in browser developer tools. Besides the effect I already mentioned before with the progress indicator, I'm getting more 302 (see attachment) and redirection errors shown in the browser. This happens during authentication at the login screen. Additionally, when trying to login I get "CSRF tokens do not match" and the layout of the page is disrupted (see attachment).What can I do?Jörg LiebigOn Thu, Aug 12, 2021 at 6:35 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Jorg,Are you getting any console errors in browser developer tools ?On Wed, Aug 11, 2021 at 9:35 PM Jörg Liebig <joliebig@gmail.com> wrote:Hi,I'm trying to run pgadmin in a Kubernetes cluster with the following setup:+-------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+pgadmin runs in a container at endpoint /pgadmin4 behind a reverse proxy using nginx (version 1.21.1). Proxy header X-Forwarded-* are set as follows:1. X-Forwarded-For: $proxy_add_x_forwarded_for2. X-Forwarded-Proto: https3. X-Forwarded-Host: dev.<...>.com4. X-Forwarded-Port: 4435. X-Forwarded-Prefix: /pgadmin46. X-Script-Name: /pgadmin4Vouch Proxy (version 0.32.0) checks client credentials via a configured IDP.pgadmin itself is only configured with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD and runs using port 80, which is also used in nginx proxy configuration.After successful login I only see the progress indicator (see attachment). Looking at browser developer tools I see that besides 200 status responses there are a lot of 302 responses too, e.g., 302 GET dev.<...>.com /pgadmin4/browserCreating a port-forward in Kubernetes towards the /pgadmin4 container works right away.I tried to modify the pgadmin environment according to https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#pgadmin-x-forwarded-configuration by setting all values to "1". But it did not work. Furthermore, I don't understand the purpose and possible configuration setups.What can I do?Thanks in advanceJörg Liebig--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
Hi Aditya,
The setting solved the problem and pgadmin works now. Thank you.
Best regards
Jörg Liebig
On Thu, Aug 12, 2021 at 8:58 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Jorg,Can you try setting - PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=False for docker env ?On Thu, Aug 12, 2021 at 11:06 AM Jörg Liebig <joliebig@gmail.com> wrote:Hi Aditya,No, I'm not getting any errors in browser developer tools. Besides the effect I already mentioned before with the progress indicator, I'm getting more 302 (see attachment) and redirection errors shown in the browser. This happens during authentication at the login screen. Additionally, when trying to login I get "CSRF tokens do not match" and the layout of the page is disrupted (see attachment).What can I do?Jörg LiebigOn Thu, Aug 12, 2021 at 6:35 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Jorg,Are you getting any console errors in browser developer tools ?On Wed, Aug 11, 2021 at 9:35 PM Jörg Liebig <joliebig@gmail.com> wrote:Hi,I'm trying to run pgadmin in a Kubernetes cluster with the following setup:+-------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+pgadmin runs in a container at endpoint /pgadmin4 behind a reverse proxy using nginx (version 1.21.1). Proxy header X-Forwarded-* are set as follows:1. X-Forwarded-For: $proxy_add_x_forwarded_for2. X-Forwarded-Proto: https3. X-Forwarded-Host: dev.<...>.com4. X-Forwarded-Port: 4435. X-Forwarded-Prefix: /pgadmin46. X-Script-Name: /pgadmin4Vouch Proxy (version 0.32.0) checks client credentials via a configured IDP.pgadmin itself is only configured with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD and runs using port 80, which is also used in nginx proxy configuration.After successful login I only see the progress indicator (see attachment). Looking at browser developer tools I see that besides 200 status responses there are a lot of 302 responses too, e.g., 302 GET dev.<...>.com /pgadmin4/browserCreating a port-forward in Kubernetes towards the /pgadmin4 container works right away.I tried to modify the pgadmin environment according to https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#pgadmin-x-forwarded-configuration by setting all values to "1". But it did not work. Furthermore, I don't understand the purpose and possible configuration setups.What can I do?Thanks in advanceJörg Liebig--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
Re: Running pgadmin4:5.5 behind reverse-proxy only shows progress indicator after successful login
От
Aditya Toshniwal
Дата:
The problem occurs generally when pgAdmin is used behind load balancers. Glad that it worked.
On Thu, Aug 12, 2021 at 12:36 PM Jörg Liebig <joliebig@gmail.com> wrote:
Hi Aditya,The setting solved the problem and pgadmin works now. Thank you.Best regardsJörg LiebigOn Thu, Aug 12, 2021 at 8:58 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Jorg,Can you try setting - PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=False for docker env ?On Thu, Aug 12, 2021 at 11:06 AM Jörg Liebig <joliebig@gmail.com> wrote:Hi Aditya,No, I'm not getting any errors in browser developer tools. Besides the effect I already mentioned before with the progress indicator, I'm getting more 302 (see attachment) and redirection errors shown in the browser. This happens during authentication at the login screen. Additionally, when trying to login I get "CSRF tokens do not match" and the layout of the page is disrupted (see attachment).What can I do?Jörg LiebigOn Thu, Aug 12, 2021 at 6:35 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Jorg,Are you getting any console errors in browser developer tools ?On Wed, Aug 11, 2021 at 9:35 PM Jörg Liebig <joliebig@gmail.com> wrote:Hi,I'm trying to run pgadmin in a Kubernetes cluster with the following setup:+-------+
| Vouch |
| Proxy |
+-^---+-+
| |
| |
+---------+ +-+---v---+ +-----------+
| Browser +--------> Reverse +------> /pgadmin4 |
| | | Proxy | | |
+---------+ +---------+ +-----------+pgadmin runs in a container at endpoint /pgadmin4 behind a reverse proxy using nginx (version 1.21.1). Proxy header X-Forwarded-* are set as follows:1. X-Forwarded-For: $proxy_add_x_forwarded_for2. X-Forwarded-Proto: https3. X-Forwarded-Host: dev.<...>.com4. X-Forwarded-Port: 4435. X-Forwarded-Prefix: /pgadmin46. X-Script-Name: /pgadmin4Vouch Proxy (version 0.32.0) checks client credentials via a configured IDP.pgadmin itself is only configured with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD and runs using port 80, which is also used in nginx proxy configuration.After successful login I only see the progress indicator (see attachment). Looking at browser developer tools I see that besides 200 status responses there are a lot of 302 responses too, e.g., 302 GET dev.<...>.com /pgadmin4/browserCreating a port-forward in Kubernetes towards the /pgadmin4 container works right away.I tried to modify the pgadmin environment according to https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#pgadmin-x-forwarded-configuration by setting all values to "1". But it did not work. Furthermore, I don't understand the purpose and possible configuration setups.What can I do?Thanks in advanceJörg Liebig--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"