QwentB commented on pull request #1308:
URL: https://github.com/apache/tinkerpop/pull/1308#issuecomment-712263821


   Thanks for your answer @vtslab 
   
   I agree that caching authorization have a memory impact and that it does not 
make sense with a "many users submitting few requests" scenario, on the other 
hand, if you consider the gremlin server as a storage backend accessed by a few 
front-end servers (so a "few users / many requests" scenario) caching the 
authorizations makes more sense. You're absolutely right that it should 
definitely have some configurable limits and eviction strategy.
   All this being said, caching was just an example of the possibilities 
offered to potential implementations, my main point was more "separation of 
concerns" related as, IMO, the authorization provisioning should be separated 
from the authorization process itself.
   
   Regarding the second point, I might be misunderstanding what you mean by:
   
   > "Add/remove Strategies can be done by offering the same graph via 
different GraphTraversalSources that differ by the Strategies applied"
   
   , but I guess you're referring to the statically defined traversalSources in 
the server's configuration file. The use case being the definition of a 
`graph1ReadOnly` traversal sources pointing to `graph1` but with a 
ReadOnlyStrategy, and then make sure `ReadOnlyUser` can only access 
`graph1ReadOnly`, and the same principle could be applied to a 
`graph1WithoutConfidentialData` traversal source with a SubgraphStrategy 
applied.
   
   I agree that request message analysis coupled with such configuration 
provides some interesting features and will cover some use cases, but it is not 
applicable to an ABAC implementation where the potential combinatory of all 
attributes does not allow the static definition of all possible traversal 
sources. With the Authorizer interface returning a RequestMessage, an 
Authorizer could, for example, inject a SubgraphStrategy matching the exact 
authorizations of the user and effectively limitating the visbility.
   
   I'm also wondering why the Authorizer is currently returning an 
AuthorizedUser which does not contain much and does not seems to be used 
anywhere afterward. If the idea is to add it to the context and use it later 
down the pipeline, for example, to call the "withAuthorizaton' method of an 
AuthorizedTraversalSource, I thing we're back to point #1 about storing data in 
the context.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to