+app.PGADMIN_LDAP_AUTH_SOURCE = 'ldap'
+app.PGADMIN_KERBEROS_AUTH_SOURCE = 'kerberos'
--- a/web/pgAdmin4.wsgi
+++ b/web/pgAdmin4.wsgi
@@ -24,6 +24,10 @@ builtins.SERVER_MODE = True
import config
+
+config.AUTHENTICATION_SOURCES = ['kerberos']
+config.KERBEROS_AUTO_CREATE_USER = True
+
+ # if self.form.data['email'] and self.form.data['password'] and \
+ # source.get_source_name() ==\
+ # current_app.PGADMIN_KERBEROS_AUTH_SOURCE:
+ # continue
class KERBEROSAuthentication(BaseAuthentication):
+ 'auth_source': 'kerberos'
+@blueprint.route("/kerberos_login",
+ endpoint="kerberos_login", methods=["GET"])
+@blueprint.route("/kerberos_logout",
+ endpoint="kerberos_logout", methods=["GET"])
Hi AdityaCan you please do the code review?On Tue, Dec 22, 2020 at 3:44 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:Hi,Please find the attached patch to support Kerberos Authentication in pgAdmin RM 5457.The patch introduces a new pluggable option for Kerberos authentication, using SPNEGO to forward kerberos tickets through a browser which will bypass the login page entirely if the Kerberos Authentication succeeds.The complete setup of the Kerberos Server + pgAdmin Server + Client is documented in a separate file and attached.This patch also includes the small fix related to logging #5829Thanks,Khushboo--Thanks & RegardsAkshay JoshipgAdmin Hacker | Principal Software ArchitectEDB PostgresMobile: +91 976-788-8246