2024-05-02 16:03:59 +01:00
package attest
2024-04-22 12:22:15 -05:00
import rego . v1
2024-05-22 14:49:23 +01:00
keys := [{
2024-06-06 09:59:32 +01:00
"id" : "a0c296026645799b2a297913878e81b0aefff2a0c301e97232f717e14402f3e4" ,
"key" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHyZpSgzvqFqNv7f3x7865OS38rAb\nQMcff55zM2UH/KR3Pr84a8QsGDNgaNGzJQJWjtMSgfV8WnNoffNK+svFNg==\n-----END PUBLIC KEY-----" ,
"from" : "2023-12-15T14:00:00Z" ,
"to" : null ,
2024-05-22 14:49:23 +01:00
}]
default success := false
2024-04-22 12:22:15 -05:00
2024-06-06 09:59:32 +01:00
provs ( pred ) := p if {
res := attest . fetch ( pred )
not res . error
p := res . value
2024-04-22 12:22:15 -05:00
}
2024-06-06 09:59:32 +01:00
atts := union ({ provs ( "foo" )})
opts := { "keys" : keys }
success if {
some env in atts
res := attest . verify ( env , opts )
not res . error
2024-05-22 14:49:23 +01:00
}
2024-06-06 09:59:32 +01:00
result := { "success" : success }