Обсуждение: portion of pgadmin page not allowed to display

Поиск
Список
Период
Сортировка

portion of pgadmin page not allowed to display

От
Tom Plancon
Дата:

Hello,

 

New to pgadmin. Installed pgadmin4 web version on ubuntu 22 with apache2 using apt repository.

Installation appeared to be successful; I am able to log into the site, connect to my database and see schema list etc..

However, when I select a table and click “View data”, I see this in the right-side display area:

 

To protect your security, ‘mysite.myDomain.com’ will not allow Firefox to display the page if another site has embedded it. To see this page, you need to open it in a new window.

 

I’ve tried other browsers and get a broken page icon. I assume it’s an apache2 configuration issue, but I’m not having much luck googling it

Any help is appreciated. Thanks much.

 

Thomas Plancon

CAD/IT Manager

 

BKA / Architects

Main Office | 508.583.5603

142 Crescent Street | Brockton, MA  02302

LinkedIn | Facebook | Instagram

 

 

 

Вложения

Re: portion of pgadmin page not allowed to display

От
Dave Page
Дата:
Hi

On Thu, 4 May 2023 at 16:15, Tom Plancon <tplancon@bkaarchs.com> wrote:

Hello,

 

New to pgadmin. Installed pgadmin4 web version on ubuntu 22 with apache2 using apt repository.

Installation appeared to be successful; I am able to log into the site, connect to my database and see schema list etc..

However, when I select a table and click “View data”, I see this in the right-side display area:

 

To protect your security, ‘mysite.myDomain.com’ will not allow Firefox to display the page if another site has embedded it. To see this page, you need to open it in a new window.

 

I’ve tried other browsers and get a broken page icon. I assume it’s an apache2 configuration issue, but I’m not having much luck googling it

Any help is appreciated. Thanks much.


It sounds like Apache is setting the X-Frame-Options header to DENY in its responses. You can check that on the Network tab in the developer tools (right-click, and select "Inspect", and then find the initial request in the list - probably the top one). For example, this is from www.postgresql.org:

Screenshot 2023-05-04 at 16.28.54.png

See the third header from the bottom on the right.

pgAdmin won't work with that set (which is not the default as far as we've ever seen); you'll need to update your Apache config to either not send the header at all, or set it to SAMEORIGIN.
 
--
Вложения

RE: portion of pgadmin page not allowed to display

От
Tom Plancon
Дата:

Hi Dave,

 

Thank you for your response.

 

In the apache2 security.conf, the “Header set X-Frame-Options “sameorigin” ” line was commented out. I uncommented it, restarted apache2 and postgresql, no change in pgadmin4 behavior.

 

I added the line directly to the apache2.conf, restarted everything again, no change.

 

I don’t seem to have the developers tools you mentioned. Again, I installed pgadmin4 from the Ubuntu apt repository.

 

I’m running this Ubuntu server on the Azure cloud. I’m wondering if that is putting some restrictions on server behavior.

 

BTW, how do you stop, restart pgadmin4, by restarting postgresql?

 

Thanks again.

 

Thomas Plancon

CAD/IT Manager

 

BKA / Architects

Main Office | 508.583.5603

142 Crescent Street | Brockton, MA  02302

LinkedIn | Facebook | Instagram

 

 

 

From: Dave Page <dpage@pgadmin.org>
Sent: Thursday, May 4, 2023 11:34 AM
To: Tom Plancon <tplancon@bkaarchs.com>
Cc: pgadmin-support@lists.postgresql.org
Subject: Re: portion of pgadmin page not allowed to display

 

Hi

 

On Thu, 4 May 2023 at 16:15, Tom Plancon <tplancon@bkaarchs.com> wrote:

Hello,

 

New to pgadmin. Installed pgadmin4 web version on ubuntu 22 with apache2 using apt repository.

Installation appeared to be successful; I am able to log into the site, connect to my database and see schema list etc..

However, when I select a table and click “View data”, I see this in the right-side display area:

 

To protect your security, ‘mysite.myDomain.com’ will not allow Firefox to display the page if another site has embedded it. To see this page, you need to open it in a new window.

 

I’ve tried other browsers and get a broken page icon. I assume it’s an apache2 configuration issue, but I’m not having much luck googling it

Any help is appreciated. Thanks much.

 

It sounds like Apache is setting the X-Frame-Options header to DENY in its responses. You can check that on the Network tab in the developer tools (right-click, and select "Inspect", and then find the initial request in the list - probably the top one). For example, this is from www.postgresql.org:

 

 

See the third header from the bottom on the right.

 

pgAdmin won't work with that set (which is not the default as far as we've ever seen); you'll need to update your Apache config to either not send the header at all, or set it to SAMEORIGIN.

 

--

Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com

Вложения

Re: portion of pgadmin page not allowed to display

От
Dave Page
Дата:
Hi

On Fri, 5 May 2023 at 02:36, Tom Plancon <tplancon@bkaarchs.com> wrote:

Hi Dave,

 

Thank you for your response.

 

In the apache2 security.conf, the “Header set X-Frame-Options “sameorigin” ” line was commented out. I uncommented it, restarted apache2 and postgresql, no change in pgadmin4 behavior.

 

I added the line directly to the apache2.conf, restarted everything again, no change.

 

I don’t seem to have the developers tools you mentioned. Again, I installed pgadmin4 from the Ubuntu apt repository.


The developer tools are built into Firefox - see https://firefox-source-docs.mozilla.org/devtools-user/.

Please check the response headers (and post them here) for the initial request to the server, and for any that have been blocked (they normally get displayed in red).
 

 

I’m running this Ubuntu server on the Azure cloud. I’m wondering if that is putting some restrictions on server behavior.


It shouldn't make any difference. People run in the cloud all the time.
 

 

BTW, how do you stop, restart pgadmin4, by restarting postgresql?



No - the PostgreSQL server often isn't even on the same VM. Assuming you're running pgAdmin in web mode using a standard setup done by our setup-web.sh (i.e. mod_wsgi, not uwsgi or gunicorn), to restart the pgAdmin server you simply restart the Apache server that it's hosted by.

--

RE: portion of pgadmin page not allowed to display

От
Tom Plancon
Дата:

Dave,

 

Here is a screenshot of headers from Dev Tools, ( I thought you were referring to pgadmin dev tools – sorry!).

 

 

It appears I have 2 settings that contradict each other, and a set of duplicate X-Content-Type-Options. I assume that means 2 different apache2 conf files are being referenced?

 

Thomas Plancon

CAD/IT Manager

 

BKA / Architects

Main Office | 508.583.5603

142 Crescent Street | Brockton, MA  02302

LinkedIn | Facebook | Instagram

 

 

 

From: Dave Page <dpage@pgadmin.org>
Sent: Friday, May 5, 2023 4:25 AM
To: Tom Plancon <tplancon@bkaarchs.com>
Cc: pgadmin-support@lists.postgresql.org
Subject: Re: portion of pgadmin page not allowed to display

 

Hi

 

On Fri, 5 May 2023 at 02:36, Tom Plancon <tplancon@bkaarchs.com> wrote:

Hi Dave,

 

Thank you for your response.

 

In the apache2 security.conf, the “Header set X-Frame-Options “sameorigin” ” line was commented out. I uncommented it, restarted apache2 and postgresql, no change in pgadmin4 behavior.

 

I added the line directly to the apache2.conf, restarted everything again, no change.

 

I don’t seem to have the developers tools you mentioned. Again, I installed pgadmin4 from the Ubuntu apt repository.

 

The developer tools are built into Firefox - see https://firefox-source-docs.mozilla.org/devtools-user/.

 

Please check the response headers (and post them here) for the initial request to the server, and for any that have been blocked (they normally get displayed in red).

 

 

I’m running this Ubuntu server on the Azure cloud. I’m wondering if that is putting some restrictions on server behavior.

 

It shouldn't make any difference. People run in the cloud all the time.

 

 

BTW, how do you stop, restart pgadmin4, by restarting postgresql?

 

 

No - the PostgreSQL server often isn't even on the same VM. Assuming you're running pgAdmin in web mode using a standard setup done by our setup-web.sh (i.e. mod_wsgi, not uwsgi or gunicorn), to restart the pgAdmin server you simply restart the Apache server that it's hosted by.

 

--

Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com

Вложения

Re: portion of pgadmin page not allowed to display

От
Dave Page
Дата:


On Fri, 5 May 2023 at 22:32, Tom Plancon <tplancon@bkaarchs.com> wrote:

Dave,

 

Here is a screenshot of headers from Dev Tools, ( I thought you were referring to pgadmin dev tools – sorry!).

 

 

It appears I have 2 settings that contradict each other, and a set of duplicate X-Content-Type-Options. I assume that means 2 different apache2 conf files are being referenced?


That would be my guess, yes. I note there are two X-Content-Type-Options headers as well, so I suspect your configuration is messed up in some way that's causing things to get set twice. I'd have a search for other config files that might be setting either of those headers for the same virtual host.
 

 

Thomas Plancon

CAD/IT Manager

 

BKA / Architects

Main Office | 508.583.5603

142 Crescent Street | Brockton, MA  02302

LinkedIn | Facebook | Instagram

 

 

 

From: Dave Page <dpage@pgadmin.org>
Sent: Friday, May 5, 2023 4:25 AM
To: Tom Plancon <tplancon@bkaarchs.com>
Cc: pgadmin-support@lists.postgresql.org
Subject: Re: portion of pgadmin page not allowed to display

 

Hi

 

On Fri, 5 May 2023 at 02:36, Tom Plancon <tplancon@bkaarchs.com> wrote:

Hi Dave,

 

Thank you for your response.

 

In the apache2 security.conf, the “Header set X-Frame-Options “sameorigin” ” line was commented out. I uncommented it, restarted apache2 and postgresql, no change in pgadmin4 behavior.

 

I added the line directly to the apache2.conf, restarted everything again, no change.

 

I don’t seem to have the developers tools you mentioned. Again, I installed pgadmin4 from the Ubuntu apt repository.

 

The developer tools are built into Firefox - see https://firefox-source-docs.mozilla.org/devtools-user/.

 

Please check the response headers (and post them here) for the initial request to the server, and for any that have been blocked (they normally get displayed in red).

 

 

I’m running this Ubuntu server on the Azure cloud. I’m wondering if that is putting some restrictions on server behavior.

 

It shouldn't make any difference. People run in the cloud all the time.

 

 

BTW, how do you stop, restart pgadmin4, by restarting postgresql?

 

 

No - the PostgreSQL server often isn't even on the same VM. Assuming you're running pgAdmin in web mode using a standard setup done by our setup-web.sh (i.e. mod_wsgi, not uwsgi or gunicorn), to restart the pgAdmin server you simply restart the Apache server that it's hosted by.

 

--

Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com



--
Вложения