Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppOSD-0002es-89 for pgsql-general@arkaria.postgresql.org; Thu, 20 Apr 2023 07:11:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ppOSB-0000jV-TU for pgsql-general@arkaria.postgresql.org; Thu, 20 Apr 2023 07:11:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppOSB-0000hI-D4 for pgsql-general@lists.postgresql.org; Thu, 20 Apr 2023 07:11:39 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ppOS6-003zK3-2x for pgsql-general@lists.postgresql.org; Thu, 20 Apr 2023 07:11:38 +0000 Received: by mail-ej1-x62c.google.com with SMTP id b16so4207759ejz.3 for ; Thu, 20 Apr 2023 00:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20221208.gappssmtp.com; s=20221208; t=1681974693; x=1684566693; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=O2rzEsy5Zhyeka2gQUyXBqiUUJQpWXGDU+UsJcRlVOw=; b=yog1PhEK1OdnatoqwPTskh9qnKNhtovCZeEX6LpVbAAxUZFVYdgNryAPl91RSA40mQ StBV0lRKkGgmMYHXzAtdWzlcqU7EvhhLVFNUO/bqgL7ZBJwmyAW5qIljCzGVh8xPQ4VG f6G1MP3at+8KyGntcG2nlJT1toqw5M2qvz0aRNZiS2HB5wj0g2492D8xttlig8zRuJat m8f97eAkUDGfmHleBAiP7v+MSM9Pt45BvMt55PhJSV/q/A/r/4pzsAnhxtnT2yM3PfJk R2r++t8EnhT524kmys1x6ioGMitFcjCXqBwYXkghmbLk2QLlvijJ5Stmnd3ZgKux6oaz +lgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681974693; x=1684566693; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=O2rzEsy5Zhyeka2gQUyXBqiUUJQpWXGDU+UsJcRlVOw=; b=C2r9REF+lFRbGHCidogURMIhwwdRG+cLcoPdI0cJEgz/mTgG2xru+hSKleInrFSPUT PfLtfiCD6MWA3ewC3K7M3JOgo73fe6l57hqUcvzi5OdZlMgHGFaWTdrpEkDIewS1b/eQ 36ryhaYmX5pt3/vJiLwoYKZ0Ek54VBbBgH1wGtqxLaFG8jaMDcrsymS/8h3r7kRxxh+y lzoJIBUcfJAYONEpl+2qwu8+jNqH+hFWWQ5VZ3+2yEFmL/H3jthMa2/WjS4CPrQkg7Bz XyhxDFmx+6+X12mkUFP41qRPyta+wWgVhlTqFZ3NDyQSAYUFit/yBEAEJz4D0d4GRzJK roOw== X-Gm-Message-State: AAQBX9fevN822zMhTv8xv/W+LbReufHblMXuWay+3PlIHIjFxxYZGqgJ zIYTIWZXIErQ3j+e7baQv/7yUg== X-Google-Smtp-Source: AKy350buQn9+HF0tO6VJvgLF3kcRI7xsAZzpEHlCB3mT7crjfB6ddbye31opYGo7G6uKHekybYxisQ== X-Received: by 2002:a17:906:c7c2:b0:94f:1:8469 with SMTP id dc2-20020a170906c7c200b0094f00018469mr534725ejb.35.1681974692673; Thu, 20 Apr 2023 00:11:32 -0700 (PDT) Received: from localhost.localdomain (62-46-252-205.adsl.highway.telekom.at. [62.46.252.205]) by smtp.gmail.com with ESMTPSA id qw11-20020a170906fcab00b0094e4eabb402sm385250ejb.128.2023.04.20.00.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 00:11:32 -0700 (PDT) Message-ID: Subject: Re: What happened to the tip "It is good practice to create a role that has the CREATEDB and CREATEROLE privileges..." From: Laurenz Albe To: Bryn Llewellyn , Jeremy Smith Cc: pgsql-general list Date: Thu, 20 Apr 2023 09:11:31 +0200 In-Reply-To: <67321D1A-9C90-42A5-A0D8-4A1C37EA4568@yugabyte.com> References: <67321D1A-9C90-42A5-A0D8-4A1C37EA4568@yugabyte.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2023-04-19 at 16:53 -0700, Bryn Llewellyn wrote: >=20 > I do see that a role that has=C2=A0"createdb" and "createrole" is pretty = powerful because, > for example, a role with these attributes can use "set role" to become an= y other non-superuser > (see the example below). A user with CREATEROLE can make herself a member of "pg_execute_server_prog= ram", which in turn allows a clever attacker on a normal installation to make herself s= uperuser. Yours, Laurenz Albe