Skip to content

Allow merging PolicySet instances #610

@nakedible-p

Description

@nakedible-p

Category

User level API features/changes

Describe the feature you'd like to request

Currently it is possible to create PolicySet instances from cedar policy files or JSON sources, which contain both policies and templates. However, often policies are split between multiple files. PolicySet does not implement any functions for merging multiple PolicySet instances together. Adding this possibility would seem useful.

Describe alternatives you've considered

It is possible to manually iterate through the policies of one PolicySet and add them to the other. However in this case the policies and templates must be added individually. Also, it's not exactly clear if the "id" values of the policies end up conflicting, or if the policies would need to be "renamed" while doing this.

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestThis issue requets a substantial new featuregood-first-issueGood for newcomers. A smaller issue that someone new to the Cedar codebase should be able to tacklehelp-wantedCommunity help desired. We have not scheduled time to fix this, but think it important.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions