feat: support effective package override during policy loading - #821
Maksym (maksym-mishchenko) wants to merge 4 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Maksym (@maksym-mishchenko) Can you describe the usecase for this? |
Sure, Anand Krishnamoorthi (@anakrish) In our ERP policy-loading flow, we need to compile a Rego policy with RVM under a different package namespace from the one declared in its source. The override lets us choose that namespace at load time without changing the stored policy text. We don’t need to rewrite absolute references or imports. For example, a policy may declare |
|
The same can be achieved by compiling: package erp.policy_123
allow := data.authz.allowWon't the above work for you? Also why do you want to "compile a Rego policy with RVM under a different package namespace from the one declared in its source"? |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f3ddf258-ed55-43f9-a073-ae0c2ea911cf
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f3ddf258-ed55-43f9-a073-ae0c2ea911cf
Summary
tenant.authzdetermines interpreter/RVM package identity, entrypoints, and package introspection while retaining original policy source and diagnostics.data.*references and imports unchanged; C# RVM callers useProgram.CompileFromEngine.Validation
Work item: WI 3763339.