Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1nQM-000QQi-2K for pgsql-general@arkaria.postgresql.org; Fri, 18 Oct 2024 13:53:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t1nQK-004vKg-3d for pgsql-general@arkaria.postgresql.org; Fri, 18 Oct 2024 13:53:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1jx8-001yJl-Jv for pgsql-general@lists.postgresql.org; Fri, 18 Oct 2024 10:11:27 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t1jx6-001h13-Cz for pgsql-general@lists.postgresql.org; Fri, 18 Oct 2024 10:11:26 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5c9fd6dae47so2166781a12.2 for ; Fri, 18 Oct 2024 03:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729246283; x=1729851083; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=+afGP/UbHDhf5kKJEdBLml9VbDlCYfYLTOQjNUhsuyU=; b=UOySMSRRikS3R7ApS+vGIhFaGwtCmL8VfFfxYy0lWx482X146xI2liVAa2SS11Cow5 RIl5dO75aKX7cZFtD+iTKIdBvWo3RK5glHxy8OE8RC19f9bo+c6DDX+XGcF4Lf+S33Qv u/gAZS5y32GAWJLc/jGj19f5NfFdOJAKPHPFGRA6pj8uw45Br3gmET/chmpX6+pzYCS8 2zYac4fJYhKEOEXTVGHg5h/qSTAYyxjpQl9sCMHQGnMreew2HAKy7dE2Nua9F7uM1+nq QPW3I2YzbRfwTfNbT0Jzc+CJM50fvS00+4PJ9aIhN6Nb2hMZP7jmramYyzXxk0H6xcEG nuSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729246283; x=1729851083; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+afGP/UbHDhf5kKJEdBLml9VbDlCYfYLTOQjNUhsuyU=; b=nDRAbXw+Bxp30Xz4gmHSKkJKobfa9J245+qAmeNiKXks0PF4/KBw0rPffT5eSSpx40 SZP/973+UsRj1UEsWqE6gZgmaImzswy+qHSUe3QGxGOb8lwMSAA4584L8LaANuq0Oc7R zxot3mzU6OK9oBJMe+/7regrW2Miq30YYEpTAtMET2i4c6TLelBkPsMHNpUM+KrEH+Tk 72XA9ZcJC9yDFzHMF403mYN0aY6lv29yWSA9ooluwsCsVjHELMjMCLv2kNueXyPy9qjA YtqS5tn8gVSDnc2nG3PuAQZY1vI6wWwwpv1xwn0u8UWVwI9o7XI38g9orcfGo36MONDI GmNw== X-Gm-Message-State: AOJu0Yz5VOAC9YlbeF9ki4vFH5yLMz6wxXC9o2DoV9fr/cbGzUpjvm+l rN75Qd/xLg0VHosSZmySXAC+BRGGPimAY/DuVI387wu6irtNkfNrjGkXffzyY4CAi7qmzlNOazD 8Y8MMMwyLs9JUDkg1QarNms7WmIWOvAM0 X-Google-Smtp-Source: AGHT+IGwWxPCGwK/gChReZndb6jSsyaJw+pLIQd7KF4BG6KxgeYvhhvijtoFMIhkqteam5Fi3da/zrZuAawEMfVsRkI= X-Received: by 2002:a05:6402:3818:b0:5c8:9476:2bf with SMTP id 4fb4d7f45d1cf-5ca0af7effamr1438394a12.35.1729246282554; Fri, 18 Oct 2024 03:11:22 -0700 (PDT) MIME-Version: 1.0 From: sreekanta reddy Date: Fri, 18 Oct 2024 15:41:04 +0530 Message-ID: Subject: Permissions for Newly Created User To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000066b28a0624bd8628" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000066b28a0624bd8628 Content-Type: text/plain; charset="UTF-8" Dear PostgreSQL Support Team, I would also like to suggest an enhancement to the default behavior for newly created users in PostgreSQL. *Observed Issue:*User Created: testdb Command used: CREATE USER testdb WITH PASSWORD 'dhsfjobodjjbsdj'; After creating the user testdb, I observed that the user could still view objects, schemas, and their structures, as well as system tables and views, which contradicts the intended restricted permissions. Specifically: The user was able to connect to the database and see all schemas, including those they should not have visibility into. Even when permissions were revoked for specific schemas, the user could still list available tables and view their structures. *Suggested Privileges for Newly Created Normal Users:*I would like to suggest enhancements to the default behavior for newly created normal users in PostgreSQL to improve data security: *Database Connection:* The user should have the ability to connect only to postgres databases by default *Schema and Table Access:* If the public schema contains 100 tables, the newly created user should not be able to list or view the structure of any table unless at least one specific privilege has been granted on those tables. Ideally, the system should provide a hint like "user has insufficient privilege to view schema or table details" when access is restricted. Restricted Visibility: The user should not have access to list schemas, tables, or any non-system-related objects unless explicitly authorized. *Read-Only Configurations:* The user should have read-only access to view database configuration parameters. *Privileges:* Additional by default privileges provided if necessary *Additional Suggestion:*I would also like to highlight a security concern regarding password handling: When creating or altering a user's password, the log file captures the password in plain text format, which could be a potential security risk. However, when using the \password command in psql, the password is logged in its hashed format (SHA-256), which is a more secure practice. I recommend extending this hashed logging format to all password creation and modification operations. These suggestions aim to strengthen PostgreSQL's security by minimizing unnecessary access to sensitive data and improving password handling. Thank you in advance for considering these. Best regards, Sreekanta Reddy --00000000000066b28a0624bd8628 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Dear PostgreSQL Support Team,

I would also like= to suggest an enhancement to the default behavior for newly created users = in PostgreSQL.

Observed Issue:
User Created: testdb
Com= mand used: CREATE USER testdb WITH PASSWORD 'dhsfjobodjjbsdj';
A= fter creating the user testdb, I observed that the user could still view ob= jects, schemas, and their structures, as well as system tables and views, w= hich contradicts the intended restricted permissions. Specifically:
The = user was able to connect to the database and see all schemas, including tho= se they should not have visibility into.
Even when permissions were revo= ked for specific schemas, the user could still list available tables and vi= ew their structures.

Suggested Privileges for Newly Created Norma= l Users:
I would like to suggest enhancements to the default behavio= r for newly created normal users in PostgreSQL to improve data security:
Database Connection:=C2=A0The user should have the ability to c= onnect only to postgres =C2=A0databases by default

Schema and Tab= le Access:=C2=A0If the public schema contains 100 tables, the newly cre= ated user should not be able to list or view the structure of any table unl= ess at least one specific privilege has been granted on those tables.
Id= eally, the system should provide a hint like "user has insufficient pr= ivilege to view schema or table details" when access is restricted.Restricted Visibility: The user should not have access to list schemas, ta= bles, or any non-system-related objects unless explicitly authorized.
Read-Only Configurations:=C2=A0The user should have read-only acce= ss to view database configuration parameters.
Privileges:=C2=A0Ad= ditional by default privileges provided if necessary

Additional S= uggestion:
I would also like to highlight a security concern regardi= ng password handling:

When creating or altering a user's passwor= d, the log file captures the password in plain text format, which could be = a potential security risk.
However, when using the \password command in = psql, the password is logged in its hashed format (SHA-256), which is a mor= e secure practice. I recommend extending this hashed logging format to all = password creation and modification operations.
These suggestions aim to = strengthen PostgreSQL's security by minimizing unnecessary access to se= nsitive data and improving password handling.

Thank you in advance f= or considering these.

Best regards,
Sreekanta Reddy
--00000000000066b28a0624bd8628--