Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Lay groundwork for policy file loading #606

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

haines
Copy link
Member

@haines haines commented Jul 18, 2023

This PR lays the groundwork for a new package @cerbos/files that loads policies from YAML or JSON files, by separating the code generation templates per package (because @cerbos/files only needs to generate the Policy types) and exporting the policy conversion function from @cerbos/core (it's marked internal because it is only intended to be used by @cerbos/files).

As a side effect, this cleans up a bunch of unused generated code from @cerbos/lite, which contained code for the Admin API despite not implementing it.

Protos are now kept in the repository so that the code generation is reproducible (previously we always generated from the latest cerbos/cerbos commit).

@haines haines requested a review from alexolivier July 18, 2023 16:07
Signed-off-by: Andrew Haines <haines@cerbos.dev>
Signed-off-by: Andrew Haines <haines@cerbos.dev>
@haines haines merged commit e8ce421 into cerbos:main Jul 18, 2023
22 checks passed
@haines haines deleted the files-groundwork branch July 18, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants