Code Monkey home page Code Monkey logo

Comments (5)

Geal avatar Geal commented on August 16, 2024

it could reduce the number of facts we have to write but I worry a bit about the expected usage. If there's a Set atom type, how would we make a rule that generate a fact containing one? At best it would copy another set, while we might want to get intersection, union or difference operations too?

from biscuit.

daeMOn63 avatar daeMOn63 commented on August 16, 2024

how would we make a rule that generate a fact containing one?

I'm not sure to see what you mean here, for me it's the same as for other atom types:

# copy the set
*new($usernames) <- users(#ambient, $usernames)

# create a new one ?
*new(["a", "b"]) <- users(#ambient, $usernames)

On intersection / union / diff support, I'm not sure how it could go, as it doesn't fit in constraints. It sounds more like a new operation kind allowing to compute a new value and reinject it in the program.

For constraints on Set, I don't need anything more than "contains only" and "doesn't contains any" at the moment.

from biscuit.

Geal avatar Geal commented on August 16, 2024

So creation would only be for a static set? I feel it would be more useful with set operations. On that topic ( I'll make it a separate issue), I'd like to support it, maybe as a new Expression atom type. That would allow constructing or combining values more easily.

Like, set construction could be:
set_result(insert($set, $val)) <- set_result($set), value($val)

from biscuit.

daeMOn63 avatar daeMOn63 commented on August 16, 2024

Yes, right now my use case is limited to static sets. Perhaps operations could get useful in more complex scenarios / attenuation use cases, but right now, I'd favor keeping it simple, at least to have it run and see how it behave. Same for expressions, I'd hold on it for now. I'll probably come back to it once I'll have gathered some feedback and limitations on running what we currently have!

from biscuit.

Geal avatar Geal commented on August 16, 2024

I'm adding sets to the spec: f5169d2
Rust: biscuit-auth/biscuit-rust@bb47508

one slight difference with your implementation, sets are added to the v1 format only

from biscuit.

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.