Merge branch 'vc-ob-clr' of https://github.com/imsglc/ims-inspector into vc-ob-clr

This commit is contained in:
Andy Miller (IMS) 2022-09-09 09:13:44 -07:00
commit 9f6aeb5aed
17 changed files with 1933 additions and 84 deletions

View File

@ -12,7 +12,7 @@
<dependency>
<groupId>org.1edtech</groupId>
<artifactId>inspector-core</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>auth0</artifactId>
@ -28,14 +28,30 @@
<artifactId>java-jwt</artifactId>
<version>3.19.2</version>
</dependency>
<!-- https://repo.danubetech.com/#browse/browse:maven-public:com%2Fdanubetech%2Fverifiable-credentials-java%2F1.1-SNAPSHOT%2F1.1-20220818.090353-4 -->
<dependency>
<groupId>com.danubetech</groupId>
<artifactId>verifiable-credentials-java</artifactId>
<!-- <version>1.1-20220818.090353-4</version> -->
<version>1.1-SNAPSHOT</version>
</dependency>
<!-- https://repo.danubetech.com/#browse/browse:maven-public:com%2Fdanubetech%2Fkey-formats-java%2F1.6-SNAPSHOT -->
<dependency>
<groupId>com.danubetech</groupId>
<artifactId>key-formats-java</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
<!-- https://github.com/filip26/iron-verifiable-credentials -->
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>iron-verifiable-credentials-jre8</artifactId>
<version>0.7.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.apicatalog/titanium-json-ld -->
<!-- https://github.com/filip26/titanium-json-ld -->
<!-- https://mvnrepository.com/artifact/com.apicatalog/titanium-json-ld -->
<!-- https://github.com/filip26/titanium-json-ld -->
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>titanium-json-ld</artifactId>
@ -48,27 +64,22 @@
<version>4.5.13</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.setl/rdf-urdna -->
<!-- https://github.com/setl/rdf-urdna
<dependency>
<groupId>io.setl</groupId>
<artifactId>rdf-urdna</artifactId>
<version>1.1</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>com.apicatalog</groupId>
<artifactId>titanium-json-ld</artifactId>
</exclusion>
</exclusions>
</dependency>
-->
<!-- https://github.com/setl/rdf-urdna <dependency> <groupId>io.setl</groupId>
<artifactId>rdf-urdna</artifactId> <version>1.1</version> <exclusions> <exclusion>
<groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> <exclusion>
<groupId>com.apicatalog</groupId> <artifactId>titanium-json-ld</artifactId>
</exclusion> </exclusions> </dependency> -->
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>2.0.1</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>danubetech-maven-public</id>
<url>https://repo.danubetech.com/repository/maven-public/</url>
</repository>
</repositories>
</project>

View File

@ -58,15 +58,18 @@ public class ContextPropertyProbe extends Probe<JsonNode> {
return success(ctx);
}
private final static Map<Set<Credential.Type>, List<String>> values = new ImmutableMap.Builder<Set<Credential.Type>, List<String>>()
// TODO uris will change
private final static Map<Set<Credential.Type>, List<String>> values = new ImmutableMap.Builder<Set<Credential.Type>, List<String>>()
.put(Set.of(OpenBadgeCredential, AchievementCredential, EndorsementCredential),
List.of("https://www.w3.org/2018/credentials/v1",
"https://purl.imsglobal.org/spec/ob/v3p0/context.json"))
//"https://imsglobal.github.io/openbadges-specification/context.json")) //dev legacy
"https://purl.imsglobal.org/spec/ob/v3p0/context.json"))
.put(Set.of(ClrCredential),
List.of("https://www.w3.org/2018/credentials/v1",
// "https://dc.imsglobal.org/draft/clr/v2p0/context", //dev legacy
// "https://imsglobal.github.io/openbadges-specification/context.json")) //dev legacy
"https://purl.imsglobal.org/spec/clr/v2p0/context.json",
"https://purl.imsglobal.org/spec/ob/v3p0/context.json"))
.build();
public static final String ID = ContextPropertyProbe.class.getSimpleName();

View File

