microsoft / scitt-ccf-ledger

Supply Chain Integrity Transparency and Trust ledger application using Confidential Consortium Framework (CCF)
MIT License
35 stars 16 forks source link

Add configurable policy via sandboxed JS execution #203

Closed eddyashton closed 1 month ago

eddyashton commented 1 month ago

Demonstrating how the JS interpreter API added in CCF 5 could be used to implement dynamic/customisable policy.

In short:

Includes some tests of the error paths, and of a simple sample policy which protects some feeds so they can only be claimed by a given issuer. These feeds and issuers are currently literals within the policy script, but they could also be read from the KV.