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
This commit is contained in:
Khushboo Vashi
2021-01-14 13:46:48 +05:30
committed by Akshay Joshi
parent 9a47e574e3
commit 6ead597b43
22 changed files with 474 additions and 40 deletions

View File

@@ -1,8 +1,9 @@
import config
from flask import current_app
from flask import current_app, session
from flask_login import current_user
from pgadmin.model import db, User, Server
from pgadmin.utils.crypto import encrypt, decrypt
from pgadmin.utils.constants import KERBEROS
MASTERPASS_CHECK_TEXT = 'ideas are bulletproof'
@@ -32,6 +33,11 @@ def get_crypt_key():
elif config.MASTER_PASSWORD_REQUIRED \
and not config.SERVER_MODE and enc_key is None:
return False, None
elif config.SERVER_MODE and \
session['_auth_source_manager_obj']['source_friendly_name']\
== KERBEROS:
return True, session['kerberos_key'] if 'kerberos_key' in session \
else None
else:
return True, enc_key