Added support to connect PostgreSQL servers via Kerberos authentication. Fixes #6158

This commit is contained in:
Khushboo Vashi
2021-05-03 16:10:45 +05:30
committed by Akshay Joshi
parent aa9a4c30d3
commit 72f3730c34
28 changed files with 509 additions and 90 deletions

View File

@@ -50,7 +50,7 @@ from pgadmin.utils.master_password import validate_master_password, \
set_crypt_key, process_masterpass_disabled
from pgadmin.model import User
from pgadmin.utils.constants import MIMETYPE_APP_JS, PGADMIN_NODE,\
INTERNAL, KERBEROS
INTERNAL, KERBEROS, LDAP
try:
from flask_security.views import default_render_json
@@ -197,7 +197,8 @@ class BrowserModule(PgAdminModule):
for name, script in [
[PGADMIN_BROWSER, 'js/browser'],
['pgadmin.browser.endpoints', 'js/endpoints'],
['pgadmin.browser.error', 'js/error']
['pgadmin.browser.error', 'js/error'],
['pgadmin.browser.constants', 'js/constants']
]:
scripts.append({
'name': name,
@@ -864,6 +865,18 @@ def exposed_urls():
)
@blueprint.route("/js/constants.js")
@pgCSRFProtect.exempt
def app_constants():
return make_response(
render_template('browser/js/constants.js',
INTERNAL=INTERNAL,
LDAP=LDAP,
KERBEROS=KERBEROS),
200, {'Content-Type': MIMETYPE_APP_JS}
)
@blueprint.route("/js/error.js")
@pgCSRFProtect.exempt
@login_required