M0 + M1 done

This commit is contained in:
marcos.lohmann_at_orcl
2026-09-11 15:04:34 -03:00
parent 5ebec725ec
commit 439f60598e
51 changed files with 2991 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package emcp.entitlement_test
import rego.v1
import data.emcp.entitlement
test_allow_when_tool_in_entitlement if {
entitlement.allow with input as {"client_profile": "Sales.Read", "tool": "sales.customer.get"}
with data.emcp.client_profiles as {"Sales.Read": {"allowed_tools": ["sales.customer.get"]}}
}
test_deny_when_tool_not_in_entitlement if {
# README.md §45 Teste 1/2: finance.createPayment must never be reachable
# by a Sales.Read client, discovered or not.
not entitlement.allow with input as {"client_profile": "Sales.Read", "tool": "finance.createPayment"}
with data.emcp.client_profiles as {"Sales.Read": {"allowed_tools": ["sales.customer.get"]}}
}
test_deny_when_client_profile_unknown if {
not entitlement.allow with input as {"client_profile": "NoSuchProfile", "tool": "sales.customer.get"}
with data.emcp.client_profiles as {"Sales.Read": {"allowed_tools": ["sales.customer.get"]}}
}