Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iyrMj-0008G6-K1 for pgsql-general@arkaria.postgresql.org; Tue, 04 Feb 2020 06:07:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iyrMi-0006kk-Ei for pgsql-general@arkaria.postgresql.org; Tue, 04 Feb 2020 06:07:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iyrMi-0006kd-5J for pgsql-general@lists.postgresql.org; Tue, 04 Feb 2020 06:07:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iyrMf-0008HB-JC for pgsql-general@lists.postgresql.org; Tue, 04 Feb 2020 06:07:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 014676Sv016204; Tue, 4 Feb 2020 01:07:06 -0500 From: Tom Lane To: Pawan Sharma cc: Adrian Klaver , Ravi Krishna , pgsql-general@lists.postgresql.org Subject: Re: Restrict connection from pgadmin. In-reply-to: References: <993e25c3-0389-3f32-2b0c-a3d250e09a10@aklaver.com> Comments: In-reply-to Pawan Sharma message dated "Tue, 04 Feb 2020 11:25:14 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16202.1580796426.1@sss.pgh.pa.us> Date: Tue, 04 Feb 2020 01:07:06 -0500 Message-ID: <16203.1580796426@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pawan Sharma writes: > Yes I will show the pgadmin in stat_activity but how can block that.. > I think I need to create a job to terminate the pgadmin connections and > schedule it for every 5 min and so that I will check any new connections > from pgadmin. I think onlookers are still completely mystified as to why you consider this a useful activity. pgadmin is nothing but a GUI. Whatever can be done through it can be done equally well through psql, or any other client software. So if you're looking for security against unwanted SQL commands, you're going about it the wrong way (better to look at preventing logins of privileged accounts, and/or use of SQL permissions to limit what can be done). If your objective is something else, you haven't explained what that is. regards, tom lane