@ -1,6 +1,7 @@
package org.oneedtech.inspect.vc.probe;
import java.io.StringReader;
import java.net.URI;
import org.oneedtech.inspect.core.probe.Probe;
import org.oneedtech.inspect.core.probe.RunContext;
@ -8,23 +9,50 @@ import org.oneedtech.inspect.core.report.ReportItems;
import org.oneedtech.inspect.vc.Credential;
import org.oneedtech.inspect.vc.util.CachingDocumentLoader;
import com.apicatalog.jsonld.document.JsonDocument;
import com.apicatalog.ld.DocumentError;
import com.apicatalog.ld.signature.VerificationError;
import com.apicatalog.ld.signature.VerificationError.Code;
import com.apicatalog.vc.Vc;
import com.apicatalog.vc.processor.StatusVerifier;
import com.danubetech.verifiablecredentials.VerifiableCredential;
import jakarta.json.JsonObject;
import info.weboftrust.ldsignatures.verifier.Ed25519Signature2020LdVerifier;
/**
* A Probe that verifies a credential's embedded proof.
* @author mgylling
*/
public class EmbeddedProofProbe extends Probe<Credential> {
public EmbeddedProofProbe() {
super(ID);
}
/*
* Using verifiable-credentials-java (https://github.com/danubetech/verifiable-credentials-java)
*/
@Override
public ReportItems run(Credential crd, RunContext ctx) throws Exception {
VerifiableCredential vc = VerifiableCredential.fromJson(new StringReader(crd.getJson().toString()));
vc.setDocumentLoader(new CachingDocumentLoader());
URI method = vc.getLdProof().getVerificationMethod();
byte[] publicKey = method.toString().getBytes();
Ed25519Signature2020LdVerifier verifier = new Ed25519Signature2020LdVerifier(publicKey);
try {
verifier.verify(vc);
} catch (Exception e) {
return fatal("Embedded proof verification failed:" + e.getMessage(), ctx);
}
return success(ctx);
}
/*
* Note: using com.apicatalog Iron, we get a generic VC verifier that
* Note: if using com.apicatalog Iron, we get a generic VC verifier that
* will test other stuff than the Proof. So sometimes it may be that
* Iron internally retests something that we're already testing out in the
* Inspector class (e.g. expiration). But use this for now -- and remember
@ -32,39 +60,38 @@ public class EmbeddedProofProbe extends Probe<Credential> {
* (aka is not a jwt).
*/
public EmbeddedProofProbe() {
super(ID);
}
@Override
public ReportItems run(Credential crd, RunContext ctx) throws Exception {
JsonDocument jsonDoc = JsonDocument.of(new StringReader(crd.getJson().toString()));
JsonObject json = jsonDoc.getJsonContent().get().asJsonObject();
try {
Vc.verify(json)
.loader(new CachingDocumentLoader())
.useBundledContexts(false) //we control the cache in the loader
.statusVerifier(new NoopStatusVerifier())
//.domain(...)
//.didResolver(...)
.isValid();
} catch (DocumentError e) {
return error(e.getType() + " " + e.getSubject(), ctx);
} catch (VerificationError e) {
//System.err.println(e.getCode() + " (ProofVerifierProbe)");
if(e.getCode() == Code.Internal) {
return exception(e.getMessage(), ctx.getResource());
} else if(e.getCode().equals(Code.Expired)) {
//handled by other probe
} else {
return fatal(e.getCode().name() + " " + e.getMessage(), ctx);
}
}
return success(ctx);
}
// /*
// * Using iron-verifiable-credentials (https://github.com/filip26/iron-verifiable-credentials)
// */
// @Override
// public ReportItems run(Credential crd, RunContext ctx) throws Exception {
// JsonDocument jsonDoc = JsonDocument.of(new StringReader(crd.getJson().toString()));
// JsonObject json = jsonDoc.getJsonContent().get().asJsonObject();
// try {
// Vc.verify(json)
// .loader(new CachingDocumentLoader())
// .useBundledContexts(false) //we control the cache in the loader
// .statusVerifier(new IronNoopStatusVerifier())
// //.domain(...)
// //.didResolver(...)
// .isValid();
// } catch (DocumentError e) {
// return error(e.getType() + " " + e.getSubject(), ctx);
// } catch (VerificationError e) {
// //System.err.println(e.getCode() + " (ProofVerifierProbe)");
// if(e.getCode() == Code.Internal) {
// return exception(e.getMessage(), ctx.getResource());
// } else if(e.getCode().equals(Code.Expired)) {
// //handled by other probe
// } else {
// return fatal(e.getCode().name() + " " + e.getMessage(), ctx);
// }
//
// }
// return success(ctx);
// }
private static final class NoopStatusVerifier implements StatusVerifier {
private static final class IronNoopStatusVerifier implements StatusVerifier {
@Override
public void verify(Status status) throws DocumentError, VerifyError {
// noop

View File

@ -22,47 +22,57 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.io.Resources;
/**
* A com.apicatalog DocumentLoader with a threadsafe static cache.
* A com.apicatalog DocumentLoader with a threadsafe static cache.
*
* @author mgylling
*/
public class CachingDocumentLoader implements DocumentLoader {
@Override
public Document loadDocument(URI url, DocumentLoaderOptions options) throws JsonLdError {
public Document loadDocument(URI url, DocumentLoaderOptions options) throws JsonLdError {
Tuple<String, DocumentLoaderOptions> tpl = new Tuple<>(url.toASCIIString(), options);
try {
return documentCache.get(tpl);
return documentCache.get(tpl);
} catch (Exception e) {
logger.error("documentCache not able to load {}", url);
throw new JsonLdError(JsonLdErrorCode.INVALID_REMOTE_CONTEXT, e.getMessage());
}
}
}
static final ImmutableMap<String, URL> bundled = ImmutableMap.<String, URL>builder()
.put("https://www.w3.org/ns/did/v1", Resources.getResource("contexts/did-v1.jsonld"))
.put("https://www.w3.org/ns/odrl.jsonld", Resources.getResource("contexts/odrl.jsonld"))
.put("https://w3id.org/security/suites/ed25519-2020/v1", Resources.getResource("contexts/security-suites-ed25519-2020-v1.jsonld"))
.put("https://www.w3.org/2018/credentials/v1", Resources.getResource("contexts/2018-credentials-v1.jsonld"))
.put("https://purl.imsglobal.org/spec/ob/v3p0/context.json", Resources.getResource("contexts/obv3.jsonld"))
.build();
static final ImmutableMap<String, URL> bundled = ImmutableMap.<String, URL>builder()
.put("https://purl.imsglobal.org/spec/clr/v2p0/context.json",Resources.getResource("clr-v2p0.json"))
.put("https://purl.imsglobal.org/spec/ob/v3p0/context.json",Resources.getResource("ob-v3p0.json"))
.put("https://imsglobal.github.io/openbadges-specification/context.json",Resources.getResource("contexts/obv3x.jsonld"))
.put("https://www.w3.org/ns/did/v1", Resources.getResource("contexts/did-v1.jsonld"))
.put("https://www.w3.org/ns/odrl.jsonld", Resources.getResource("contexts/odrl.jsonld"))
.put("https://w3id.org/security/suites/ed25519-2020/v1",Resources.getResource("contexts/security-suites-ed25519-2020-v1.jsonld"))
.put("https://www.w3.org/2018/credentials/v1", Resources.getResource("contexts/2018-credentials-v1.jsonld"))
.put("https://w3id.org/security/v1", Resources.getResource("contexts/security-v1.jsonld"))
.put("https://w3id.org/security/v2", Resources.getResource("contexts/security-v2.jsonld"))
.put("https://w3id.org/security/v3", Resources.getResource("contexts/security-v3-unstable.jsonld"))
.put("https://w3id.org/security/bbs/v1", Resources.getResource("contexts/security-bbs-v1.jsonld"))
.put("https://w3id.org/security/suites/secp256k1-2019/v1", Resources.getResource("contexts/suites-secp256k1-2019.jsonld"))
.put("https://w3id.org/security/suites/ed25519-2018/v1", Resources.getResource("contexts/suites-ed25519-2018.jsonld"))
.put("https://w3id.org/security/suites/x25519-2019/v1", Resources.getResource("contexts/suites-x25519-2019.jsonld"))
.put("https://w3id.org/security/suites/jws-2020/v1", Resources.getResource("contexts/suites-jws-2020.jsonld"))
.build();
static final LoadingCache<Tuple<String, DocumentLoaderOptions>, Document> documentCache = CacheBuilder.newBuilder()
.initialCapacity(32)
.maximumSize(64)
.expireAfterAccess(Duration.ofHours(24))
.initialCapacity(32).maximumSize(64).expireAfterAccess(Duration.ofHours(24))
.build(new CacheLoader<Tuple<String, DocumentLoaderOptions>, Document>() {
public Document load(final Tuple<String, DocumentLoaderOptions> id) throws Exception {
public Document load(final Tuple<String, DocumentLoaderOptions> id) throws Exception {
try (InputStream is = bundled.keySet().contains(id.t1)
? bundled.get(id.t1).openStream()
? bundled.get(id.t1).openStream()
: new URI(id.t1).toURL().openStream();) {
return JsonDocument.of(is);
}
return JsonDocument.of(is);
}
}
});
public static void reset() {
documentCache.invalidateAll();
}
private static final Logger logger = LogManager.getLogger();
}

View File

@ -0,0 +1,53 @@
{
"@context": {
"id": "@id",
"type": "@type",
"ClrCredential": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#ClrCredential",
"@context": {
"id": "@id",
"type": "@type"
}
},
"ClrSubject": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#ClrSubject",
"@context": {
"id": "@id",
"type": "@type",
"cred": "https://www.w3.org/2018/credentials#",
"obi": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#",
"achievement": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#achievement",
"@type": "obi:Achievement",
"@container": "@set"
},
"association": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#association",
"@type": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#Association",
"@container": "@set"
},
"verifiableCredential": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#verifiableCredential",
"@type": "cred:verifiableCredential",
"@container": "@set"
}
}
},
"Association": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#Association",
"@context": {
"associationType": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#AssociationType"
},
"sourceId": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#sourceId",
"@type": "xsd:anyURI"
},
"targetId": {
"@id": "https://purl.imsglobal.org/spec/clr/v2p0/vocab.html#targetId",
"@type": "xsd:anyURI"
}
}
}
}
}

