addSsiPolicyV2
Require verifiable credentials for every service of the asset, on a node with the native SSI
module (pontusx-node: OpenID4VP 1.0 with DCQL, walt.id verifier-api2). Adds an SSIpolicyV2
value to credentials.allow. Every value of the asset and of the service must be satisfied (AND).
Usage
.({
: '2',
: {
: [
{
: 'legal_person',
: 'jwt_vc_json',
: { : [['gx:LegalPerson']] },
: [{ : ['credentialSubject', 'gx:legalName'] }]
}
]
},
: ['signature', 'expiration', 'not_before', 'revocation'],
: {
: [{ : 'allowed_issuer', : ['did:web:issuer.example'] }]
}
}) A Gaia-X-only value asks the node to check the presenting organisation's compliance; the node adds the Gaia-X queries itself:
{ version: '2', dcql: { credentials: [] }, gaiax: { requireCompliance: true, minLabelLevel: 'L1' } }Checked before anything is published
The value is checked against the node's own rules (validateSsiPolicyV2Value), and an
SsiPolicyValidationError names the first problem:
- formats
jwt_vc_json,dc+sd-jwt,vc+sd-jwt; query ids[A-Za-z0-9_-]{1,64}, and notgx_compliance,gx_legal_personorgx_service_offering; - VC policies
signature,expiration,not_before,revocation,status(argument),allowed_issuer,json_schema(inlineschemaonly),vct_integrity:regexandwebhookare refused; require_cryptographic_holder_bindingcannot befalse;- Gaia-X cannot be combined with
jwt_vc_jsonqueries in one value (usedc+sd-jwt); - rego: inline, 64 KiB, one leading
package, nodata, nohttp.send,net.lookup_ip_addr,opa.runtime,printortrace. Compile it on the node withvalidateRego.
Set consumerBinding: true to require that every presented credential is bound to the
consumer's address: a jwt_vc_json holder must be the consumer's did:pkh/did:ethr, a
dc+sd-jwt credential is bound by the node's transaction_data (which the node sends for
dc+sd-jwt either way), and a vc+sd-jwt credential cannot be bound and fails.
removeSsiPolicyV2() removes every SSIpolicyV2 entry. For a node with a policy
server, use addRequestCredentials.