(apologies for the previous quote mess - forgot to switch to plain text mode)
On Tue, 3 May 2022 at 19:06, Andy Seaborne <[email protected]> wrote: > > > > On 03/05/2022 15:56, Vilnis Termanis wrote: > > (fixing up the quote): > > > My understanding is that, for updates, the stack of datasets is respected > > when deciding whether access the text index whereas for querying the > > dataset context is used, which is not stacked. > > I'm confused. "understanding of what is supposed to happen" or > "understanding of what does happen"? What is "stacked" - do you mean the > context settings should not pushed down? That seems like a safer > approach to me and removes the burden on the user knowing to set the > endpoint context. (I didn't word that well.) What I meant is: From my (limited) understanding of the code: 1) Updates to the text index happen because, at runtime, the base dataset instance is wrapped as a Text dataset (with method overrides) - this mirrors the assembly/config. Only updated targeting the wrapped DS will result in text index updates. 2) Queries on the other hand hit the text index based on presence of the "text:index" value in the merged context. Since there appears to be only one dataset context (regardless of the number of DS wrappings), as long as somewhere in the configuration a dataset has been wrapped as a Text dataset, even the base dataset (with it's updated context) will also end up allowing use of the text index. > > > (The context merging is for > > server + dataset + endpoint but there is only one of each.) > > I think the proposed fix would cause issues only if there is an expectation > > for AccessControlledDataset to behave differently when it comes to handling > > endpoint context: Right now it is ignored. > > Yes, if it is secure - that has be be determined. As per comment on the > PR, requiring the user to set endpoint context is making the users life > harder. > > But we have two issues here - whether the access control is correctly > picking up the context (a general issue c.f. timeouts) if it is safe to > do so, and whether the text dataset should push down the context setting > (specific issues of locating the text index). > > There is a subsidiary issue: cleanly unsetting a context entry. > > > But hopefully this is a good starting point to throw rocks at. > > So should the PR be a draft? Yes, I should have set it as such before. (Done now.) > > Andy -- Vilnis Termanis Technical Specialist e | [email protected] www.iotics.com The information contained in this email is strictly confidential and intended only for the parties noted. If this email was not intended for your use, please contact Iotics. For more on our Privacy Policy please visit https://www.iotics.com/legal/
