Hey Laurent, Thanks for sharing the doc ! This was really helpful in collaborating and I appreciate your responses in the thread !
Regarding defining view as DEFINER / INVOKER in the view security property, it was intentional in my design in IRC to leave it open ended, it really nice to see that it's well received [1] Now talking of detecting cycles, i believe this should be ideally done in the engine, at least the spark implementation we do cycle detection before we send the referenced by ... [2], trino would do the same is my hope, i am already following up there. > interpret it as a signal that the SPI PR [1] can be moved out of draft? +1 on making the pr ready for review so that folks can add further comments Couple of questions which i would love to get other folks thoughts on as well : 1. How do we detect a view is DEFINER view in catalog .. presently if the view is required to be binded to role with explicitly, why not have ownership model defined as PG / other engines does [3], so this becomes more implicit, i understand the counter argument to that was not all platform does it this way where ownership is not a privilege, but before we go into introducing a entirely new way to mark view as definer, love to hear from more folks in this context (existing thread here [4]) 2. I wonder if we should return an effective Principal too from authZ ? for example we took in the caller Principal and we authorized against views binded roles .. this would be helpful in potentially solving the difference in audit one could see in STS calls [5] [1] https://docs.google.com/document/d/15zgmACxue8jH8SIBAJNzZ64Mx6RTRmDv2IoH3Clc2uQ/edit?tab=t.0 [2] https://github.com/apache/iceberg/pull/13979/changes [3] https://www.postgresql.org/docs/current/rules-privileges.html#RULES-PRIVILEGES [4] https://docs.google.com/document/d/1B4K7iQvnRYHBnOrP6pXnw48keflZcBkM5l1-ooAOCZg/edit?disco=doco.mNymgmR2gOoIrhNxWBPlkg [5] https://docs.google.com/document/d/1B4K7iQvnRYHBnOrP6pXnw48keflZcBkM5l1-ooAOCZg/edit?disco=doco.beRMshNVaWEW1D77ttypPQ Best, Prashant Singh On Thu, Nov 12, 2026 at 4:43 PM Yufei Gu <[email protected]> wrote: > Hi Laurent, thanks for working on it, +1 on moving this out of the draft so > people can start the review. > > Yufei > > > On Thu, Nov 12, 2026 at 12:01 PM Laurent Goujon via dev < > [email protected]> wrote: > > > Just checking on this proposal. > > > > I got a few comments (thanks Yufei, JB and Prashant), a couple (minor > > ones?) on the SPI but most of them on the builtin authorizer part? > Should I > > interpret it as a signal that the SPI PR [1] can be moved out of draft? > > > > Laurent > > > > [1] https://github.com/apache/polaris/pull/5980 > > > > On Wed, Nov 4, 2026 at 12:18 PM Laurent Goujon <[email protected]> > wrote: > > > > > Hi all, > > > > > > The Iceberg REST spec has an optional `referenced-by` query parameter > on > > > loadTable, loadView and loadCredentials (apache/iceberg#13810). When an > > > engine loads a table or view while evaluating a view, it can pass the > > chain > > > of views it went through, outermost first. It was added to make definer > > > views possible. Polaris accepts the parameter but drops it today, so no > > > authorizer can act on it. > > > > > > I wrote a proposal and opened a draft PR for the first part: > > > > > > - Proposal: https://github.com/apache/polaris/issues/5979 > > > - Draft PR (part 1): https://github.com/apache/polaris/pull/5980 > > > > > > The proposal has two parts: > > > > > > 1. SPI. Pass the parsed chain to authorizers through a new > > > `SingleTargetAuthorizationIntent#referencedBy()` accessor. A chain that > > > cannot be parsed, is deeper than a configurable limit (10 by default) > or > > > repeats an entry is rejected with a 400. The chain is added to the load > > > events. Existing authorizers (built-in, OPA, Ranger) are unchanged, and > > the > > > PR does not change any decision. > > > 2. Built-in authorizer. An administrator binds a view to a catalog role > > (a > > > new `CATALOG_ROLE_EXECUTE_AS` privilege, with the view as the grantee), > > and > > > a new catalog privilege marks the callers that may assert a chain. The > > > built-in authorizer then evaluates the chain, switching to the bound > role > > > at each bound view. This part is not in the PR. > > > > > > Since part 1 changes an extension point, I would like to agree on it > here > > > before taking the PR out of draft. > > > > > > Re part 2: the proposal includes it so that part 1 comes with a proof > of > > > concept for how an authorizer would use the chain. I can also work on a > > PR > > > for it, or we could focus on a different authorizer instead (I'm open > to > > > that). > > > > > > Thanks, > > > Laurent > > > > > >
