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 1pfkkj-0003CP-D0 for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Mar 2023 16:58:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pfkki-00008v-7u for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Mar 2023 16:58:56 +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 1pfkkh-00008k-UZ for pgsql-hackers@lists.postgresql.org; Fri, 24 Mar 2023 16:58:55 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pfkkf-0005kc-HZ for pgsql-hackers@postgresql.org; Fri, 24 Mar 2023 16:58:54 +0000 Received: by mail-pj1-x102f.google.com with SMTP id r7-20020a17090b050700b002404be7920aso1624127pjz.5 for ; Fri, 24 Mar 2023 09:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1679677132; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=N/rFtqvgNoQ7MukpdXepcL5EQBKGX4bSGfxgGzBNrb8=; b=Lj5wWWpZq5Y19vaUEuxDBMfFewN6dxrJLmhI0BK/UVV4/rrEgfnobOwTVXrk+r2Xwl PhhkT7uQknbtFwTPxXi6h6yLTpucAkvHbEAHkp399r8hwu8x6Vb8vE6wGaootYfl0Wmk 4ZtpaF0097skwyYl04HX8HWNPdMUOvNoeqXVBLUh0ITrZi7QubPbMCCww5MIYtJpzEs1 at2hPAm41GB+zgmJGUSEKAhEDN5SQAhyeGwGz1wQDi4X9ViOjZIW75sp7+Q3QEa5lgDB +fEVaovkVCDsAuWLsJ3hy0f+0CwxT/ehzgD++DG0qz+z0rNEXQg9npY1Nz0G2mgv4Jno IElQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679677132; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N/rFtqvgNoQ7MukpdXepcL5EQBKGX4bSGfxgGzBNrb8=; b=dXLtyH3ARuEOt2DlOyI18YEoPAn84IIK0pfKYUF8SFpvi3Zci/5u+fZFSTMu96kSxD NSlkEGvUCL44INohvdQS+GBpn0DirDQu2MEtxTsV/BgjR/9ssn2mVMa8z3gui8pR8jWw X3c2g07yjZCE0kVX28a9ahjjQoH9nw3U7vhMwUHjbJ0JxRNJGgc2nThqKkfxV+WyqZDy eYejZ26/hEXIKBFXLZ/SaXOE7uQNZ20E90OVeam6lL+pFLOwoqHJbGuCIL6Iu4krR9EA 46qgS3RFXEy89ei2CnU3uyyYcB2x+PCoXaj9xtubNEQonEKWjIX0T74nOgQ7qBbTd7il WkzQ== X-Gm-Message-State: AAQBX9czWFzMOJhmWJMG86T5G3UlpS/2bE3TcQCUM6duaB0Pi88aARqt Myff1/52jKtWaCNYiNws+2h0OWeU2l52VnKN/QnCJfj3EcqKRCeGh15nqPEk3IgVMYfKHYXj+Jk lH8jLOdrnINycfEHqNe66EfmGiciB3fnY258N8X16fP4KJPTLxWXzvUFZJqteBOVmaW/IR1rmc/ FTArxiwQCFCgKr5F6ZjuLcbc2A++v+pITKrg4x X-Google-Smtp-Source: AKy350ZbvUqhp0xMyRlofNJ6Q/prFpmG0vBiM7F6wzSAZCQwmhPHCQZlTryJ36h4zkIxkPCh3Bt+IQ== X-Received: by 2002:a17:902:facd:b0:19e:e001:6a75 with SMTP id ld13-20020a170902facd00b0019ee0016a75mr3197507plb.6.1679677132316; Fri, 24 Mar 2023 09:58:52 -0700 (PDT) Received: from smtpclient.apple (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id e1-20020a170902b78100b001a199972508sm14362268pls.124.2023.03.24.09.58.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2023 09:58:52 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: running logical replication as the subscription owner From: Mark Dilger In-Reply-To: Date: Fri, 24 Mar 2023 09:58:57 -0700 Cc: Jeff Davis , "pgsql-hackers@postgresql.org" , Andres Freund , Noah Misch Content-Transfer-Encoding: quoted-printable Message-Id: References: <68d5974b80e54672b59ff13e59d046c1e982fcd8.camel@j-davis.com> To: Robert Haas X-Mailer: Apple Mail (2.3731.400.51.1.1) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mar 24, 2023, at 7:00 AM, Robert Haas = wrote: >=20 > More generally, Stephen Frost has elsewhere argued that we should want > the subscription owner to be a very low-privilege user, so that if > their privileges get stolen, it's no big deal. I disagree with that. I > think it's always a problem if one user can get unauthorized access to > another user's account, regardless of exactly what those accounts can > do. I think our goal should be to make it safe for the subscription > owner to be a very high-privilege user, because you're going to need > to be a very high-privilege user to set up replication. And if you do > have that level of privilege, it's more convenient and simpler if you > can just own the subscription yourself, rather than having to make a > dummy account to own it. To put that another way, I think that what > people are going to want to do in a lot of cases is have the superuser > own the subscription, so I think we need to make that case safe, > whatever it takes. I also think the subscription owner should be a low-privileged user, = owing to the risk of the publisher injecting malicious content into the = publication. I think you are focused on all the bad actors on the = subscription-side database and what they can do to each other. That's = also valid, but I get the impression that you're losing sight of the = risk posed by malicious publishers. Or maybe you aren't, and can = explain? =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company