Code Monkey home page Code Monkey logo

Comments (1)

john-h-kastner-aws avatar john-h-kastner-aws commented on August 11, 2024 1

Thanks for submitting this request! I've tagged this requires-RFC because it would be a substantial change to the language which we wouldn't make without careful planning.

I think you're actually asking for a restricted version of the macro mechanism proposed in cedar-policy/rfcs#61. We're not actively considering that proposal at the moment, but we haven't rejected it completely either. Definitely restart discussion there if that proposal sounds useful. You could also write a fresh RFC proposing a more limited version of macros that work for you, potential avoiding some of the thornier issues identified in general macros.

Depending on your exact use case, we might be able to suggest a nicer alternative. In your example, the uuid appears in the principal constraint. If it only occurs there (or in the resource constraint), then you may be able to use policy templates as a safe alternative to find-and-replace. E.g., given a template permit(principal in ?principal, ...); the Cedar sdk provides a method to construct a template-linked-policy by replacing ?principal with a particular entity uid. If templates don't quite meet your needs, you could restart discussion on some extension to templates we previously considered but decided not to accept: templates groups, and template slots in policy conditions.

from cedar.

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.