View File

@ -0,0 +1,440 @@
{
"@context": {
"id": "@id",
"type": "@type",
"xsd": "https://www.w3.org/2001/XMLSchema#",
"OpenBadgeCredential": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#OpenBadgeCredential"
},
"Achievement": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Achievement",
"@context": {
"achievementType": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#achievementType",
"@type": "xsd:string"
},
"alignment": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#alignment",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Alignment",
"@container": "@set"
},
"creator": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile"
},
"creditsAvailable": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#creditsAvailable",
"@type": "xsd:float"
},
"criteria": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Criteria",
"@type": "@id"
},
"fieldOfStudy": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#fieldOfStudy",
"@type": "xsd:string"
},
"humanCode": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#humanCode",
"@type": "xsd:string"
},
"otherIdentifier": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#otherIdentifier",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry",
"@container": "@set"
},
"related": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#related",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Related",
"@container": "@set"
},
"resultDescription": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#resultDescription",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#ResultDescription",
"@container": "@set"
},
"specialization": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#specialization",
"@type": "xsd:string"
},
"tag": {
"@id": "https://schema.org/keywords",
"@type": "xsd:string",
"@container": "@set"
},
"version": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#version",
"@type": "xsd:string"
}
}
},
"AchievementCredential": {
"@id": "OpenBadgeCredential"
},
"AchievementSubject": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#AchievementSubject",
"@context": {
"achievement": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Achievement"
},
"activityEndDate": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#activityEndDate",
"@type": "xsd:date"
},
"activityStartDate": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#activityStartDate",
"@type": "xsd:date"
},
"creditsEarned": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#creditsEarned",
"@type": "xsd:float"
},
"identifier": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identifier",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentityObject",
"@container": "@set"
},
"licenseNumber": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#licenseNumber",
"@type": "xsd:string"
},
"result": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#result",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Result",
"@container": "@set"
},
"role": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#role",
"@type": "xsd:string"
},
"source": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#source",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile"
},
"term": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#term",
"@type": "xsd:string"
}
}
},
"Address": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Address",
"@context": {
"addressCountry": {
"@id": "https://schema.org/addressCountry",
"@type": "xsd:string"
},
"addressCountryCode": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#CountryCode",
"@type": "xsd:string"
},
"addressLocality": {
"@id": "https://schema.org/addressLocality",
"@type": "xsd:string"
},
"addressRegion": {
"@id": "https://schema.org/addressRegion",
"@type": "xsd:string"
},
"geo": {
"@id" : "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#GeoCoordinates"
},
"postOfficeBoxNumber": {
"@id": "https://schema.org/postOfficeBoxNumber",
"@type": "xsd:string"
},
"postalCode": {
"@id": "https://schema.org/postalCode",
"@type": "xsd:string"
},
"streetAddress": {
"@id": "https://schema.org/streetAddress",
"@type": "xsd:string"
}
}
},
"Alignment": {
"@id": "https://schema.org/Alignment",
"@context": {
"targetCode": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#targetCode",
"@type": "xsd:string"
},
"targetDescription": {
"@id": "https://schema.org/targetDescription",
"@type": "xsd:string"
},
"targetFramework": {
"@id": "https://schema.org/targetFramework",
"@type": "xsd:string"
},
"targetName": {
"@id": "https://schema.org/targetName",
"@type": "xsd:string"
},
"targetType": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#targetType",
"@type": "xsd:string"
},
"targetUrl": {
"@id": "https://schema.org/targetUrl",
"@type": "xsd:anyURI"
}
}
},
"Criteria": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Criteria"
},
"EndorsementCredential": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementCredential"
},
"EndorsementSubject": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementSubject",
"@context": {
"endorsementComment": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#endorsementComment",
"@type": "xsd:string"
}
}
},
"Evidence": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Evidence",
"@context": {
"audience": {
"@id": "https://schema.org/audience",
"@type": "xsd:string"
},
"genre": {
"@id": "https://schema.org/genre",
"@type": "xsd:string"
}
}
},
"GeoCoordinates": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#GeoCoordinates",
"@context": {
"latitude": {
"@id": "https://schema.org/latitude",
"@type": "xsd:string"
},
"longitude": {
"@id": "https://schema.org/longitude",
"@type": "xsd:string"
}
}
},
"IdentifierEntry": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry",
"@context": {
"identifier": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identifier",
"@type": "xsd:string"
},
"identifierType": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identifierType",
"@type": "xsd:string"
}
}
},
"IdentityObject": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentityObject",
"@context": {
"hashed": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#hashed",
"@type": "xsd:boolean"
},
"identityHash": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identityHash",
"@type": "xsd:string"
},
"identityType": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#identityType",
"@type": "xsd:string"
},
"salt": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#salt",
"@type": "xsd:string"
}
}
},
"Image": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Image",
"@context": {
"caption": {
"@id": "https://schema.org/caption",
"@type": "xsd:string"
}
}
},
"Profile": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Profile",
"@context": {
"additionalName": {
"@id": "https://schema.org/additionalName",
"@type": "xsd:string"
},
"address": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Address"
},
"dateOfBirth": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#dateOfBirth",
"@type": "xsd:date"
},
"email": {
"@id": "https://schema.org/email",
"@type": "xsd:string"
},
"familyName": {
"@id": "https://schema.org/familyName",
"@type": "xsd:string"
},
"familyNamePrefix": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#familyNamePrefix",
"@type": "xsd:string"
},
"givenName": {
"@id": "https://schema.org/givenName",
"@type": "xsd:string"
},
"honorificPrefix": {
"@id": "https://schema.org/honorificPrefix",
"@type": "xsd:string"
},
"honorificSuffix": {
"@id": "https://schema.org/honorificSuffix",
"@type": "xsd:string"
},
"otherIdentifier": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#otherIdentifier",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#IdentifierEntry",
"@container": "@set"
},
"parentOrg": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#parentOrg",
"@type": "xsd:string"
},
"patronymicName": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#patronymicName",
"@type": "xsd:string"
},
"phone": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#PhoneNumber",
"@type": "xsd:string"
},
"official": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#official",
"@type": "xsd:string"
}
}
},
"Related": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Related",
"@context": {
"version": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#version",
"@type": "xsd:string"
}
}
},
"Result": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Result",
"@context": {
"achievedLevel": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#achievedLevel",
"@type": "xsd:anyURI"
},
"resultDescription": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#resultDescription",
"@type": "xsd:anyURI"
},
"status": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#status",
"@type": "xsd:string"
},
"value": {
"@id": "https://schema.org/value",
"@type": "xsd:string"
}
}
},
"ResultDescription": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#ResultDescription",
"@context": {
"allowedValue": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#allowedValue",
"@type": "xsd:string",
"@container": "@set"
},
"requiredLevel": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#requiredLevel",
"@type": "xsd:anyURI"
},
"requiredValue": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#requiredValue",
"@type": "xsd:string"
},
"resultType": {
"@id":"https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#resultType",
"@type": "xsd:string"
},
"rubricCriterionLevel": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#rubricCriterionLevel",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#RubricCriterionLevel",
"@container": "@set"
},
"valueMax": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#valueMax",
"@type": "xsd:string"
},
"valueMin": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#valueMin",
"@type": "xsd:string"
}
}
},
"RubricCriterionLevel": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#RubricCriterionLevel",
"@context": {
"level": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#level",
"@type": "xsd:string"
},
"points": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#points",
"@type": "xsd:string"
}
}
},
"alignment": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#alignment",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Alignment",
"@container": "@set"
},
"description": {
"@id": "https://schema.org/description",
"@type": "xsd:string"
},
"endorsement": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#endorsement",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#EndorsementCredential",
"@container": "@set"
},
"image": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#image",
"@type": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#Image"
},
"name": {
"@id": "https://schema.org/name",
"@type": "xsd:string"
},
"narrative": {
"@id": "https://purl.imsglobal.org/spec/ob/v3p0/vocab.html#narrative",
"@type": "xsd:string"
},
"url": {
"@id": "https://schema.org/url",
"@type": "xsd:anyURI"
}
}
}

