Re: sandboxing untrusted code

2023-09-05 Thread Jeff Davis
On Tue, 2023-09-05 at 12:25 -0400, Robert Haas wrote: > I think I've more or less answered this already -- fully sandboxed > code can't make reference to external data sources, from which it > follows that it can't exercise SELECT (and most other privileges). By what principle are we allowing

Re: sandboxing untrusted code

2023-09-05 Thread Robert Haas
On Fri, Sep 1, 2023 at 5:27 PM Jeff Davis wrote: > Which privileges are available in a sandboxed environment, exactly? Is > it kind of like masking away all privileges except EXECUTE, or are > other privileges available, like SELECT? I think I've more or less answered this already -- fully

Re: sandboxing untrusted code

2023-09-01 Thread Jeff Davis
On Fri, 2023-09-01 at 09:12 -0400, Robert Haas wrote: > Close but not quite. As you say, #2 does exercise privileges. Also, > even if no privileges are exercised, you could still refer to > CURRENT_ROLE, and I think you could also call a function like > has_table_privilege.  Your identity hasn't

Re: sandboxing untrusted code

2023-09-01 Thread Robert Haas
On Thu, Aug 31, 2023 at 8:57 PM Jeff Davis wrote: > > As a refresher, the scenario I'm talking about is any one in which > > one > > user, who I'll call Bob, does something that results in executing > > code > > provided by another user, who I'll call Alice. The most obvious way > > that this can

Re: sandboxing untrusted code

2023-08-31 Thread Jeff Davis
On Thu, 2023-08-31 at 11:25 -0400, Robert Haas wrote: > As a refresher, the scenario I'm talking about is any one in which > one > user, who I'll call Bob, does something that results in executing > code > provided by another user, who I'll call Alice. The most obvious way > that this can happen

sandboxing untrusted code

2023-08-31 Thread Robert Haas
On Mon, Feb 27, 2023 at 7:37 PM Jeff Davis wrote: > On Mon, 2023-02-27 at 16:13 -0500, Robert Haas wrote: > > On Mon, Feb 27, 2023 at 1:25 PM Jeff Davis wrote: > > > I think you are saying that we should still run Alice's code with > > > the > > > privileges of Bob, but somehow make that safe(r)