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 1ntYL7-0003cr-7Q for pgsql-hackers@arkaria.postgresql.org; Tue, 24 May 2022 17:29:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntYL5-0001vK-Vf for pgsql-hackers@arkaria.postgresql.org; Tue, 24 May 2022 17:28:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntYL5-0001si-Jf for pgsql-hackers@lists.postgresql.org; Tue, 24 May 2022 17:28:59 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ntYL1-0006xk-H4 for pgsql-hackers@postgresql.org; Tue, 24 May 2022 17:28:58 +0000 Received: by mail-pj1-x1033.google.com with SMTP id p13-20020a17090a284d00b001e0817e77f6so1797296pjf.5 for ; Tue, 24 May 2022 10:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=I3iAhB0KE8AyDqVvMu7p7vfBTA6OG4RMcXiQCkHzUI8=; b=dIvDTjcHStbH91cFhKpE8rY40AzeNSGSVH7dz2koD+roQVuJ+cZV9Okig87sCRV0Lk Eth9CBdSkTohUyeOyrDvqcqf7xDByHt++kdh0TzKel3yz9N0ZuDm0TsKdW5b2+/uoo12 zjewjLB16oaaV/8owjL874e+Yyvy6Kkt/Vs5dZAt1gsIdaCJ2fdyxz7ADyPu4t+ZF9Kc HqchKLj5xMIpSy7f+TeYkMif9Hab1bdVQgKBEAtQV0k5STVBx0imuuxRIB89CW9dwBFS WIA4gZuH7dr3pd9OQBEkTe4hq4L9ZInyQvPuFckfsQP6AZTRV2XMibcTilVS+33PqCO5 Qx+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=I3iAhB0KE8AyDqVvMu7p7vfBTA6OG4RMcXiQCkHzUI8=; b=LRvKgCiPyk1MjyOWZW6lH7oMkuhd1a3MAQOhw+8lgArIVWIK3ncVx474AFytjQJ3xP VfjMN8EaGDA9qmNWEl5oBwYzO5ogACU+kdkZJb07D3yYFM9Rso7grayNRTFtY32ZS9KJ v1saimd3R6/aR58pUCl+PYofg/8OrMGN6hL15jbPwljaWBM4bPlGkMwZ6wIGXNwEC4BL qTILIZ8xe8GMAa3BhvwovEgcoQ6VWoUOs7VnAinmfgMSflX1njNJRgcMsymUVVoIgmJw 0tUEvVHnfp1MO0RMflbwYmSC09ZlCixgwIAAvzLYxCshzpR2EuMHx5z2h/rrzqzN+0O5 A/8g== X-Gm-Message-State: AOAM530cmL4+0PaGEZRdRrHiL21R3qI1dyN+HIu540m5P9bzfNgW4OJU A9+eAPrG+pHtnJqiUU9/A1k= X-Google-Smtp-Source: ABdhPJxRsbb53Dd6W2SBVJgyLoTyNx7EYVI1TuBfHdOgKRyMfjmp4ubjyHm3DNdMeF43iHpaqVEwdw== X-Received: by 2002:a17:90b:4b8d:b0:1e0:9cc7:731 with SMTP id lr13-20020a17090b4b8d00b001e09cc70731mr506165pjb.127.1653413334531; Tue, 24 May 2022 10:28:54 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id n5-20020a17090a928500b001dc7623950csm48686pjo.11.2022.05.24.10.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 10:28:53 -0700 (PDT) Date: Tue, 24 May 2022 10:28:51 -0700 From: Nathan Bossart To: Robert Haas Cc: Tom Lane , "pgsql-hackers@postgresql.org" Subject: Re: allow building trusted languages without the untrusted versions Message-ID: <20220524172851.GA1191690@nathanxps13> References: <20220520225619.GA876272@nathanxps13> <571753.1653092411@sss.pgh.pa.us> <20220523165403.GC938919@nathanxps13> <1290329.1653326228@sss.pgh.pa.us> <1333860.1653338790@sss.pgh.pa.us> <1354561.1653345768@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, May 24, 2022 at 12:39:16PM -0400, Robert Haas wrote: > On Mon, May 23, 2022 at 6:42 PM Tom Lane wrote: >> [ shrug... ] So is your point that we shouldn't bother to do anything? >> I don't personally have a problem with leaving things where they stand >> in this area. However, if we're going to do something, I think at >> minimum it should involve blocking off everything we can identify as >> straightforward reproducible methods to get disk access. > > No, my point is that one size doesn't fit all. Bundling everything > together that could result in a disk access is going to suck too many > marginally-related into the same bucket. It's much better to have > individual switches controlling individual behaviors, so that people > can opt into or out of the behavior that they want. > > I would argue that Stephen's proposal (that is, using predefined roles > more) and Nathan's proposal (that is, making it possible to build only > the trusted version of some PL) are tackling this problem are far > superior to your idea (that is, a flag to disable all disk access) > precisely because they are more granular. Your idea appears to > presuppose that there is exactly one thing in this area that anybody > wants and that we know what that thing is. I think people want a bunch > of slightly different things and that we're probably unaware of many > of them. Letting them pick which behaviors they want seems to me to > make a lot of sense. Can we do both? That is, can we add retail options for untrusted languages, generic file access functions, etc., and then also introduce a --disable-disk-access configuration option? The latter might even just be a combination of retail options. This would allow for more granular configurations, but it also could help address Tom's concerns. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com