Commit Graph

82 Commits

Author SHA1 Message Date
Akshay Joshi
2786f7ac5a Update copyright notices for 2022 2022-01-04 13:54:25 +05:30
Rahul Shirsat
572b5a126a Ensure that internal authentication when combined with other authentication providers, the order of internal source should not matter while picking up the provider. Fixes #6832 2021-11-11 12:29:30 +05:30
Nikhil Mohite
3ddf941cd7 Added support to launch PSQL for the connected database server. Fixes #2341 2021-05-25 20:12:57 +05:30
Akshay Joshi
3fc0cc3e92 Fixed SonarQube issues 2021-02-15 17:31:20 +05:30
Akshay Joshi
102ffd141c Implemented runtime using NWjs to open pgAdmin4 in a standalone window
instead of the system tray and web browser. Used NWjs to get rid of QT
and C++. Fixes #5967

Use cheroot as the default production server for pgAdmin4. Fixes #5017
2021-01-29 13:38:27 +05:30
Khushboo Vashi
c0ef0a893d 1) Added support for Kerberos authentication, using SPNEGO to forward the Kerberos tickets through a browser. Fixes #5457
2) Fixed incorrect log information for AUTHENTICATION_SOURCES. Fixes #5829
2021-01-18 16:32:10 +05:30
Akshay Joshi
f0debdd513 Revert "1) Added support for Kerberos authentication, using SPNEGO to forward the Kerberos tickets through a browser. Fixes #5457"
This reverts commit 6ead597b43.
2021-01-14 14:46:59 +05:30
Khushboo Vashi
6ead597b43 1) Added support for Kerberos authentication, using SPNEGO to forward the Kerberos tickets through a browser. Fixes #5457
2) Fixed incorrect log information for AUTHENTICATION_SOURCES. Fixes #5829
2021-01-14 13:46:48 +05:30
Akshay Joshi
b372f08a59 Update copyright notices for 2021 2021-01-04 15:34:45 +05:30
Cyril Jouve
5a253f9053 Change the following to replace Python 2 code with Python 3:
1) Replace the deprecated unit test method.
2) Wraps filter usage in a list call.
3) Converts the old metaclass syntax to new.
4) Use range instead of xrange method.
5) Change Unicode to str.
6) Several other transformations.
7) Fixed change password test cases.
8) Use simplejson instead of plain JSON.
2020-08-31 16:45:31 +05:30
Aditya Toshniwal
d6400bbcae Replace the generic exception class with a more specific one. 2020-08-07 12:37:00 +05:30
Aditya Toshniwal
357a9179b1 Fixed convention related issues reported by SonarQube. 2020-07-09 18:55:33 +05:30
Pradip Parkale
916182f80f Fixed code smell for variable naming convention. 2020-07-09 18:28:08 +05:30
Aditya Toshniwal
059f1e38cc Refactor pgAdmin4.py so it can be imported and is a lot more readable. Fixes #5455 2020-05-04 15:28:44 +01:00
Dave Page
7dd00a1494 Raise an exception under Python < 3.4.
It also cleans up the README to remove references to Python 2
and removes Python 2-isms from the main config.

refs #5443
2020-04-30 14:17:00 +05:30
Ashesh Vashi
a930c6617b Merged adjustanct 'if' statements when allowed.
Also - removed the unused variables.
2020-04-14 18:43:04 +05:30
Khushboo Vashi
f77aa3284f Added LDAP authentication support. Fixes #2186 2020-04-06 15:57:05 +05:30
Aditya Toshniwal
093d7af748 Remove cheroot server for now until we find a way to shutdown cheroot using REST call. Fixes #5069. 2020-01-07 18:45:07 +05:30
Dave Page
01c7636c75 Update copyright notices for 2020. 2020-01-02 14:43:50 +00:00
Aditya Toshniwal
15c518f0f1 Use cheroot as default production server for pgAdmin4. Fixes #5017
If DEBUG is true then we used the default flask server.
2019-12-20 11:32:02 +05:30
Dave Page
8cb239abcb Rename some internal environment variables that could conflict with Kubernetes. Fixes #4999. 2019-12-13 10:42:43 +05:30
Aditya Toshniwal
c4facc04d3 Fix pgAdmin4 failed to start issue after upgrading to version 4.15. Fixes #4978 2019-12-02 11:40:48 +05:30
Aditya Toshniwal
245a6e6f57 Added backward compatible code for reverse proxy in case werkzeug is older.
Make werkzeug greater than equal to 0.15.0
2019-10-01 17:55:43 +05:30
Aditya Toshniwal
faf8062830 pgAdmin4 unable to work behind Nginx reverse proxy running on a non-standard port.
Werkzeug middleware allows us to set the number of trusted ports and few other params
behind the proxy. By default values are set to zero.

Added 'X-Forwarded-*' configuration options and set the default value of the port to 1 to work with non-standard port.

