

You will be asked to supply and confirm a password for the user. We will create a file for this purpose called htpasswd within our /etc/apache2 configuration directory.

If it is set to False, the corresponding user must be created by pgAdmin admin otherwise login will be denied.Īfter editing above parameters, config_system.py will look as below: # Webserver AuthenticationĪUTHENTICATION_SOURCES = Ĭonfiguring Apache Password Authentication This parameter determines whether the end user should be stored in the pgAdmin database for the future login or not. Common values: REMOTE_USER, HTTP_X_FORWARDED_USER, X-Forwarded-User. Set this variable to any header or environment variable to get the webserver remote user details. To enable web server authentication support, you need to add ‘webserver’ in the list. To enable web server authentication for pgAdmin, you must configure the settings below in the config_local.py or config_system.py file (see the config.py documentation) on the system where pgAdmin is installed in Server mode.

Configure pgAdmin 4 for Apache2 Password Authentication The process is the same on other Linux distributions, but file, directory, and service names may differ. This blog will guide you to set up the apache2 webserver authentication with HTTP BASIC auth in pgAdmin 4, on Debian or Ubuntu Linux. To enable web server authentication, the web server must be configured for any authentication mechanism (such as HTTP Basic auth or Shibboleth) which sets either headers or environment variables which will be used in pgAdmin to identify the user. With web server authentication, the web server performs the authentication and the application trusts the web server. Web server authentication (HTTP authentication) is the most common application of third-party authentication. In addition to the four existing authentication methods Kerberos, LDAP, OAuth 2.0, and internal, pgAdmin4 now supports webserver authentication. PgAdmin 4 supports multiple authentication methods through its pluggable architecture.