View File

@ -0,0 +1,92 @@
{
"@context": {
"@version": 1.1,
"id": "@id",
"type": "@type",
"BbsBlsSignature2020": {
"@id": "https://w3id.org/security#BbsBlsSignature2020",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"proofValue": "https://w3id.org/security#proofValue",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"BbsBlsSignatureProof2020": {
"@id": "https://w3id.org/security#BbsBlsSignatureProof2020",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"sec": "https://w3id.org/security#",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": "https://w3id.org/security#proofValue",
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"Bls12381G2Key2020": "https://w3id.org/security#Bls12381G2Key2020"
}
}

View File

@ -0,0 +1,50 @@
{
"@context": {
"id": "@id",
"type": "@type",
"dc": "http://purl.org/dc/terms/",
"sec": "https://w3id.org/security#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"EcdsaKoblitzSignature2016": "sec:EcdsaKoblitzSignature2016",
"Ed25519Signature2018": "sec:Ed25519Signature2018",
"EncryptedMessage": "sec:EncryptedMessage",
"GraphSignature2012": "sec:GraphSignature2012",
"LinkedDataSignature2015": "sec:LinkedDataSignature2015",
"LinkedDataSignature2016": "sec:LinkedDataSignature2016",
"CryptographicKey": "sec:Key",
"authenticationTag": "sec:authenticationTag",
"canonicalizationAlgorithm": "sec:canonicalizationAlgorithm",
"cipherAlgorithm": "sec:cipherAlgorithm",
"cipherData": "sec:cipherData",
"cipherKey": "sec:cipherKey",
"created": {"@id": "dc:created", "@type": "xsd:dateTime"},
"creator": {"@id": "dc:creator", "@type": "@id"},
"digestAlgorithm": "sec:digestAlgorithm",
"digestValue": "sec:digestValue",
"domain": "sec:domain",
"encryptionKey": "sec:encryptionKey",
"expiration": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
"expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
"initializationVector": "sec:initializationVector",
"iterationCount": "sec:iterationCount",
"nonce": "sec:nonce",
"normalizationAlgorithm": "sec:normalizationAlgorithm",
"owner": {"@id": "sec:owner", "@type": "@id"},
"password": "sec:password",
"privateKey": {"@id": "sec:privateKey", "@type": "@id"},
"privateKeyPem": "sec:privateKeyPem",
"publicKey": {"@id": "sec:publicKey", "@type": "@id"},
"publicKeyBase58": "sec:publicKeyBase58",
"publicKeyPem": "sec:publicKeyPem",
"publicKeyWif": "sec:publicKeyWif",
"publicKeyService": {"@id": "sec:publicKeyService", "@type": "@id"},
"revoked": {"@id": "sec:revoked", "@type": "xsd:dateTime"},
"salt": "sec:salt",
"signature": "sec:signature",
"signatureAlgorithm": "sec:signingAlgorithm",
"signatureValue": "sec:signatureValue"
}
}

View File

@ -0,0 +1,59 @@
{
"@context": [{
"@version": 1.1
}, "https://w3id.org/security/v1", {
"AesKeyWrappingKey2019": "sec:AesKeyWrappingKey2019",
"DeleteKeyOperation": "sec:DeleteKeyOperation",
"DeriveSecretOperation": "sec:DeriveSecretOperation",
"EcdsaSecp256k1Signature2019": "sec:EcdsaSecp256k1Signature2019",
"EcdsaSecp256r1Signature2019": "sec:EcdsaSecp256r1Signature2019",
"EcdsaSecp256k1VerificationKey2019": "sec:EcdsaSecp256k1VerificationKey2019",
"EcdsaSecp256r1VerificationKey2019": "sec:EcdsaSecp256r1VerificationKey2019",
"Ed25519Signature2018": "sec:Ed25519Signature2018",
"Ed25519VerificationKey2018": "sec:Ed25519VerificationKey2018",
"EquihashProof2018": "sec:EquihashProof2018",
"ExportKeyOperation": "sec:ExportKeyOperation",
"GenerateKeyOperation": "sec:GenerateKeyOperation",
"KmsOperation": "sec:KmsOperation",
"RevokeKeyOperation": "sec:RevokeKeyOperation",
"RsaSignature2018": "sec:RsaSignature2018",
"RsaVerificationKey2018": "sec:RsaVerificationKey2018",
"Sha256HmacKey2019": "sec:Sha256HmacKey2019",
"SignOperation": "sec:SignOperation",
"UnwrapKeyOperation": "sec:UnwrapKeyOperation",
"VerifyOperation": "sec:VerifyOperation",
"WrapKeyOperation": "sec:WrapKeyOperation",
"X25519KeyAgreementKey2019": "sec:X25519KeyAgreementKey2019",
"allowedAction": "sec:allowedAction",
"assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"},
"authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"},
"capability": {"@id": "sec:capability", "@type": "@id"},
"capabilityAction": "sec:capabilityAction",
"capabilityChain": {"@id": "sec:capabilityChain", "@type": "@id", "@container": "@list"},
"capabilityDelegation": {"@id": "sec:capabilityDelegationMethod", "@type": "@id", "@container": "@set"},
"capabilityInvocation": {"@id": "sec:capabilityInvocationMethod", "@type": "@id", "@container": "@set"},
"caveat": {"@id": "sec:caveat", "@type": "@id", "@container": "@set"},
"challenge": "sec:challenge",
"ciphertext": "sec:ciphertext",
"controller": {"@id": "sec:controller", "@type": "@id"},
"delegator": {"@id": "sec:delegator", "@type": "@id"},
"equihashParameterK": {"@id": "sec:equihashParameterK", "@type": "xsd:integer"},
"equihashParameterN": {"@id": "sec:equihashParameterN", "@type": "xsd:integer"},
"invocationTarget": {"@id": "sec:invocationTarget", "@type": "@id"},
"invoker": {"@id": "sec:invoker", "@type": "@id"},
"jws": "sec:jws",
"keyAgreement": {"@id": "sec:keyAgreementMethod", "@type": "@id", "@container": "@set"},
"kmsModule": {"@id": "sec:kmsModule"},
"parentCapability": {"@id": "sec:parentCapability", "@type": "@id"},
"plaintext": "sec:plaintext",
"proof": {"@id": "sec:proof", "@type": "@id", "@container": "@graph"},
"proofPurpose": {"@id": "sec:proofPurpose", "@type": "@vocab"},
"proofValue": "sec:proofValue",
"referenceId": "sec:referenceId",
"unwrappedKey": "sec:unwrappedKey",
"verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"},
"verifyData": "sec:verifyData",
"wrappedKey": "sec:wrappedKey"
}]
}