Fixes #4768
2019-09-27 13:24:35 +05:30
Aditya Toshniwal
82aa2d1819 Ensure that pgAdmin should work behind reverse proxy if the inbuilt server is used as it is. Fixes #4755 2019-09-23 11:50:32 +05:30
Khushboo Vashi
546161ab1a Fix an issue with stdout redirection on Windows, and remove code added in a failed attempt to resolve a Windows regression test issue. 2019-03-19 15:55:34 +00:00
Dave Page
f401def044 Add support for reverse proxied setups with Gunicorn, and document Gunicorn, uWSGI & NGINX configurations. Fixes #2001 2019-03-04 16:29:41 +00:00
Murtuza Zabuawala
e23d307c56 Update copyright notices for 2019 2019-01-02 15:54:12 +05:30
Dave Page
c8b456d464 PEP8 fixes 2018-03-20 14:02:56 +00:00
Khushboo Vashi
4942c938ac Fix an error on exit caused by the cookie path patch. 2018-03-20 13:55:06 +00:00
Khushboo Vashi
534f1f35fe Appropriately set the cookie path. Fixes #3197 2018-03-19 17:09:19 +00:00
Khushboo Vashi
0283f68d7f Minor formatting fix 2018-03-08 11:07:05 +00:00
Joao Pedro De Almeida Pereira
3a6994f719 Final PEP-8 fixes 2018-03-08 09:33:43 +00:00
Murtuza Zabuawala
393ce53d2d Fix PEP8 issues in the Tools module. Fixes #3063 2018-01-26 16:54:21 +00:00
Dave Page
89821c0d19 Update copyright notices for 2018. 2018-01-05 10:42:50 +00:00
Dave Page
f195b18f2d Ship with pre-configured paths that can work in both Server and Desktop modes out of the box. Fixes #2662
Ship the web code using server mode with appropriate paths by default and enable the runtime to override the mode, and force into desktop changing the appropriate paths to user-specific ones.

Note that this change will likely cause more advanced users to have to tweak configs.

RPMs will also need changes to create /var/lib/pgadmin and /var/log/pgadmin, owned by the webserver account.
2017-08-25 10:54:28 +01:00
Surinder Kumar
a49a3103e2 Prevent the Werkzeug reloader from causing a "double start" at init time. 2017-07-21 09:46:30 +01:00
Shruti B Iyer
659eb1c1e8 Bring React into the tree, and add linting and bundling framework for the JS etc. 2017-06-12 16:51:54 +01:00
Sarah McAlear
6283ef7f5e [Configuration][Migration] Use 'alembic' for migration of the SQLite
based configuration file from one version to another, and also allows us
to have a single path of creating the table instead of creating tables
using SQLAlchemy or hand rolled SQL

This allows us to run the migrations directly in the code, and it will
avoid the error prone version numbering.

Patched by: Sarah McAlear
Revisions: Joao Pedro De Almeida Pereira, George Gelashvili.
Reviewed by: Ashesh Vashi, Murtuza Zabuawala
2017-04-24 08:37:27 +05:30
Murtuza Zabuawala
bc63652811 Fix the issue where Import/Export was failing in linux runtime. Fixes #2166
Issue:
Changes done by Ashesh in pgAdmin4.py file for setting up PYTHONHOME variable to sys.prefix was applicable only for windows only.

Additionally I have also added exception handling for file provided by user for Backup/Restore/Import/Export.
2017-03-09 09:54:55 +00:00
Ashesh Vashi
f2fc1ceba8 Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).

We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.

TODO
* Add better support for non-ascii characters in the database name on
  windows with Python 3
* Improve the messages created after the background processes by
  different modules (such as Backup, Restore, Import/Export, etc.),
  which does not show short-paths, and xml representable characters for
  non-ascii characters, when found in the database objects, and the file
  PATH.

Fixes #2174, #1797, #2166, #1940

Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 15:31:03 +05:30
Dave Page
6696b3c316 Authenticate the runtime to the server. Fixes #2228 2017-03-06 14:53:49 +00:00
Atira Odhner
fe1aec5de0 Add feature test framework, using selenium and chromedriver for UI testing.
Written by both George and Atira at Pivotal.
2017-02-22 12:41:28 +00:00
Ashesh Vashi
2f6a0e01da Ensure that PYTHONHOME is set for sub-processes such as the background executor. 2017-02-10 22:42:44 +00:00
Dave Page
f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Dave Page
bc5cc964a3 Move security keys into the SQLite database, and auto-generate them.
This avoids packagers having to deal with the issue, which can be
difficult if they need to cater for both server and desktop modes.

Fixes #1849
2016-10-19 09:22:38 +01:00
Murtuza Zabuawala
8d7b840e7e Fix startup navigation message. 2016-08-23 12:41:41 +01:00
Dave Page
050937a32a Fix WSGI support. 2016-08-18 13:43:00 +01:00
Dave Page
d63b54610b Move the config database schema version out of the configuration file and into the model class.
Turns out using the config file isn't a good idea if users copy config.py to config_local.py, as it prevents upgrades to the database. This has the added side-effect of simplifying future changes, as you only need to edit 2 files to modify the config DB now, not 3.
2016-06-24 12:50:52 +01:00
Ashesh Vashi
a35288e25d Save the runtime status information in the application object for using
it other places.

globals() does not return consistent value across the application
context.

Thanks Neel Patel for reporting the issue.
2016-06-21 15:13:04 +05:30