Giter Club home page Giter Club logo

Comments (3)

bipthelin avatar bipthelin commented on September 1, 2024

Thanks Daniel but to be honest a great coder and colleague of mine @mtornwall is the original author of that module. Anyway I think you're reading it backwards. You should think of it as A βŠ† B such as {root, a} βŠ† {root, a, b}. That is A is a subset with same or fewer elements than B for the function oauth2_priv_set:is_subset(A, B).

from oauth2.

mtornwall avatar mtornwall commented on September 1, 2024

Hi @drobakowski! This behavior is the result of a (perhaps unfortunate) design decision early on. Basically, when testing if A is a subset of B we check if all paths in A are also in B. In your first example the path root-a is indeed present in B. This has been the source of much confusion. The idea is that you shouldn't associate any privileges with non-leaf nodes, like root.a.

I am typing this up on my tablet so I had to be brief. If you have more questions I will try and answer them from a real computer. :)

from oauth2.

drobakowski avatar drobakowski commented on September 1, 2024

Hi @bipthelin, hi @mtornwall! Thanks for your quick and detailed response! The behavior and idea of priv_set is now clear to me. My focus was to strong on our own privilege scenario, where we have to restrict the privileges only with leaf nodes and not to every possible path of the tree. With a set in mind the methods is_subset/is_member work as expected. :) For now we'll evaluate and work with our internal priv_set implementation, thanks again for the detailed description!

from oauth2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.