View File

@ -0,0 +1,710 @@
{
"@context": [{
"@version": 1.1,
"id": "@id",
"type": "@type",
"@protected": true,
"JsonWebKey2020": {
"@id": "https://w3id.org/security#JsonWebKey2020"
},
"JsonWebSignature2020": {
"@id": "https://w3id.org/security#JsonWebSignature2020",
"@context": {
"@version": 1.1,
"id": "@id",
"type": "@type",
"@protected": true,
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"jws": "https://w3id.org/security#jws",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"Ed25519VerificationKey2020": {
"@id": "https://w3id.org/security#Ed25519VerificationKey2020"
},
"Ed25519Signature2020": {
"@id": "https://w3id.org/security#Ed25519Signature2020",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": {
"@id": "https://w3id.org/security#proofValue"
},
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"publicKeyJwk": {
"@id": "https://w3id.org/security#publicKeyJwk",
"@type": "@json"
},
"ethereumAddress": {
"@id": "https://w3id.org/security#ethereumAddress"
},
"publicKeyHex": {
"@id": "https://w3id.org/security#publicKeyHex"
},
"blockchainAccountId": {
"@id": "https://w3id.org/security#blockchainAccountId"
},
"MerkleProof2019": {
"@id": "https://w3id.org/security#MerkleProof2019"
},
"Bls12381G1Key2020": {
"@id": "https://w3id.org/security#Bls12381G1Key2020"
},
"Bls12381G2Key2020": {
"@id": "https://w3id.org/security#Bls12381G2Key2020"
},
"BbsBlsSignature2020": {
"@id": "https://w3id.org/security#BbsBlsSignature2020",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": "https://w3id.org/security#proofValue",
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"BbsBlsSignatureProof2020": {
"@id": "https://w3id.org/security#BbsBlsSignatureProof2020",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": "https://w3id.org/security#proofValue",
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"EcdsaKoblitzSignature2016": "https://w3id.org/security#EcdsaKoblitzSignature2016",
"Ed25519Signature2018": {
"@id": "https://w3id.org/security#Ed25519Signature2018",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"jws": "https://w3id.org/security#jws",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": "https://w3id.org/security#proofValue",
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"EncryptedMessage": "https://w3id.org/security#EncryptedMessage",
"GraphSignature2012": "https://w3id.org/security#GraphSignature2012",
"LinkedDataSignature2015": "https://w3id.org/security#LinkedDataSignature2015",
"LinkedDataSignature2016": "https://w3id.org/security#LinkedDataSignature2016",
"CryptographicKey": "https://w3id.org/security#Key",
"authenticationTag": "https://w3id.org/security#authenticationTag",
"canonicalizationAlgorithm": "https://w3id.org/security#canonicalizationAlgorithm",
"cipherAlgorithm": "https://w3id.org/security#cipherAlgorithm",
"cipherData": "https://w3id.org/security#cipherData",
"cipherKey": "https://w3id.org/security#cipherKey",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"creator": {
"@id": "http://purl.org/dc/terms/creator",
"@type": "@id"
},
"digestAlgorithm": "https://w3id.org/security#digestAlgorithm",
"digestValue": "https://w3id.org/security#digestValue",
"domain": "https://w3id.org/security#domain",
"encryptionKey": "https://w3id.org/security#encryptionKey",
"expiration": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"initializationVector": "https://w3id.org/security#initializationVector",
"iterationCount": "https://w3id.org/security#iterationCount",
"nonce": "https://w3id.org/security#nonce",
"normalizationAlgorithm": "https://w3id.org/security#normalizationAlgorithm",
"owner": "https://w3id.org/security#owner",
"password": "https://w3id.org/security#password",
"privateKey": "https://w3id.org/security#privateKey",
"privateKeyPem": "https://w3id.org/security#privateKeyPem",
"publicKey": "https://w3id.org/security#publicKey",
"publicKeyBase58": "https://w3id.org/security#publicKeyBase58",
"publicKeyPem": "https://w3id.org/security#publicKeyPem",
"publicKeyWif": "https://w3id.org/security#publicKeyWif",
"publicKeyService": "https://w3id.org/security#publicKeyService",
"revoked": {
"@id": "https://w3id.org/security#revoked",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"salt": "https://w3id.org/security#salt",
"signature": "https://w3id.org/security#signature",
"signatureAlgorithm": "https://w3id.org/security#signingAlgorithm",
"signatureValue": "https://w3id.org/security#signatureValue",
"proofValue": "https://w3id.org/security#proofValue",
"AesKeyWrappingKey2019": "https://w3id.org/security#AesKeyWrappingKey2019",
"DeleteKeyOperation": "https://w3id.org/security#DeleteKeyOperation",
"DeriveSecretOperation": "https://w3id.org/security#DeriveSecretOperation",
"EcdsaSecp256k1Signature2019": {
"@id": "https://w3id.org/security#EcdsaSecp256k1Signature2019",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"jws": "https://w3id.org/security#jws",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": "https://w3id.org/security#proofValue",
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"EcdsaSecp256r1Signature2019": {
"@id": "https://w3id.org/security#EcdsaSecp256r1Signature2019",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"jws": "https://w3id.org/security#jws",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": "https://w3id.org/security#proofValue",
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"EcdsaSecp256k1VerificationKey2019": "https://w3id.org/security#EcdsaSecp256k1VerificationKey2019",
"EcdsaSecp256r1VerificationKey2019": "https://w3id.org/security#EcdsaSecp256r1VerificationKey2019",
"Ed25519VerificationKey2018": "https://w3id.org/security#Ed25519VerificationKey2018",
"EquihashProof2018": "https://w3id.org/security#EquihashProof2018",
"ExportKeyOperation": "https://w3id.org/security#ExportKeyOperation",
"GenerateKeyOperation": "https://w3id.org/security#GenerateKeyOperation",
"KmsOperation": "https://w3id.org/security#KmsOperation",
"RevokeKeyOperation": "https://w3id.org/security#RevokeKeyOperation",
"RsaSignature2018": {
"@id": "https://w3id.org/security#RsaSignature2018",
"@context": {
"@protected": true,
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"jws": "https://w3id.org/security#jws",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": "https://w3id.org/security#proofValue",
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
},
"RsaVerificationKey2018": "https://w3id.org/security#RsaVerificationKey2018",
"Sha256HmacKey2019": "https://w3id.org/security#Sha256HmacKey2019",
"SignOperation": "https://w3id.org/security#SignOperation",
"UnwrapKeyOperation": "https://w3id.org/security#UnwrapKeyOperation",
"VerifyOperation": "https://w3id.org/security#VerifyOperation",
"WrapKeyOperation": "https://w3id.org/security#WrapKeyOperation",
"X25519KeyAgreementKey2019": "https://w3id.org/security#X25519KeyAgreementKey2019",
"allowedAction": "https://w3id.org/security#allowedAction",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capability": {
"@id": "https://w3id.org/security#capability",
"@type": "@id"
},
"capabilityAction": "https://w3id.org/security#capabilityAction",
"capabilityChain": {
"@id": "https://w3id.org/security#capabilityChain",
"@type": "@id",
"@container": "@list"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"caveat": {
"@id": "https://w3id.org/security#caveat",
"@type": "@id",
"@container": "@set"
},
"challenge": "https://w3id.org/security#challenge",
"ciphertext": "https://w3id.org/security#ciphertext",
"controller": {
"@id": "https://w3id.org/security#controller",
"@type": "@id"
},
"delegator": {
"@id": "https://w3id.org/security#delegator",
"@type": "@id"
},
"equihashParameterK": {
"@id": "https://w3id.org/security#equihashParameterK",
"@type": "http://www.w3.org/2001/XMLSchema#:integer"
},
"equihashParameterN": {
"@id": "https://w3id.org/security#equihashParameterN",
"@type": "http://www.w3.org/2001/XMLSchema#:integer"
},
"invocationTarget": {
"@id": "https://w3id.org/security#invocationTarget",
"@type": "@id"
},
"invoker": {
"@id": "https://w3id.org/security#invoker",
"@type": "@id"
},
"jws": "https://w3id.org/security#jws",
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
},
"kmsModule": {
"@id": "https://w3id.org/security#kmsModule"
},
"parentCapability": {
"@id": "https://w3id.org/security#parentCapability",
"@type": "@id"
},
"plaintext": "https://w3id.org/security#plaintext",
"proof": {
"@id": "https://w3id.org/security#proof",
"@type": "@id",
"@container": "@graph"
},
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"referenceId": "https://w3id.org/security#referenceId",
"unwrappedKey": "https://w3id.org/security#unwrappedKey",
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
},
"verifyData": "https://w3id.org/security#verifyData",
"wrappedKey": "https://w3id.org/security#wrappedKey"
}]
}

View File

@ -0,0 +1,91 @@
{
"@context": {
"id": "@id",
"type": "@type",
"@protected": true,
"proof": {
"@id": "https://w3id.org/security#proof",
"@type": "@id",
"@container": "@graph"
},
"Ed25519VerificationKey2018": {
"@id": "https://w3id.org/security#Ed25519VerificationKey2018",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"controller": {
"@id": "https://w3id.org/security#controller",
"@type": "@id"
},
"revoked": {
"@id": "https://w3id.org/security#revoked",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"publicKeyBase58": {
"@id": "https://w3id.org/security#publicKeyBase58"
}
}
},
"Ed25519Signature2018": {
"@id": "https://w3id.org/security#Ed25519Signature2018",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"jws": {
"@id": "https://w3id.org/security#jws"
},
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
}
}
}

View File

@ -0,0 +1,93 @@
{
"@context": {
"id": "@id",
"type": "@type",
"@protected": true,
"proof": {
"@id": "https://w3id.org/security#proof",
"@type": "@id",
"@container": "@graph"
},
"Ed25519VerificationKey2020": {
"@id": "https://w3id.org/security#Ed25519VerificationKey2020",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"controller": {
"@id": "https://w3id.org/security#controller",
"@type": "@id"
},
"revoked": {
"@id": "https://w3id.org/security#revoked",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"publicKeyMultibase": {
"@id": "https://w3id.org/security#publicKeyMultibase",
"@type": "https://w3id.org/security#multibase"
}
}
},
"Ed25519Signature2020": {
"@id": "https://w3id.org/security#Ed25519Signature2020",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"proofValue": {
"@id": "https://w3id.org/security#proofValue",
"@type": "https://w3id.org/security#multibase"
},
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
}
}
}

View File

@ -0,0 +1,82 @@
{
"@context": {
"privateKeyJwk": {
"@id": "https://w3id.org/security#privateKeyJwk",
"@type": "@json"
},
"JsonWebKey2020": {
"@id": "https://w3id.org/security#JsonWebKey2020",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"publicKeyJwk": {
"@id": "https://w3id.org/security#publicKeyJwk",
"@type": "@json"
}
}
},
"JsonWebSignature2020": {
"@id": "https://w3id.org/security#JsonWebSignature2020",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"jws": "https://w3id.org/security#jws",
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
}
}
}

View File

@ -0,0 +1,102 @@
{
"@context": {
"id": "@id",
"type": "@type",
"@protected": true,
"proof": {
"@id": "https://w3id.org/security#proof",
"@type": "@id",
"@container": "@graph"
},
"EcdsaSecp256k1VerificationKey2019": {
"@id": "https://w3id.org/security#EcdsaSecp256k1VerificationKey2019",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"controller": {
"@id": "https://w3id.org/security#controller",
"@type": "@id"
},
"revoked": {
"@id": "https://w3id.org/security#revoked",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"blockchainAccountId": {
"@id": "https://w3id.org/security#blockchainAccountId"
},
"publicKeyJwk": {
"@id": "https://w3id.org/security#publicKeyJwk",
"@type": "@json"
},
"publicKeyBase58": {
"@id": "https://w3id.org/security#publicKeyBase58"
},
"publicKeyMultibase": {
"@id": "https://w3id.org/security#publicKeyMultibase",
"@type": "https://w3id.org/security#multibase"
}
}
},
"EcdsaSecp256k1Signature2019": {
"@id": "https://w3id.org/security#EcdsaSecp256k1Signature2019",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"jws": {
"@id": "https://w3id.org/security#jws"
},
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
}
}
}

View File

@ -0,0 +1,26 @@
{
"@context": {
"id": "@id",
"type": "@type",
"@protected": true,
"X25519KeyAgreementKey2019": {
"@id": "https://w3id.org/security#X25519KeyAgreementKey2019",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"controller": {
"@id": "https://w3id.org/security#controller",
"@type": "@id"
},
"revoked": {
"@id": "https://w3id.org/security#revoked",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"publicKeyBase58": {
"@id": "https://w3id.org/security#publicKeyBase58"
}
}
}
}
}

View File

@ -21,7 +21,7 @@ import com.google.common.collect.Iterables;
public class OB30Tests {
private static OB30Inspector validator;
private static boolean verbose = false;
private static boolean verbose = true;
@BeforeAll
static void setup() {