diff --git a/README.md b/README.md index 5ae22f7..11db930 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ can be created by the following structure.DisclosureFrame describes what to be d "namespace" :"xyz", "group" : "xyz", "key":"test", - "format":"vc+sd-jwt", + "format":"dc+sd-jwt", "credential":{ "@context": [ "https://www.w3.org/2018/credentials/v1", diff --git a/design/types.go b/design/types.go index 138daad..65f324c 100644 --- a/design/types.go +++ b/design/types.go @@ -45,9 +45,9 @@ var CredentialProofRequest = Type("CredentialProofRequest", func() { Default("") }) Field(5, "format", String, "identifies the format of the credential.", func() { - Example("ldp_vc or vc+sd-jwt") + Example("ldp_vc or dc+sd-jwt") Default("ldp_vc") - Enum("ldp_vc", "vc+sd-jwt") + Enum("ldp_vc", "dc+sd-jwt") }) Field(6, "nonce", String, "Proof challenge", func() { Example("3483492392vvv-fff") @@ -80,6 +80,7 @@ var CredentialProofRequest = Type("CredentialProofRequest", func() { Field(14, "x-did", String, "Did", func() { Example("https://test") }) + Field(14, "status", Boolean, "Status embedded or not", func() {}) Required("namespace", "key", "credential", "x-tenantid", "x-did", "x-origin") }) @@ -105,9 +106,9 @@ var PresentationProofRequest = Type("PresentationProofRequest", func() { Default("jsonwebsignature2020") }) Field(8, "format", String, "identifies the format of the credential.", func() { - Example("ldp_vc or vc+sd-jwt") + Example("ldp_vc or dc+sd-jwt") Default("ldp_vc") - Enum("ldp_vc", "vc+sd-jwt") + Enum("ldp_vc", "dc+sd-jwt") }) Field(9, "disclosureFrame", ArrayOf(String), "Disclosed Attributes", func() { Example([]string{"email"}) @@ -179,9 +180,9 @@ var CreateCredentialRequest = Type("CreateCredentialRequest", func() { Default("") }) Field(7, "format", String, "identifies the format of the credential.", func() { - Example("ldp_vc or vc+sd-jwt") + Example("ldp_vc or dc+sd-jwt") Default("ldp_vc") - Enum("ldp_vc", "vc+sd-jwt") + Enum("ldp_vc", "dc+sd-jwt") }) Field(8, "nonce", String, "Proof challenge", func() { Example("3483492392vvv-fff") @@ -223,9 +224,9 @@ var CreateCredentialRequest = Type("CreateCredentialRequest", func() { var VerifyCredentialRequest = Type("VerifyCredentialRequest", func() { Field(1, "credential", Bytes, "Verifiable Credential in JSON format.") Field(2, "x-format", String, "format", func() { - Example("ldp_vc or vc+sd-jwt") + Example("ldp_vc or dc+sd-jwt") Default("ldp_vc") - Enum("ldp_vc", "vc+sd-jwt") + Enum("ldp_vc", "dc+sd-jwt") }) Field(3, "x-namespace", String, "Namespace for status check") Field(4, "x-group", String, "Group for status check") @@ -247,9 +248,9 @@ var VerifyPresentationRequest = Type("VerifyPresentationRequest", func() { Example([]string{"email"}) }) Field(3, "x-format", String, "format", func() { - Example("ldp_vc or vc+sd-jwt") + Example("ldp_vc or dc+sd-jwt") Default("ldp_vc") - Enum("ldp_vc", "vc+sd-jwt") + Enum("ldp_vc", "dc+sd-jwt") }) Field(3, "aud", String, "expected audience", func() { }) @@ -420,6 +421,13 @@ var didResponse = Type("DidResponse", func() { Field(2, "controller", String, "controler of the document") Field(3, "verificationMethod", ArrayOf(DIDVerificationMethod), "methods of the document") Field(4, "service", ArrayOf(serviceEndpoint), "serviceendpoints") + Field(5, "assertionMethod", ArrayOf(String), "Verification methods authorized for assertion purposes.", func() { + + Example([]string{ + "did:web:example.com#key1", + }) + + }) Required("id", "controller") }) diff --git a/docs/Signer.postman_collection.json b/docs/Signer.postman_collection.json index 91e8266..db2e34f 100644 --- a/docs/Signer.postman_collection.json +++ b/docs/Signer.postman_collection.json @@ -98,7 +98,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"namespace\" :\"transit\",\n \"group\" : \"\",\n \"key\":\"eckey\",\n \"status\":false,\n \"format\":\"vc+sd-jwt\",\n \"credentialSubject\": {\n\t\"!disclose:testdata\": {\"!disclose:hello\":\"world\", \"testXY\":\"1234\"}\n },\n \"issuanceDate\": \"2022-06-02T17:24:05.032533+03:00\",\n \"type\": \"VerifiableCredential\"\n}", + "raw": "{\n \"namespace\" :\"transit\",\n \"group\" : \"\",\n \"key\":\"eckey\",\n \"status\":false,\n \"format\":\"dc+sd-jwt\",\n \"credentialSubject\": {\n\t\"!disclose:testdata\": {\"!disclose:hello\":\"world\", \"testXY\":\"1234\"}\n },\n \"issuanceDate\": \"2022-06-02T17:24:05.032533+03:00\",\n \"type\": \"VerifiableCredential\"\n}", "options": { "raw": { "language": "json" @@ -126,7 +126,7 @@ "header": [ { "key": "x-format", - "value": "vc+sd-jwt", + "value": "dc+sd-jwt", "type": "default", "disabled": true } diff --git a/gen/http/cli/signer/cli.go b/gen/http/cli/signer/cli.go index 7c8fac1..95586d8 100644 --- a/gen/http/cli/signer/cli.go +++ b/gen/http/cli/signer/cli.go @@ -523,7 +523,7 @@ func signerCredentialProofUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer credential-proof --body '{\n \"credential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/security/suites/jws-2020/v1\",\n \"https://schema.org\"\n ],\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"issuer\": \"did:web:nginx:policy:policy:example:example:1.0:evaluation\",\n \"issuanceDate\": \"2010-01-01T19:23:24.651387237Z\",\n \"credentialSubject\": {\n \"name\": \"Alice\",\n \"allow\": true\n }\n },\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or vc+sd-jwt\",\n \"group\": \"Group\",\n \"holder\": \"urn:3333:ddd\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"signatureType\": \"ed25519signature2020\",\n \"statuslisttype\": \"urn:3333:ddd\",\n \"x-did\": \"https://test\",\n \"x-groupid\": \"group1\",\n \"x-origin\": \"https://test\",\n \"x-tenantid\": \"demotenant\"\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer credential-proof --body '{\n \"credential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/security/suites/jws-2020/v1\",\n \"https://schema.org\"\n ],\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"issuer\": \"did:web:nginx:policy:policy:example:example:1.0:evaluation\",\n \"issuanceDate\": \"2010-01-01T19:23:24.651387237Z\",\n \"credentialSubject\": {\n \"name\": \"Alice\",\n \"allow\": true\n }\n },\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or dc+sd-jwt\",\n \"group\": \"Group\",\n \"holder\": \"urn:3333:ddd\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"signatureType\": \"ed25519signature2020\",\n \"status\": false,\n \"statuslisttype\": \"urn:3333:ddd\",\n \"x-did\": \"https://test\",\n \"x-groupid\": \"group1\",\n \"x-origin\": \"https://test\",\n \"x-tenantid\": \"demotenant\"\n }'") } func signerPresentationProofUsage() { @@ -541,7 +541,7 @@ func signerPresentationProofUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer presentation-proof --body '{\n \"aud\": \"http://...\",\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or vc+sd-jwt\",\n \"group\": \"Group\",\n \"issuer\": \"Neque blanditiis nostrum nihil consequuntur est.\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"presentation\": \"Explicabo possimus ea.\",\n \"signatureType\": \"ed25519signature2020\"\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer presentation-proof --body '{\n \"aud\": \"http://...\",\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or dc+sd-jwt\",\n \"group\": \"Group\",\n \"issuer\": \"Sit explicabo possimus ea accusantium.\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"presentation\": \"Ut velit.\",\n \"signatureType\": \"ed25519signature2020\"\n }'") } func signerCreateCredentialUsage() { @@ -565,7 +565,7 @@ func signerCreateCredentialUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer create-credential --body '{\n \"context\": [\n \"https://w3id.org/security/suites/jws-2020/v1\",\n \"https://schema.org\"\n ],\n \"credentialSubject\": {\n \"hello\": \"world\"\n },\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or vc+sd-jwt\",\n \"group\": \"Group\",\n \"holder\": \"urn:3333:ddd\",\n \"issuer\": \"did:web:example.com\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"signatureType\": \"ed25519signature2020\",\n \"status\": true,\n \"statuslisttype\": \"urn:3333:ddd\",\n \"type\": [\n \"VerifiableCredential\",\n \"TestCredential]\"\n ]\n }' --x-origin \"https://test\" --x-tenantid \"demotenant\" --x-groupid \"group1\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer create-credential --body '{\n \"context\": [\n \"https://w3id.org/security/suites/jws-2020/v1\",\n \"https://schema.org\"\n ],\n \"credentialSubject\": {\n \"hello\": \"world\"\n },\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or dc+sd-jwt\",\n \"group\": \"Group\",\n \"holder\": \"urn:3333:ddd\",\n \"issuer\": \"did:web:example.com\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"signatureType\": \"ed25519signature2020\",\n \"status\": true,\n \"statuslisttype\": \"urn:3333:ddd\",\n \"type\": [\n \"VerifiableCredential\",\n \"TestCredential]\"\n ]\n }' --x-origin \"https://test\" --x-tenantid \"demotenant\" --x-groupid \"group1\"") } func signerCreatePresentationUsage() { @@ -611,7 +611,7 @@ func signerVerifyCredentialUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer verify-credential --body '{\n \"credential\": \"RXN0IG9jY2FlY2F0aSBuYW0u\",\n \"disclosureFrame\": [\n \"email\"\n ]\n }' --x-format \"ldp_vc or vc+sd-jwt\" --x-namespace \"Accusamus ex nihil inventore ea qui.\" --x-group \"Sapiente error nostrum.\" --x-tenantid \"demotenant\" --x-groupid \"group1\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer verify-credential --body '{\n \"credential\": \"QWNjdXNhbXVzIGV4IG5paGlsIGludmVudG9yZSBlYSBxdWku\",\n \"disclosureFrame\": [\n \"email\"\n ]\n }' --x-format \"ldp_vc or dc+sd-jwt\" --x-namespace \"Sapiente error nostrum.\" --x-group \"Sunt incidunt et repellat cum sit quibusdam.\" --x-tenantid \"demotenant\" --x-groupid \"group1\"") } func signerVerifyPresentationUsage() { @@ -631,7 +631,7 @@ func signerVerifyPresentationUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer verify-presentation --body '{\n \"aud\": \"Velit sit exercitationem et eligendi incidunt.\",\n \"disclosureFrame\": [\n \"email\"\n ],\n \"nonce\": \"Molestiae eveniet vero est aliquam.\",\n \"presentation\": \"RG9sb3JlcyBxdWlzIGZ1Z2lhdCBxdWkgcXVpYS4=\"\n }' --x-format \"ldp_vc or vc+sd-jwt\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer verify-presentation --body '{\n \"aud\": \"Molestiae eveniet vero est aliquam.\",\n \"disclosureFrame\": [\n \"email\"\n ],\n \"nonce\": \"Totam quam.\",\n \"presentation\": \"U2l0IGV4ZXJjaXRhdGlvbmVtIGV0IGVsaWdlbmRpIGluY2lkdW50Lg==\"\n }' --x-format \"ldp_vc or dc+sd-jwt\"") } func signerSignUsage() { @@ -649,7 +649,7 @@ func signerSignUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer sign --body '{\n \"data\": \"Ratione earum debitis.\",\n \"group\": \"Group\",\n \"key\": \"Dolorum hic aut voluptatem.\",\n \"namespace\": \"Repellat illum repudiandae.\"\n }'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer sign --body '{\n \"data\": \"Rerum veritatis delectus quis recusandae.\",\n \"group\": \"Group\",\n \"key\": \"Ratione earum debitis.\",\n \"namespace\": \"Hic aut voluptatem.\"\n }'") } func signerDidDocUsage() { @@ -673,7 +673,7 @@ func signerDidDocUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer did-doc --x-namespace \"Est quos possimus sed sit voluptates nihil.\" --x-group \"Group\" --x-did \"exampl:com\" --x-engine \"transit\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer did-doc --x-namespace \"Ducimus eum facere enim accusantium.\" --x-group \"Group\" --x-did \"exampl:com\" --x-engine \"transit\"") } func signerDidListUsage() { @@ -695,7 +695,7 @@ func signerDidListUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer did-list --x-namespace \"Voluptatibus asperiores.\" --x-group \"Group\" --x-engine \"transit\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer did-list --x-namespace \"Inventore necessitatibus unde facilis ut.\" --x-group \"Group\" --x-engine \"transit\"") } func signerDidConfigurationUsage() { @@ -723,7 +723,7 @@ func signerDidConfigurationUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer did-configuration --body '{\n \"x-groupid\": \"group1\",\n \"x-signatureType\": \"ed25519signature2020\",\n \"x-tenantid\": \"demotenant\"\n }' --x-namespace \"Est asperiores velit eum perferendis.\" --x-group \"Group\" --x-origin \"Rerum quaerat sit.\" --x-did \"Omnis est aspernatur voluptas in.\" --x-nonce \"3483492392vvv-fff\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer did-configuration --body '{\n \"x-groupid\": \"group1\",\n \"x-signatureType\": \"ed25519signature2020\",\n \"x-tenantid\": \"demotenant\"\n }' --x-namespace \"Velit eum perferendis rerum rerum quaerat.\" --x-group \"Group\" --x-origin \"Dicta omnis.\" --x-did \"Aspernatur voluptas in aut unde.\" --x-nonce \"3483492392vvv-fff\"") } func signerJwksUsage() { @@ -745,5 +745,5 @@ func signerJwksUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer jwks --x-namespace \"Reiciendis aut nobis qui debitis enim quaerat.\" --x-group \"Aut illum minus quasi sequi molestiae assumenda.\" --x-engine \"transit\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "signer jwks --x-namespace \"Enim quaerat consectetur aut illum minus quasi.\" --x-group \"Molestiae assumenda ducimus occaecati.\" --x-engine \"transit\"") } diff --git a/gen/http/openapi.json b/gen/http/openapi.json index 6b3ddaa..b9b50ee 100644 --- a/gen/http/openapi.json +++ b/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Signer Service","description":"Signer service exposes HTTP API for making and verifying digital signatures and proofs for Verifiable Credentials.","version":"0.0.1"},"host":"localhost:8085","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/liveness":{"get":{"tags":["health"],"summary":"Liveness health","operationId":"health#Liveness","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/HealthResponse","required":["service","status","version"]}}},"schemes":["http"]}},"/readiness":{"get":{"tags":["health"],"summary":"Readiness health","operationId":"health#Readiness","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/HealthResponse","required":["service","status","version"]}}},"schemes":["http"]}},"/v1/credential":{"post":{"tags":["signer"],"summary":"CreateCredential signer","description":"CreateCredential creates VC with proof from raw JSON data.","operationId":"signer#CreateCredential","parameters":[{"name":"x-origin","in":"header","description":"Origin of call","required":true,"type":"string"},{"name":"x-tenantid","in":"header","description":"tenantid","required":true,"type":"string"},{"name":"x-groupid","in":"header","description":"Tenant Group","required":false,"type":"string","default":""},{"name":"CreateCredentialRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateCredentialRequest","required":["namespace","key","credentialSubject"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/credential/proof":{"post":{"tags":["signer"],"summary":"CredentialProof signer","description":"CredentialProof adds a proof to a given Verifiable Credential.","operationId":"signer#CredentialProof","parameters":[{"name":"CredentialProofRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/CredentialProofRequest","required":["namespace","key","credential","x-tenantid","x-did","x-origin"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/credential/verify":{"post":{"tags":["signer"],"summary":"VerifyCredential signer","description":"VerifyCredential verifies the proof of a Verifiable Credential.","operationId":"signer#VerifyCredential","parameters":[{"name":"x-format","in":"header","description":"format","required":false,"type":"string","default":"ldp_vc","enum":["ldp_vc","vc+sd-jwt"]},{"name":"x-namespace","in":"header","description":"Namespace for status check","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group for status check","required":false,"type":"string"},{"name":"x-tenantid","in":"header","description":"tenantid","required":false,"type":"string"},{"name":"x-groupid","in":"header","description":"Group","required":false,"type":"string"},{"name":"VerifyCredentialRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/VerifyCredentialRequest","required":["credential"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/VerifyResult","required":["valid"]}}},"schemes":["http"]}},"/v1/did/configuration":{"get":{"tags":["signer"],"summary":"DidConfiguration signer","description":"Creates did configuration.","operationId":"signer#DidConfiguration","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group.","required":false,"type":"string","default":""},{"name":"x-origin","in":"header","description":"origin for the configuration.","required":true,"type":"string"},{"name":"x-did","in":"header","description":"did for the Configuration","required":false,"type":"string"},{"name":"x-nonce","in":"header","description":"Proof challenge","required":false,"type":"string"},{"name":"DidConfigurationRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/DidConfiguration","required":["x-tenantid"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/did/document":{"get":{"tags":["signer"],"summary":"didDoc signer","operationId":"signer#didDoc","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","required":false,"type":"string","default":"transit"},{"name":"x-group","in":"header","description":"Group.","required":false,"type":"string","default":""},{"name":"x-did","in":"header","description":"did which is used for controller and id","required":false,"type":"string","default":"did:web:localhost%3A:8080"},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","required":false,"type":"string","default":"transit"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/DidResponse","required":["id","controller"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/DidResponse","required":["id","controller"]}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/DidResponse","required":["id","controller"]}}},"schemes":["http"]}},"/v1/did/list":{"get":{"tags":["signer"],"summary":"didList signer","operationId":"signer#didList","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group.","required":false,"type":"string","default":""},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","required":false,"type":"string","default":"transit"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/DidListResponse","required":["list"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/DidListResponse","required":["list"]}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/DidListResponse","required":["list"]}}},"schemes":["http"]}},"/v1/jwk/{namespace}/{key}":{"get":{"tags":["signer"],"summary":"JwkPublicKey signer","description":"JwkPublicKey returns public key by name and namespace.","operationId":"signer#JwkPublicKey","parameters":[{"name":"namespace","in":"path","description":"Key namespace.","required":true,"type":"string"},{"name":"key","in":"path","description":"Key name.","required":true,"type":"string"},{"name":"JwkPublicKeyRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/JwkPublicKeyRequest","required":["group"]}}],"responses":{"200":{"description":"OK response.","schema":{}},"404":{"description":"Not Found response.","schema":{}},"500":{"description":"Internal Server Error response.","schema":{}}},"schemes":["http"]}},"/v1/jwks":{"get":{"tags":["signer"],"summary":"Jwks signer","operationId":"signer#Jwks","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group.","required":false,"type":"string"},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","required":false,"type":"string","default":"transit"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/JwksResponse","required":["keys"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/JwksResponse","required":["keys"]}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/JwksResponse","required":["keys"]}}},"schemes":["http"]}},"/v1/namespaces":{"get":{"tags":["signer"],"summary":"Namespaces signer","description":"Namespaces returns all keys namespaces, which corresponds to enabled Vault transit engines.","operationId":"signer#Namespaces","responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Voluptatem qui consequatur."}}}},"schemes":["http"]}},"/v1/namespaces/{namespace}/keys":{"get":{"tags":["signer"],"summary":"NamespaceKeys signer","description":"NamespaceKeys returns all keys in a given namespace.","operationId":"signer#NamespaceKeys","parameters":[{"name":"namespace","in":"path","description":"Namespace for signing keys.","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group identifies a group of keys within a namespace.","required":false,"type":"string","default":""}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Aut pariatur."}}}},"schemes":["http"]}},"/v1/presentation":{"post":{"tags":["signer"],"summary":"CreatePresentation signer","description":"CreatePresentation creates VP with proof from raw JSON data.","operationId":"signer#CreatePresentation","parameters":[{"name":"CreatePresentationRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/CreatePresentationRequest","required":["namespace","key","data"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/presentation/proof":{"post":{"tags":["signer"],"summary":"PresentationProof signer","description":"PresentationProof adds a proof to a given Verifiable Presentation.","operationId":"signer#PresentationProof","parameters":[{"name":"PresentationProofRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/PresentationProofRequest","required":["namespace","key","presentation"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/presentation/verify":{"post":{"tags":["signer"],"summary":"VerifyPresentation signer","description":"VerifyPresentation verifies the proof of a Verifiable Presentation.","operationId":"signer#VerifyPresentation","parameters":[{"name":"x-format","in":"header","description":"format","required":false,"type":"string","default":"ldp_vc","enum":["ldp_vc","vc+sd-jwt"]},{"name":"VerifyPresentationRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/VerifyPresentationRequest","required":["presentation"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/VerifyResult","required":["valid"]}}},"schemes":["http"]}},"/v1/sign":{"post":{"tags":["signer"],"summary":"Sign signer","description":"Sign creates digital signature on base64 encoded binary data.","operationId":"signer#Sign","parameters":[{"name":"SignRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/SignRequest","required":["namespace","key","data","group"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/SignResult","required":["signature"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/SignResult","required":["signature"]}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/SignResult","required":["signature"]}}},"schemes":["http"]}},"/v1/verification-methods/{namespace}/{did}":{"get":{"tags":["signer"],"summary":"VerificationMethods signer","description":"VerificationMethods returns all public keys in a given namespace. The result is formatted as array of DID verification methods with their controller attribute being the given DID in the request.","operationId":"signer#VerificationMethods","parameters":[{"name":"namespace","in":"path","description":"Keys namespace.","required":true,"type":"string"},{"name":"did","in":"path","description":"DID controller of the keys.","required":true,"type":"string"},{"name":"VerificationMethodsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/VerificationMethodsRequest"}}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"$ref":"#/definitions/DIDVerificationMethod"}}}},"schemes":["http"]}},"/v1/verification-methods/{namespace}/{key}/{did}":{"get":{"tags":["signer"],"summary":"VerificationMethod signer","description":"VerificationMethod returns a single public key formatted as DID verification method for a given namespace, key and did. When did:jwk is set for did, a did:jwk is generated from the key.","operationId":"signer#VerificationMethod","parameters":[{"name":"namespace","in":"path","description":"Key namespace.","required":true,"type":"string"},{"name":"key","in":"path","description":"Name of requested key.","required":true,"type":"string"},{"name":"did","in":"path","description":"DID controller of the key.","required":true,"type":"string"},{"name":"VerificationMethodRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/VerificationMethodRequest"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/DIDVerificationMethod","required":["id","type","controller","publicKeyJwk"]}}},"schemes":["http"]}}},"definitions":{"CreateCredentialRequest":{"title":"CreateCredentialRequest","type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Consequatur odit ut."},"description":"Additional JSONLD contexts to be specified in the VC.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"credentialSubject":{"description":"Raw JSON that will be the VC subject.","example":{"hello":"world"}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Laudantium voluptatibus ipsam autem eligendi."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Credential.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"status":{"type":"boolean","description":"Append Status","example":true},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"type":{"type":"array","items":{"type":"string","example":"Iste nostrum numquam quaerat natus temporibus maxime."},"description":"Type(s) of the credential. Just first one for sd-jwt used.","example":["VerifiableCredential","TestCredential]"]}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"credentialSubject":{"hello":"world"},"disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","holder":"urn:3333:ddd","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":true,"statuslisttype":"urn:3333:ddd","type":["VerifiableCredential","TestCredential]"]},"required":["namespace","key","credentialSubject"]},"CreatePresentationRequest":{"title":"CreatePresentationRequest","type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Voluptas eos sed vero qui."},"description":"Additional JSONLD contexts to be specified in the VP.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"data":{"type":"array","items":{"example":"Eveniet et."},"description":"Raw JSON to be included inside the VP as Verifiable Credential.","example":[{"hello":"world"},{"hola":"mundo"}]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Presentation.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"data":[{"hello":"world"},{"hola":"mundo"}],"group":"Group","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020"},"required":["namespace","key","data"]},"CredentialProofRequest":{"title":"CredentialProofRequest","type":"object","properties":{"credential":{"description":"Verifiable Credential in JSON format or as sdjwt.","example":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Porro facilis et molestias ut ea reiciendis."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"key":{"type":"string","description":"Key to use for the proof signature (optional).","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature.For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"x-did":{"type":"string","description":"Did","example":"https://test"},"x-groupid":{"type":"string","description":"Tenant Group","default":"","example":"group1"},"x-origin":{"type":"string","description":"Origin of call","example":"https://test"},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"credential":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}},"disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","holder":"urn:3333:ddd","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","statuslisttype":"urn:3333:ddd","x-did":"https://test","x-groupid":"group1","x-origin":"https://test","x-tenantid":"demotenant"},"required":["namespace","key","credential","x-tenantid","x-did","x-origin"]},"DIDVerificationMethod":{"title":"DIDVerificationMethod","type":"object","properties":{"controller":{"type":"string","description":"Controller of verification method specified as DID.","example":"did:web:example.com"},"id":{"type":"string","description":"ID of verification method.","example":"key1"},"publicKeyJwk":{"description":"Public Key encoded in JWK format.","example":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK"},"type":{"type":"string","description":"Type of verification method key.","example":"JsonWebKey2020"}},"description":"Public Key represented as DID Verification Method.","example":{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},"required":["id","type","controller","publicKeyJwk"]},"DidConfiguration":{"title":"DidConfiguration","type":"object","properties":{"x-groupid":{"type":"string","description":"Tenant Group","example":"group1"},"x-signatureType":{"type":"string","description":"Type of signature","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"x-groupid":"group1","x-signatureType":"ed25519signature2020","x-tenantid":"demotenant"},"required":["x-tenantid"]},"DidListResponse":{"title":"DidListResponse","type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/definitions/DidListResponseItem"},"description":"did jwk list of keys","example":[{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."}]}},"example":{"list":[{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."}]},"required":["list"]},"DidListResponseItem":{"title":"DidListResponseItem","type":"object","properties":{"did":{"type":"string","description":"DID JWK of key","example":"Ullam rerum ea."},"name":{"type":"string","description":"name of the key.","example":"Expedita nam nostrum fuga est dicta."}},"example":{"did":"Labore eum libero debitis tempore culpa illo.","name":"Placeat reprehenderit aperiam."},"required":["name","did"]},"DidResponse":{"title":"DidResponse","type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Quis soluta nihil expedita numquam."},"description":"JSON-LD @context","example":["https://www.w3.org/ns/did/v1"]},"controller":{"type":"string","description":"controler of the document","example":"Maxime harum omnis qui laborum."},"id":{"type":"string","description":"did of the document","example":"In aliquid sint numquam facere sequi."},"service":{"type":"array","items":{"$ref":"#/definitions/ServiceEndpoint"},"description":"serviceendpoints","example":[{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."}]},"verificationMethod":{"type":"array","items":{"$ref":"#/definitions/DIDVerificationMethod"},"description":"methods of the document","example":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}},"example":{"context":["https://www.w3.org/ns/did/v1"],"controller":"Ut at dolores omnis voluptas.","id":"Facilis ratione cumque in facilis.","service":[{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]},"required":["id","controller"]},"HealthResponse":{"title":"HealthResponse","type":"object","properties":{"service":{"type":"string","description":"Service name.","example":"Tempora voluptatibus aperiam eius velit."},"status":{"type":"string","description":"Status message.","example":"Dolores libero."},"version":{"type":"string","description":"Service runtime version.","example":"Tempora voluptatem error molestiae."}},"example":{"service":"Deleniti laudantium exercitationem tenetur iusto eos quidem.","status":"Dolorum et consequatur sed in vero qui.","version":"Ut et quasi eius error minima eaque."},"required":["service","status","version"]},"JwkPublicKeyRequest":{"title":"JwkPublicKeyRequest","type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"},"required":["group"]},"JwksResponse":{"title":"JwksResponse","type":"object","properties":{"keys":{"type":"array","items":{"example":"Praesentium est at esse laudantium ex aut."},"description":"List of jwk","example":["Rem architecto.","Quod et.","Nihil nihil dicta non."]}},"example":{"keys":["Aut aspernatur corrupti esse ut.","Voluptatum labore id ducimus."]},"required":["keys"]},"PresentationProofRequest":{"title":"PresentationProofRequest","type":"object","properties":{"aud":{"type":"string","description":"audience","example":"http://..."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Fugit voluptatem maxime dolor et."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"issuer":{"type":"string","description":"Issuer DID used to specify proof verification info.","example":"Nihil numquam doloremque."},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"presentation":{"description":"Verifiable Presentation in JSON format.","example":"Saepe quidem dolores fugiat."},"signatureType":{"type":"string","description":"Type of signature.For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020","sdjwt"]}},"example":{"aud":"http://...","disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","issuer":"Fugit quo voluptatem aut.","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","presentation":"Unde blanditiis ea recusandae.","signatureType":"ed25519signature2020"},"required":["namespace","key","presentation"]},"ServiceEndpoint":{"title":"ServiceEndpoint","type":"object","properties":{"id":{"type":"string","description":"did of the document","example":"Eum quis."},"serviceEndpoint":{"type":"string","description":"Endpoint URL","example":"Accusamus quisquam dolorem quibusdam cum nostrum aut."},"type":{"type":"string","description":"type of endpoint","example":"Laudantium autem."}},"example":{"id":"Recusandae fugit ducimus assumenda omnis aut.","serviceEndpoint":"Suscipit molestiae a nihil voluptates rerum.","type":"Quaerat est cupiditate."},"required":["id","type","serviceEndpoint"]},"SignRequest":{"title":"SignRequest","type":"object","properties":{"data":{"type":"string","description":"Data that must be signed, encoded as base64 string.","example":"Qui laboriosam."},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"key":{"type":"string","description":"Key to be used for signing.","example":"Eius corporis et."},"namespace":{"type":"string","description":"Key namespace to be used for signing.","example":"Et sunt culpa est et accusantium sit."}},"example":{"data":"Facere doloribus quo eos.","group":"Group","key":"Maxime corrupti.","namespace":"Hic alias consectetur excepturi esse tenetur repellat."},"required":["namespace","key","data","group"]},"SignResult":{"title":"SignResult","type":"object","properties":{"signature":{"type":"string","description":"Signature encoded as base64 string.","example":"Similique fuga iste aliquid quam."}},"example":{"signature":"Omnis quas perferendis id ipsum quis recusandae."},"required":["signature"]},"VerificationMethodRequest":{"title":"VerificationMethodRequest","type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"}},"VerificationMethodsRequest":{"title":"VerificationMethodsRequest","type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"}},"VerifyCredentialRequest":{"title":"VerifyCredentialRequest","type":"object","properties":{"credential":{"type":"string","description":"Verifiable Credential in JSON format.","example":"VmVuaWFtIHZvbHVwdGF0ZW0gcXVpIGZ1Z2l0Lg==","format":"byte"},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Ab doloremque."},"description":"Disclosed Attributes","example":["email"]}},"example":{"credential":"QXV0ZW0gY3VtcXVlIGJlYXRhZS4=","disclosureFrame":["email"]},"required":["credential"]},"VerifyPresentationRequest":{"title":"VerifyPresentationRequest","type":"object","properties":{"aud":{"type":"string","description":"expected audience","example":"Omnis est id sit delectus esse."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Reiciendis ut et."},"description":"Disclosed Attributes","example":["email"]},"nonce":{"type":"string","description":"expected nonce","example":"Sapiente provident quo quis consectetur."},"presentation":{"type":"string","description":"Verifiable Presentation in JSON or sdjwt format.","example":"RG9sb3IgZXhwZWRpdGEgZG9sb3IgbW9sZXN0aWFzIGRpY3RhIGluIGRpZ25pc3NpbW9zLg==","format":"byte"}},"example":{"aud":"Voluptatem et quo vel eaque molestiae.","disclosureFrame":["email"],"nonce":"Sed quia aspernatur consequuntur ducimus eos consequuntur.","presentation":"UmF0aW9uZSBldW0u"},"required":["presentation"]},"VerifyResult":{"title":"VerifyResult","type":"object","properties":{"disclosedCredential":{"description":"Disclosed Credential","example":"Autem non aut quisquam sunt."},"valid":{"type":"boolean","description":"Valid specifies if the proof is successfully verified.","example":true}},"example":{"disclosedCredential":"Consequatur voluptatibus dignissimos autem rerum tempora.","valid":false},"required":["valid"]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Signer Service","description":"Signer service exposes HTTP API for making and verifying digital signatures and proofs for Verifiable Credentials.","version":"0.0.1"},"host":"localhost:8085","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/liveness":{"get":{"tags":["health"],"summary":"Liveness health","operationId":"health#Liveness","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/HealthResponse","required":["service","status","version"]}}},"schemes":["http"]}},"/readiness":{"get":{"tags":["health"],"summary":"Readiness health","operationId":"health#Readiness","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/HealthResponse","required":["service","status","version"]}}},"schemes":["http"]}},"/v1/credential":{"post":{"tags":["signer"],"summary":"CreateCredential signer","description":"CreateCredential creates VC with proof from raw JSON data.","operationId":"signer#CreateCredential","parameters":[{"name":"x-origin","in":"header","description":"Origin of call","required":true,"type":"string"},{"name":"x-tenantid","in":"header","description":"tenantid","required":true,"type":"string"},{"name":"x-groupid","in":"header","description":"Tenant Group","required":false,"type":"string","default":""},{"name":"CreateCredentialRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateCredentialRequest","required":["namespace","key","credentialSubject"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/credential/proof":{"post":{"tags":["signer"],"summary":"CredentialProof signer","description":"CredentialProof adds a proof to a given Verifiable Credential.","operationId":"signer#CredentialProof","parameters":[{"name":"CredentialProofRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/CredentialProofRequest","required":["namespace","key","credential","x-tenantid","x-did","x-origin"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/credential/verify":{"post":{"tags":["signer"],"summary":"VerifyCredential signer","description":"VerifyCredential verifies the proof of a Verifiable Credential.","operationId":"signer#VerifyCredential","parameters":[{"name":"x-format","in":"header","description":"format","required":false,"type":"string","default":"ldp_vc","enum":["ldp_vc","dc+sd-jwt"]},{"name":"x-namespace","in":"header","description":"Namespace for status check","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group for status check","required":false,"type":"string"},{"name":"x-tenantid","in":"header","description":"tenantid","required":false,"type":"string"},{"name":"x-groupid","in":"header","description":"Group","required":false,"type":"string"},{"name":"VerifyCredentialRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/VerifyCredentialRequest","required":["credential"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/VerifyResult","required":["valid"]}}},"schemes":["http"]}},"/v1/did/configuration":{"get":{"tags":["signer"],"summary":"DidConfiguration signer","description":"Creates did configuration.","operationId":"signer#DidConfiguration","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group.","required":false,"type":"string","default":""},{"name":"x-origin","in":"header","description":"origin for the configuration.","required":true,"type":"string"},{"name":"x-did","in":"header","description":"did for the Configuration","required":false,"type":"string"},{"name":"x-nonce","in":"header","description":"Proof challenge","required":false,"type":"string"},{"name":"DidConfigurationRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/DidConfiguration","required":["x-tenantid"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/did/document":{"get":{"tags":["signer"],"summary":"didDoc signer","operationId":"signer#didDoc","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","required":false,"type":"string","default":"transit"},{"name":"x-group","in":"header","description":"Group.","required":false,"type":"string","default":""},{"name":"x-did","in":"header","description":"did which is used for controller and id","required":false,"type":"string","default":"did:web:localhost%3A:8080"},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","required":false,"type":"string","default":"transit"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/DidResponse","required":["id","controller"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/DidResponse","required":["id","controller"]}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/DidResponse","required":["id","controller"]}}},"schemes":["http"]}},"/v1/did/list":{"get":{"tags":["signer"],"summary":"didList signer","operationId":"signer#didList","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group.","required":false,"type":"string","default":""},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","required":false,"type":"string","default":"transit"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/DidListResponse","required":["list"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/DidListResponse","required":["list"]}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/DidListResponse","required":["list"]}}},"schemes":["http"]}},"/v1/jwk/{namespace}/{key}":{"get":{"tags":["signer"],"summary":"JwkPublicKey signer","description":"JwkPublicKey returns public key by name and namespace.","operationId":"signer#JwkPublicKey","parameters":[{"name":"namespace","in":"path","description":"Key namespace.","required":true,"type":"string"},{"name":"key","in":"path","description":"Key name.","required":true,"type":"string"},{"name":"JwkPublicKeyRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/JwkPublicKeyRequest","required":["group"]}}],"responses":{"200":{"description":"OK response.","schema":{}},"404":{"description":"Not Found response.","schema":{}},"500":{"description":"Internal Server Error response.","schema":{}}},"schemes":["http"]}},"/v1/jwks":{"get":{"tags":["signer"],"summary":"Jwks signer","operationId":"signer#Jwks","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group.","required":false,"type":"string"},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","required":false,"type":"string","default":"transit"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/JwksResponse","required":["keys"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/JwksResponse","required":["keys"]}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/JwksResponse","required":["keys"]}}},"schemes":["http"]}},"/v1/namespaces":{"get":{"tags":["signer"],"summary":"Namespaces signer","description":"Namespaces returns all keys namespaces, which corresponds to enabled Vault transit engines.","operationId":"signer#Namespaces","responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Voluptatem qui consequatur."}}}},"schemes":["http"]}},"/v1/namespaces/{namespace}/keys":{"get":{"tags":["signer"],"summary":"NamespaceKeys signer","description":"NamespaceKeys returns all keys in a given namespace.","operationId":"signer#NamespaceKeys","parameters":[{"name":"namespace","in":"path","description":"Namespace for signing keys.","required":true,"type":"string"},{"name":"x-group","in":"header","description":"Group identifies a group of keys within a namespace.","required":false,"type":"string","default":""}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Aut pariatur."}}}},"schemes":["http"]}},"/v1/presentation":{"post":{"tags":["signer"],"summary":"CreatePresentation signer","description":"CreatePresentation creates VP with proof from raw JSON data.","operationId":"signer#CreatePresentation","parameters":[{"name":"CreatePresentationRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/CreatePresentationRequest","required":["namespace","key","data"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/presentation/proof":{"post":{"tags":["signer"],"summary":"PresentationProof signer","description":"PresentationProof adds a proof to a given Verifiable Presentation.","operationId":"signer#PresentationProof","parameters":[{"name":"PresentationProofRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/PresentationProofRequest","required":["namespace","key","presentation"]}}],"responses":{"200":{"description":"OK response.","schema":{}}},"schemes":["http"]}},"/v1/presentation/verify":{"post":{"tags":["signer"],"summary":"VerifyPresentation signer","description":"VerifyPresentation verifies the proof of a Verifiable Presentation.","operationId":"signer#VerifyPresentation","parameters":[{"name":"x-format","in":"header","description":"format","required":false,"type":"string","default":"ldp_vc","enum":["ldp_vc","dc+sd-jwt"]},{"name":"VerifyPresentationRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/VerifyPresentationRequest","required":["presentation"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/VerifyResult","required":["valid"]}}},"schemes":["http"]}},"/v1/sign":{"post":{"tags":["signer"],"summary":"Sign signer","description":"Sign creates digital signature on base64 encoded binary data.","operationId":"signer#Sign","parameters":[{"name":"SignRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/SignRequest","required":["namespace","key","data","group"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/SignResult","required":["signature"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/SignResult","required":["signature"]}},"500":{"description":"Internal Server Error response.","schema":{"$ref":"#/definitions/SignResult","required":["signature"]}}},"schemes":["http"]}},"/v1/verification-methods/{namespace}/{did}":{"get":{"tags":["signer"],"summary":"VerificationMethods signer","description":"VerificationMethods returns all public keys in a given namespace. The result is formatted as array of DID verification methods with their controller attribute being the given DID in the request.","operationId":"signer#VerificationMethods","parameters":[{"name":"namespace","in":"path","description":"Keys namespace.","required":true,"type":"string"},{"name":"did","in":"path","description":"DID controller of the keys.","required":true,"type":"string"},{"name":"VerificationMethodsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/VerificationMethodsRequest"}}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"$ref":"#/definitions/DIDVerificationMethod"}}}},"schemes":["http"]}},"/v1/verification-methods/{namespace}/{key}/{did}":{"get":{"tags":["signer"],"summary":"VerificationMethod signer","description":"VerificationMethod returns a single public key formatted as DID verification method for a given namespace, key and did. When did:jwk is set for did, a did:jwk is generated from the key.","operationId":"signer#VerificationMethod","parameters":[{"name":"namespace","in":"path","description":"Key namespace.","required":true,"type":"string"},{"name":"key","in":"path","description":"Name of requested key.","required":true,"type":"string"},{"name":"did","in":"path","description":"DID controller of the key.","required":true,"type":"string"},{"name":"VerificationMethodRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/VerificationMethodRequest"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/DIDVerificationMethod","required":["id","type","controller","publicKeyJwk"]}}},"schemes":["http"]}}},"definitions":{"CreateCredentialRequest":{"title":"CreateCredentialRequest","type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Ipsum laudantium voluptatibus ipsam autem eligendi nostrum."},"description":"Additional JSONLD contexts to be specified in the VC.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"credentialSubject":{"description":"Raw JSON that will be the VC subject.","example":{"hello":"world"}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Ut ducimus autem non."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Credential.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"status":{"type":"boolean","description":"Append Status","example":true},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"type":{"type":"array","items":{"type":"string","example":"Et autem voluptas eos sed vero."},"description":"Type(s) of the credential. Just first one for sd-jwt used.","example":["VerifiableCredential","TestCredential]"]}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"credentialSubject":{"hello":"world"},"disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","holder":"urn:3333:ddd","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":true,"statuslisttype":"urn:3333:ddd","type":["VerifiableCredential","TestCredential]"]},"required":["namespace","key","credentialSubject"]},"CreatePresentationRequest":{"title":"CreatePresentationRequest","type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Consequatur voluptatibus dignissimos autem rerum tempora."},"description":"Additional JSONLD contexts to be specified in the VP.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"data":{"type":"array","items":{"example":"Quisquam sunt hic."},"description":"Raw JSON to be included inside the VP as Verifiable Credential.","example":[{"hello":"world"},{"hola":"mundo"}]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Presentation.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"data":[{"hello":"world"},{"hola":"mundo"}],"group":"Group","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020"},"required":["namespace","key","data"]},"CredentialProofRequest":{"title":"CredentialProofRequest","type":"object","properties":{"credential":{"description":"Verifiable Credential in JSON format or as sdjwt.","example":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Porro facilis et molestias ut ea reiciendis."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"key":{"type":"string","description":"Key to use for the proof signature (optional).","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature.For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"status":{"type":"boolean","description":"Status embedded or not","example":false},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"x-did":{"type":"string","description":"Did","example":"https://test"},"x-groupid":{"type":"string","description":"Tenant Group","default":"","example":"group1"},"x-origin":{"type":"string","description":"Origin of call","example":"https://test"},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"credential":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}},"disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","holder":"urn:3333:ddd","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":false,"statuslisttype":"urn:3333:ddd","x-did":"https://test","x-groupid":"group1","x-origin":"https://test","x-tenantid":"demotenant"},"required":["namespace","key","credential","x-tenantid","x-did","x-origin"]},"DIDVerificationMethod":{"title":"DIDVerificationMethod","type":"object","properties":{"controller":{"type":"string","description":"Controller of verification method specified as DID.","example":"did:web:example.com"},"id":{"type":"string","description":"ID of verification method.","example":"key1"},"publicKeyJwk":{"description":"Public Key encoded in JWK format.","example":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK"},"type":{"type":"string","description":"Type of verification method key.","example":"JsonWebKey2020"}},"description":"Public Key represented as DID Verification Method.","example":{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},"required":["id","type","controller","publicKeyJwk"]},"DidConfiguration":{"title":"DidConfiguration","type":"object","properties":{"x-groupid":{"type":"string","description":"Tenant Group","example":"group1"},"x-signatureType":{"type":"string","description":"Type of signature","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"x-groupid":"group1","x-signatureType":"ed25519signature2020","x-tenantid":"demotenant"},"required":["x-tenantid"]},"DidListResponse":{"title":"DidListResponse","type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/definitions/DidListResponseItem"},"description":"did jwk list of keys","example":[{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."}]}},"example":{"list":[{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."}]},"required":["list"]},"DidListResponseItem":{"title":"DidListResponseItem","type":"object","properties":{"did":{"type":"string","description":"DID JWK of key","example":"Laboriosam rem architecto aspernatur quod."},"name":{"type":"string","description":"name of the key.","example":"Praesentium est at esse laudantium ex aut."}},"example":{"did":"Dicta non et sint aut.","name":"Aut nihil."},"required":["name","did"]},"DidResponse":{"title":"DidResponse","type":"object","properties":{"assertionMethod":{"type":"array","items":{"type":"string","example":"Quo ullam rerum ea nihil."},"description":"Verification methods authorized for assertion purposes.","example":["did:web:example.com#key1"]},"context":{"type":"array","items":{"type":"string","example":"Id eum quis placeat laudantium."},"description":"JSON-LD @context","example":["https://www.w3.org/ns/did/v1"]},"controller":{"type":"string","description":"controler of the document","example":"Dolorem quibusdam cum nostrum aut qui recusandae."},"id":{"type":"string","description":"did of the document","example":"Maiores accusamus."},"service":{"type":"array","items":{"$ref":"#/definitions/ServiceEndpoint"},"description":"serviceendpoints","example":[{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."}]},"verificationMethod":{"type":"array","items":{"$ref":"#/definitions/DIDVerificationMethod"},"description":"methods of the document","example":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}},"example":{"assertionMethod":["did:web:example.com#key1"],"context":["https://www.w3.org/ns/did/v1"],"controller":"Labore eum libero debitis tempore culpa illo.","id":"Reprehenderit aperiam.","service":[{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]},"required":["id","controller"]},"HealthResponse":{"title":"HealthResponse","type":"object","properties":{"service":{"type":"string","description":"Service name.","example":"Tempora voluptatibus aperiam eius velit."},"status":{"type":"string","description":"Status message.","example":"Dolores libero."},"version":{"type":"string","description":"Service runtime version.","example":"Tempora voluptatem error molestiae."}},"example":{"service":"Deleniti laudantium exercitationem tenetur iusto eos quidem.","status":"Dolorum et consequatur sed in vero qui.","version":"Ut et quasi eius error minima eaque."},"required":["service","status","version"]},"JwkPublicKeyRequest":{"title":"JwkPublicKeyRequest","type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"},"required":["group"]},"JwksResponse":{"title":"JwksResponse","type":"object","properties":{"keys":{"type":"array","items":{"example":"Ut error voluptatum."},"description":"List of jwk","example":["Ducimus aliquid aliquid excepturi explicabo.","Veritatis libero et ut.","Maiores quam pariatur sit.","Ipsum ea totam quam aperiam earum."]}},"example":{"keys":["Possimus cupiditate temporibus dolor consequatur.","Ipsum fugiat dignissimos tempora et ipsa."]},"required":["keys"]},"PresentationProofRequest":{"title":"PresentationProofRequest","type":"object","properties":{"aud":{"type":"string","description":"audience","example":"http://..."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Voluptatem aut quisquam."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"issuer":{"type":"string","description":"Issuer DID used to specify proof verification info.","example":"Doloremque ea saepe quidem dolores fugiat aliquam."},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"presentation":{"description":"Verifiable Presentation in JSON format.","example":"Voluptatem maxime dolor et sed fugit."},"signatureType":{"type":"string","description":"Type of signature.For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020","sdjwt"]}},"example":{"aud":"http://...","disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","issuer":"Blanditiis ea recusandae unde consequatur odit.","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","presentation":"At iste nostrum numquam quaerat natus temporibus.","signatureType":"ed25519signature2020"},"required":["namespace","key","presentation"]},"ServiceEndpoint":{"title":"ServiceEndpoint","type":"object","properties":{"id":{"type":"string","description":"did of the document","example":"Assumenda omnis aut soluta quaerat."},"serviceEndpoint":{"type":"string","description":"Endpoint URL","example":"Voluptates rerum."},"type":{"type":"string","description":"type of endpoint","example":"Cupiditate a suscipit molestiae a."}},"example":{"id":"Praesentium facilis ratione cumque in facilis nostrum.","serviceEndpoint":"Nam nostrum fuga.","type":"At dolores omnis voluptas necessitatibus vero et."},"required":["id","type","serviceEndpoint"]},"SignRequest":{"title":"SignRequest","type":"object","properties":{"data":{"type":"string","description":"Data that must be signed, encoded as base64 string.","example":"Facere doloribus quo eos."},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"key":{"type":"string","description":"Key to be used for signing.","example":"Maxime corrupti."},"namespace":{"type":"string","description":"Key namespace to be used for signing.","example":"Hic alias consectetur excepturi esse tenetur repellat."}},"example":{"data":"Maxime harum omnis qui laborum.","group":"Group","key":"In aliquid sint numquam facere sequi.","namespace":"Quis soluta nihil expedita numquam."},"required":["namespace","key","data","group"]},"SignResult":{"title":"SignResult","type":"object","properties":{"signature":{"type":"string","description":"Signature encoded as base64 string.","example":"Eius corporis et."}},"example":{"signature":"Qui laboriosam."},"required":["signature"]},"VerificationMethodRequest":{"title":"VerificationMethodRequest","type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"}},"VerificationMethodsRequest":{"title":"VerificationMethodsRequest","type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"}},"VerifyCredentialRequest":{"title":"VerifyCredentialRequest","type":"object","properties":{"credential":{"type":"string","description":"Verifiable Credential in JSON format.","example":"SW4gZGlnbmlzc2ltb3Mu","format":"byte"},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Reiciendis ut et."},"description":"Disclosed Attributes","example":["email"]}},"example":{"credential":"T21uaXMgZXN0IGlkIHNpdCBkZWxlY3R1cyBlc3NlLg==","disclosureFrame":["email"]},"required":["credential"]},"VerifyPresentationRequest":{"title":"VerifyPresentationRequest","type":"object","properties":{"aud":{"type":"string","description":"expected audience","example":"Voluptatem et quo vel eaque molestiae."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Ratione eum."},"description":"Disclosed Attributes","example":["email"]},"nonce":{"type":"string","description":"expected nonce","example":"Sed quia aspernatur consequuntur ducimus eos consequuntur."},"presentation":{"type":"string","description":"Verifiable Presentation in JSON or sdjwt format.","example":"U2FwaWVudGUgcHJvdmlkZW50IHF1byBxdWlzIGNvbnNlY3RldHVyLg==","format":"byte"}},"example":{"aud":"Omnis quas perferendis id ipsum quis recusandae.","disclosureFrame":["email"],"nonce":"Et sunt culpa est et accusantium sit.","presentation":"U2ltaWxpcXVlIGZ1Z2EgaXN0ZSBhbGlxdWlkIHF1YW0u"},"required":["presentation"]},"VerifyResult":{"title":"VerifyResult","type":"object","properties":{"disclosedCredential":{"description":"Disclosed Credential","example":"Voluptatem qui fugit cumque ab doloremque."},"valid":{"type":"boolean","description":"Valid specifies if the proof is successfully verified.","example":false}},"example":{"disclosedCredential":"Cumque beatae quis dolor expedita dolor molestias.","valid":false},"required":["valid"]}}} \ No newline at end of file diff --git a/gen/http/openapi.yaml b/gen/http/openapi.yaml index 3c4a2d0..f5ac339 100644 --- a/gen/http/openapi.yaml +++ b/gen/http/openapi.yaml @@ -128,7 +128,7 @@ paths: default: ldp_vc enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt - name: x-namespace in: header description: Namespace for status check @@ -501,7 +501,7 @@ paths: default: ldp_vc enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt - name: VerifyPresentationRequestBody in: body required: true @@ -638,7 +638,7 @@ definitions: type: array items: type: string - example: Consequatur odit ut. + example: Ipsum laudantium voluptatibus ipsam autem eligendi nostrum. description: Additional JSONLD contexts to be specified in the VC. example: - https://w3id.org/security/suites/jws-2020/v1 @@ -651,7 +651,7 @@ definitions: type: array items: type: string - example: Laudantium voluptatibus ipsam autem eligendi. + example: Ut ducimus autem non. description: Disclosed Attributes example: - email @@ -659,10 +659,10 @@ definitions: type: string description: identifies the format of the credential. default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt group: type: string description: Group identifies a group of keys within a namespace. @@ -709,7 +709,7 @@ definitions: type: array items: type: string - example: Iste nostrum numquam quaerat natus temporibus maxime. + example: Et autem voluptas eos sed vero. description: Type(s) of the credential. Just first one for sd-jwt used. example: - VerifiableCredential @@ -722,7 +722,7 @@ definitions: hello: world disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group holder: urn:3333:ddd issuer: did:web:example.com @@ -747,7 +747,7 @@ definitions: type: array items: type: string - example: Voluptas eos sed vero qui. + example: Consequatur voluptatibus dignissimos autem rerum tempora. description: Additional JSONLD contexts to be specified in the VP. example: - https://w3id.org/security/suites/jws-2020/v1 @@ -755,7 +755,7 @@ definitions: data: type: array items: - example: Eveniet et. + example: Quisquam sunt hic. description: Raw JSON to be included inside the VP as Verifiable Credential. example: - hello: world @@ -836,10 +836,10 @@ definitions: type: string description: identifies the format of the credential. default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt group: type: string description: Group identifies a group of keys within a namespace. @@ -869,6 +869,10 @@ definitions: enum: - ed25519signature2020 - jsonwebsignature2020 + status: + type: boolean + description: Status embedded or not + example: false statuslisttype: type: string description: Statuslist. Ignored when status=false @@ -906,13 +910,14 @@ definitions: allow: true disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group holder: urn:3333:ddd key: key1 namespace: transit nonce: 3483492392vvv-fff signatureType: ed25519signature2020 + status: false statuslisttype: urn:3333:ddd x-did: https://test x-groupid: group1 @@ -991,24 +996,18 @@ definitions: $ref: '#/definitions/DidListResponseItem' description: did jwk list of keys example: - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. example: list: - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. required: - list DidListResponseItem: @@ -1018,14 +1017,14 @@ definitions: did: type: string description: DID JWK of key - example: Ullam rerum ea. + example: Laboriosam rem architecto aspernatur quod. name: type: string description: name of the key. - example: Expedita nam nostrum fuga est dicta. + example: Praesentium est at esse laudantium ex aut. example: - did: Labore eum libero debitis tempore culpa illo. - name: Placeat reprehenderit aperiam. + did: Dicta non et sint aut. + name: Aut nihil. required: - name - did @@ -1033,37 +1032,48 @@ definitions: title: DidResponse type: object properties: + assertionMethod: + type: array + items: + type: string + example: Quo ullam rerum ea nihil. + description: Verification methods authorized for assertion purposes. + example: + - did:web:example.com#key1 context: type: array items: type: string - example: Quis soluta nihil expedita numquam. + example: Id eum quis placeat laudantium. description: JSON-LD @context example: - https://www.w3.org/ns/did/v1 controller: type: string description: controler of the document - example: Maxime harum omnis qui laborum. + example: Dolorem quibusdam cum nostrum aut qui recusandae. id: type: string description: did of the document - example: In aliquid sint numquam facere sequi. + example: Maiores accusamus. service: type: array items: $ref: '#/definitions/ServiceEndpoint' description: serviceendpoints example: - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. verificationMethod: type: array items: @@ -1079,17 +1089,25 @@ definitions: publicKeyJwk: https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK type: JsonWebKey2020 example: + assertionMethod: + - did:web:example.com#key1 context: - https://www.w3.org/ns/did/v1 - controller: Ut at dolores omnis voluptas. - id: Facilis ratione cumque in facilis. + controller: Labore eum libero debitis tempore culpa illo. + id: Reprehenderit aperiam. service: - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. verificationMethod: - controller: did:web:example.com id: key1 @@ -1160,16 +1178,17 @@ definitions: keys: type: array items: - example: Praesentium est at esse laudantium ex aut. + example: Ut error voluptatum. description: List of jwk example: - - Rem architecto. - - Quod et. - - Nihil nihil dicta non. + - Ducimus aliquid aliquid excepturi explicabo. + - Veritatis libero et ut. + - Maiores quam pariatur sit. + - Ipsum ea totam quam aperiam earum. example: keys: - - Aut aspernatur corrupti esse ut. - - Voluptatum labore id ducimus. + - Possimus cupiditate temporibus dolor consequatur. + - Ipsum fugiat dignissimos tempora et ipsa. required: - keys PresentationProofRequest: @@ -1184,7 +1203,7 @@ definitions: type: array items: type: string - example: Fugit voluptatem maxime dolor et. + example: Voluptatem aut quisquam. description: Disclosed Attributes example: - email @@ -1192,10 +1211,10 @@ definitions: type: string description: identifies the format of the credential. default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt group: type: string description: Group identifies a group of keys within a namespace. @@ -1204,7 +1223,7 @@ definitions: issuer: type: string description: Issuer DID used to specify proof verification info. - example: Nihil numquam doloremque. + example: Doloremque ea saepe quidem dolores fugiat aliquam. key: type: string description: Key to use for the proof signature. @@ -1219,7 +1238,7 @@ definitions: example: 3483492392vvv-fff presentation: description: Verifiable Presentation in JSON format. - example: Saepe quidem dolores fugiat. + example: Voluptatem maxime dolor et sed fugit. signatureType: type: string description: Type of signature.For sd-jwt is it automatically selected. @@ -1233,13 +1252,13 @@ definitions: aud: http://... disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group - issuer: Fugit quo voluptatem aut. + issuer: Blanditiis ea recusandae unde consequatur odit. key: key1 namespace: transit nonce: 3483492392vvv-fff - presentation: Unde blanditiis ea recusandae. + presentation: At iste nostrum numquam quaerat natus temporibus. signatureType: ed25519signature2020 required: - namespace @@ -1252,19 +1271,19 @@ definitions: id: type: string description: did of the document - example: Eum quis. + example: Assumenda omnis aut soluta quaerat. serviceEndpoint: type: string description: Endpoint URL - example: Accusamus quisquam dolorem quibusdam cum nostrum aut. + example: Voluptates rerum. type: type: string description: type of endpoint - example: Laudantium autem. + example: Cupiditate a suscipit molestiae a. example: - id: Recusandae fugit ducimus assumenda omnis aut. - serviceEndpoint: Suscipit molestiae a nihil voluptates rerum. - type: Quaerat est cupiditate. + id: Praesentium facilis ratione cumque in facilis nostrum. + serviceEndpoint: Nam nostrum fuga. + type: At dolores omnis voluptas necessitatibus vero et. required: - id - type @@ -1276,7 +1295,7 @@ definitions: data: type: string description: Data that must be signed, encoded as base64 string. - example: Qui laboriosam. + example: Facere doloribus quo eos. group: type: string description: Group identifies a group of keys within a namespace. @@ -1285,16 +1304,16 @@ definitions: key: type: string description: Key to be used for signing. - example: Eius corporis et. + example: Maxime corrupti. namespace: type: string description: Key namespace to be used for signing. - example: Et sunt culpa est et accusantium sit. + example: Hic alias consectetur excepturi esse tenetur repellat. example: - data: Facere doloribus quo eos. + data: Maxime harum omnis qui laborum. group: Group - key: Maxime corrupti. - namespace: Hic alias consectetur excepturi esse tenetur repellat. + key: In aliquid sint numquam facere sequi. + namespace: Quis soluta nihil expedita numquam. required: - namespace - key @@ -1307,9 +1326,9 @@ definitions: signature: type: string description: Signature encoded as base64 string. - example: Similique fuga iste aliquid quam. + example: Eius corporis et. example: - signature: Omnis quas perferendis id ipsum quis recusandae. + signature: Qui laboriosam. required: - signature VerificationMethodRequest: @@ -1354,63 +1373,61 @@ definitions: type: string description: Verifiable Credential in JSON format. example: - - 86 - - 101 + - 73 - 110 - - 105 - - 97 - - 109 - 32 - - 118 - - 111 - - 108 - - 117 - - 112 - - 116 - - 97 - - 116 - - 101 - - 109 - - 32 - - 113 - - 117 + - 100 - 105 - - 32 - - 102 - - 117 - 103 + - 110 - 105 - - 116 + - 115 + - 115 + - 105 + - 109 + - 111 + - 115 - 46 format: byte disclosureFrame: type: array items: type: string - example: Ab doloremque. + example: Reiciendis ut et. description: Disclosed Attributes example: - email example: credential: - - 65 - - 117 - - 116 - - 101 + - 79 - 109 + - 110 + - 105 + - 115 - 32 - - 99 - - 117 - - 109 - - 113 - - 117 - 101 + - 115 + - 116 + - 32 + - 105 + - 100 + - 32 + - 115 + - 105 + - 116 - 32 - - 98 + - 100 - 101 - - 97 + - 108 + - 101 + - 99 - 116 - - 97 + - 117 + - 115 + - 32 + - 101 + - 115 + - 115 - 101 - 46 disclosureFrame: @@ -1424,92 +1441,101 @@ definitions: aud: type: string description: expected audience - example: Omnis est id sit delectus esse. + example: Voluptatem et quo vel eaque molestiae. disclosureFrame: type: array items: type: string - example: Reiciendis ut et. + example: Ratione eum. description: Disclosed Attributes example: - email nonce: type: string description: expected nonce - example: Sapiente provident quo quis consectetur. + example: Sed quia aspernatur consequuntur ducimus eos consequuntur. presentation: type: string description: Verifiable Presentation in JSON or sdjwt format. example: - - 68 - - 111 - - 108 - - 111 - - 114 - - 32 - - 101 - - 120 + - 83 + - 97 - 112 - - 101 - - 100 - 105 + - 101 + - 110 - 116 - - 97 + - 101 - 32 - - 100 - - 111 - - 108 - - 111 + - 112 - 114 - - 32 - - 109 - 111 - - 108 - - 101 - - 115 - - 116 + - 118 - 105 - - 97 - - 115 - - 32 - 100 - - 105 - - 99 + - 101 + - 110 - 116 - - 97 - 32 - - 105 - - 110 + - 113 + - 117 + - 111 - 32 - - 100 - - 105 - - 103 - - 110 + - 113 + - 117 - 105 - 115 - - 115 - - 105 - - 109 + - 32 + - 99 - 111 + - 110 - 115 + - 101 + - 99 + - 116 + - 101 + - 116 + - 117 + - 114 - 46 format: byte example: - aud: Voluptatem et quo vel eaque molestiae. + aud: Omnis quas perferendis id ipsum quis recusandae. disclosureFrame: - email - nonce: Sed quia aspernatur consequuntur ducimus eos consequuntur. + nonce: Et sunt culpa est et accusantium sit. presentation: - - 82 - - 97 - - 116 + - 83 - 105 - - 111 - - 110 + - 109 + - 105 + - 108 + - 105 + - 113 + - 117 - 101 - 32 + - 102 + - 117 + - 103 + - 97 + - 32 + - 105 + - 115 + - 116 - 101 + - 32 + - 97 + - 108 + - 105 + - 113 + - 117 + - 105 + - 100 + - 32 + - 113 - 117 + - 97 - 109 - 46 required: @@ -1520,13 +1546,13 @@ definitions: properties: disclosedCredential: description: Disclosed Credential - example: Autem non aut quisquam sunt. + example: Voluptatem qui fugit cumque ab doloremque. valid: type: boolean description: Valid specifies if the proof is successfully verified. - example: true + example: false example: - disclosedCredential: Consequatur voluptatibus dignissimos autem rerum tempora. + disclosedCredential: Cumque beatae quis dolor expedita dolor molestias. valid: false required: - valid diff --git a/gen/http/openapi3.json b/gen/http/openapi3.json index 77d6efb..f108ff7 100644 --- a/gen/http/openapi3.json +++ b/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Signer Service","description":"Signer service exposes HTTP API for making and verifying digital signatures and proofs for Verifiable Credentials.","version":"0.0.1"},"servers":[{"url":"http://localhost:8085","description":"Signer Server"}],"paths":{"/liveness":{"get":{"tags":["health"],"summary":"Liveness health","operationId":"health#Liveness","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"service":"Ut occaecati repellat.","status":"Non amet.","version":"Nihil iste debitis."}}}}}}},"/readiness":{"get":{"tags":["health"],"summary":"Readiness health","operationId":"health#Readiness","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"service":"Sapiente dolorem qui possimus qui labore veritatis.","status":"Fuga officia excepturi velit aut.","version":"Natus quos ut corrupti."}}}}}}},"/v1/credential":{"post":{"tags":["signer"],"summary":"CreateCredential signer","description":"CreateCredential creates VC with proof from raw JSON data.","operationId":"signer#CreateCredential","parameters":[{"name":"x-origin","in":"header","description":"Origin of call","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Origin of call","example":"https://test"},"example":"https://test"},{"name":"x-tenantid","in":"header","description":"tenantid","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"tenantid","example":"demotenant"},"example":"demotenant"},{"name":"x-groupid","in":"header","description":"Tenant Group","allowEmptyValue":true,"schema":{"type":"string","description":"Tenant Group","default":"","example":"group1"},"example":"group1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialRequest2"},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"credentialSubject":{"hello":"world"},"disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","holder":"urn:3333:ddd","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":true,"statuslisttype":"urn:3333:ddd","type":["VerifiableCredential","TestCredential]"]}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Dicta harum amet."},"example":"Dicta voluptas expedita."}}}}}},"/v1/credential/proof":{"post":{"tags":["signer"],"summary":"CredentialProof signer","description":"CredentialProof adds a proof to a given Verifiable Credential.","operationId":"signer#CredentialProof","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialProofRequest"},"example":{"credential":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}},"disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","holder":"urn:3333:ddd","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","statuslisttype":"urn:3333:ddd","x-did":"https://test","x-groupid":"group1","x-origin":"https://test","x-tenantid":"demotenant"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Vel ipsum consequatur."},"example":"Maiores earum perspiciatis et voluptas veritatis assumenda."}}}}}},"/v1/credential/verify":{"post":{"tags":["signer"],"summary":"VerifyCredential signer","description":"VerifyCredential verifies the proof of a Verifiable Credential.","operationId":"signer#VerifyCredential","parameters":[{"name":"x-format","in":"header","description":"format","allowEmptyValue":true,"schema":{"type":"string","description":"format","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"example":"ldp_vc or vc+sd-jwt"},{"name":"x-namespace","in":"header","description":"Namespace for status check","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Namespace for status check","example":"Culpa alias qui ut debitis sequi quo."},"example":"Enim est rem modi."},{"name":"x-group","in":"header","description":"Group for status check","allowEmptyValue":true,"schema":{"type":"string","description":"Group for status check","example":"Adipisci ex distinctio quod porro."},"example":"Dolor esse quae explicabo odio vero."},{"name":"x-tenantid","in":"header","description":"tenantid","allowEmptyValue":true,"schema":{"type":"string","description":"tenantid","example":"demotenant"},"example":"demotenant"},{"name":"x-groupid","in":"header","description":"Group","allowEmptyValue":true,"schema":{"type":"string","description":"Group","example":"group1"},"example":"group1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCredentialRequest2"},"example":{"credential":"RXN0IG9jY2FlY2F0aSBuYW0u","disclosureFrame":["email"]}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResult"},"example":{"disclosedCredential":"Incidunt et repellat cum sit quibusdam.","valid":false}}}}}}},"/v1/did/configuration":{"get":{"tags":["signer"],"summary":"DidConfiguration signer","description":"Creates did configuration.","operationId":"signer#DidConfiguration","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Namespace.","example":"Quia natus."},"example":"Et praesentium veritatis."},{"name":"x-group","in":"header","description":"Group.","allowEmptyValue":true,"schema":{"type":"string","description":"Group.","default":"","example":"Group"},"example":"Group"},{"name":"x-origin","in":"header","description":"origin for the configuration.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"origin for the configuration.","example":"At voluptas."},"example":"Culpa omnis exercitationem qui ea."},{"name":"x-did","in":"header","description":"did for the Configuration","allowEmptyValue":true,"schema":{"type":"string","description":"did for the Configuration","example":"Enim numquam tempora asperiores quis occaecati rerum."},"example":"Quo laborum et animi exercitationem."},{"name":"x-nonce","in":"header","description":"Proof challenge","allowEmptyValue":true,"schema":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"example":"3483492392vvv-fff"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidConfiguration2"},"example":{"x-groupid":"group1","x-signatureType":"ed25519signature2020","x-tenantid":"demotenant"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Ratione quia amet perferendis impedit minima."},"example":"Nihil quidem in debitis consequatur."}}}}}},"/v1/did/document":{"get":{"tags":["signer"],"summary":"didDoc signer","operationId":"signer#didDoc","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","allowEmptyValue":true,"schema":{"type":"string","description":"Namespace.","default":"transit","example":"Officiis consequatur in."},"example":"Aut iusto est."},{"name":"x-group","in":"header","description":"Group.","allowEmptyValue":true,"schema":{"type":"string","description":"Group.","default":"","example":"Group"},"example":"Group"},{"name":"x-did","in":"header","description":"did which is used for controller and id","allowEmptyValue":true,"schema":{"type":"string","description":"did which is used for controller and id","default":"did:web:localhost%3A:8080","example":"exampl:com"},"example":"exampl:com"},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","allowEmptyValue":true,"schema":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"example":"transit"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidResponse"},"example":{"context":["https://www.w3.org/ns/did/v1"],"controller":"Ut error perspiciatis velit repudiandae voluptatem.","id":"Qui rerum.","service":[{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidResponse"},"example":{"context":["https://www.w3.org/ns/did/v1"],"controller":"Aperiam odit illo natus.","id":"Nam accusamus ea dolorem tenetur.","service":[{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidResponse"},"example":{"context":["https://www.w3.org/ns/did/v1"],"controller":"Quia deserunt quidem et.","id":"Consequuntur tempore occaecati doloremque.","service":[{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."},{"id":"Ducimus eum facere enim accusantium.","serviceEndpoint":"Suscipit expedita quos eligendi.","type":"Sint laudantium rerum neque."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}}}}}}},"/v1/did/list":{"get":{"tags":["signer"],"summary":"didList signer","operationId":"signer#didList","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Namespace.","example":"Cumque delectus."},"example":"Voluptatem nihil neque quia animi."},{"name":"x-group","in":"header","description":"Group.","allowEmptyValue":true,"schema":{"type":"string","description":"Group.","default":"","example":"Group"},"example":"Group"},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","allowEmptyValue":true,"schema":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"example":"transit"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidListResponse"},"example":{"list":[{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."}]}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidListResponse"},"example":{"list":[{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."}]}}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidListResponse"},"example":{"list":[{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."},{"did":"Unde facilis ut similique molestias aperiam quia.","name":"Tempora et non aut inventore."}]}}}}}}},"/v1/jwk/{namespace}/{key}":{"get":{"tags":["signer"],"summary":"JwkPublicKey signer","description":"JwkPublicKey returns public key by name and namespace.","operationId":"signer#JwkPublicKey","parameters":[{"name":"namespace","in":"path","description":"Key namespace.","required":true,"schema":{"type":"string","description":"Key namespace.","example":"transit"},"example":"transit"},{"name":"key","in":"path","description":"Key name.","required":true,"schema":{"type":"string","description":"Key name.","example":"my-ecdsa-key1"},"example":"my-ecdsa-key1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwkPublicKeyRequest2"},"example":{"engine":"transit","group":"Group"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"description":"Public key encoded as JSON Web Key.","example":"Aut saepe."},"example":"Quam soluta enim."}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"description":"Public key encoded as JSON Web Key.","example":"Sed quas beatae ab architecto."},"example":"Voluptatibus quos in nulla nemo voluptas dolor."}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"description":"Public key encoded as JSON Web Key.","example":"Omnis iure illo libero."},"example":"Unde non veritatis perferendis dolorem eligendi recusandae."}}}}}},"/v1/jwks":{"get":{"tags":["signer"],"summary":"Jwks signer","operationId":"signer#Jwks","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Namespace.","example":"Qui ut aut facilis sed quaerat doloremque."},"example":"Totam nam consequatur ea nobis est."},{"name":"x-group","in":"header","description":"Group.","allowEmptyValue":true,"schema":{"type":"string","description":"Group.","example":"Deleniti debitis sunt sunt at aut adipisci."},"example":"Quam quae."},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","allowEmptyValue":true,"schema":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"example":"transit"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwksResponse"},"example":{"keys":["Reprehenderit neque.","Quia rem at eum.","Autem in voluptatem magnam."]}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwksResponse"},"example":{"keys":["Maiores officiis magni cum sunt.","Quibusdam sunt.","Tempora dolores aliquid porro iste totam."]}}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwksResponse"},"example":{"keys":["Non est fugiat et.","Vel consequatur veritatis ab molestiae minus et.","Ullam quidem vitae qui est et.","Voluptatum saepe itaque ratione accusamus laborum."]}}}}}}},"/v1/namespaces":{"get":{"tags":["signer"],"summary":"Namespaces signer","description":"Namespaces returns all keys namespaces, which corresponds to enabled Vault transit engines.","operationId":"signer#Namespaces","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Aut odit nam nesciunt accusantium facilis."},"description":"List of available keys namespaces.","example":["Labore facilis delectus quis.","Maxime magnam quidem veniam asperiores consectetur.","Quis in laborum laudantium esse."]},"example":["Animi quo rem.","Ipsa laborum aut provident quo quo voluptates.","Illo voluptatem."]}}}}}},"/v1/namespaces/{namespace}/keys":{"get":{"tags":["signer"],"summary":"NamespaceKeys signer","description":"NamespaceKeys returns all keys in a given namespace.","operationId":"signer#NamespaceKeys","parameters":[{"name":"namespace","in":"path","description":"Namespace for signing keys.","required":true,"schema":{"type":"string","description":"Namespace for signing keys.","example":"did:web:example.com"},"example":"did:web:example.com"},{"name":"x-group","in":"header","description":"Group identifies a group of keys within a namespace.","allowEmptyValue":true,"schema":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"example":"Group"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Temporibus error."},"description":"Array of key names in a given namespace.","example":["Aut harum sed eius nisi at corporis.","Fugiat aperiam soluta necessitatibus illo unde expedita."]},"example":["Nihil aperiam velit doloremque ratione.","Molestiae qui incidunt excepturi vel aliquid."]}}}}}},"/v1/presentation":{"post":{"tags":["signer"],"summary":"CreatePresentation signer","description":"CreatePresentation creates VP with proof from raw JSON data.","operationId":"signer#CreatePresentation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePresentationRequest"},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"data":[{"hello":"world"},{"hola":"mundo"}],"group":"Group","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Aut minima consequuntur voluptatem ea molestias doloribus."},"example":"Iusto quis qui illum sit et libero."}}}}}},"/v1/presentation/proof":{"post":{"tags":["signer"],"summary":"PresentationProof signer","description":"PresentationProof adds a proof to a given Verifiable Presentation.","operationId":"signer#PresentationProof","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresentationProofRequest"},"example":{"aud":"http://...","disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","issuer":"Neque blanditiis nostrum nihil consequuntur est.","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","presentation":"Explicabo possimus ea.","signatureType":"ed25519signature2020"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Minima temporibus nobis."},"example":"Sapiente optio laudantium nihil minima ut."}}}}}},"/v1/presentation/verify":{"post":{"tags":["signer"],"summary":"VerifyPresentation signer","description":"VerifyPresentation verifies the proof of a Verifiable Presentation.","operationId":"signer#VerifyPresentation","parameters":[{"name":"x-format","in":"header","description":"format","allowEmptyValue":true,"schema":{"type":"string","description":"format","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"example":"ldp_vc or vc+sd-jwt"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyPresentationRequest2"},"example":{"aud":"Velit sit exercitationem et eligendi incidunt.","disclosureFrame":["email"],"nonce":"Molestiae eveniet vero est aliquam.","presentation":"RG9sb3JlcyBxdWlzIGZ1Z2lhdCBxdWkgcXVpYS4="}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResult"},"example":{"disclosedCredential":"Quam sint voluptates consectetur.","valid":false}}}}}}},"/v1/sign":{"post":{"tags":["signer"],"summary":"Sign signer","description":"Sign creates digital signature on base64 encoded binary data.","operationId":"signer#Sign","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignRequest"},"example":{"data":"Ratione earum debitis.","group":"Group","key":"Dolorum hic aut voluptatem.","namespace":"Repellat illum repudiandae."}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignResult"},"example":{"signature":"Rerum veritatis delectus quis recusandae."}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignResult"},"example":{"signature":"Provident explicabo numquam culpa eum porro."}}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignResult"},"example":{"signature":"Laudantium nulla quod ab adipisci odio."}}}}}}},"/v1/verification-methods/{namespace}/{did}":{"get":{"tags":["signer"],"summary":"VerificationMethods signer","description":"VerificationMethods returns all public keys in a given namespace. The result is formatted as array of DID verification methods with their controller attribute being the given DID in the request.","operationId":"signer#VerificationMethods","parameters":[{"name":"namespace","in":"path","description":"Keys namespace.","required":true,"schema":{"type":"string","description":"Keys namespace.","example":"transit"},"example":"transit"},{"name":"did","in":"path","description":"DID controller of the keys.","required":true,"schema":{"type":"string","description":"DID controller of the keys.","example":"did:web:example.com"},"example":"did:web:example.com"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationMethodsRequest2"},"example":{"engine":"transit","group":"Group"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DIDVerificationMethod"},"description":"Array of public keys represented as DID Verification Methods.","example":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]},"example":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}}}}}},"/v1/verification-methods/{namespace}/{key}/{did}":{"get":{"tags":["signer"],"summary":"VerificationMethod signer","description":"VerificationMethod returns a single public key formatted as DID verification method for a given namespace, key and did. When did:jwk is set for did, a did:jwk is generated from the key.","operationId":"signer#VerificationMethod","parameters":[{"name":"namespace","in":"path","description":"Key namespace.","required":true,"schema":{"type":"string","description":"Key namespace.","example":"transit"},"example":"transit"},{"name":"key","in":"path","description":"Name of requested key.","required":true,"schema":{"type":"string","description":"Name of requested key.","example":"key1"},"example":"key1"},{"name":"did","in":"path","description":"DID controller of the key.","required":true,"schema":{"type":"string","description":"DID controller of the key.","example":"did:web:example.com"},"example":"did:web:example.com"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationMethodRequest2"},"example":{"engine":"transit","group":"Group"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DIDVerificationMethod"},"example":{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}}}}}}}},"components":{"schemas":{"CreateCredentialRequest":{"type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Quae earum."},"description":"Additional JSONLD contexts to be specified in the VC.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"credentialSubject":{"description":"Raw JSON that will be the VC subject.","example":{"hello":"world"}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Velit dolor id aliquid."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Credential.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"status":{"type":"boolean","description":"Append Status","example":true},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"type":{"type":"array","items":{"type":"string","example":"Dolorum cum asperiores."},"description":"Type(s) of the credential. Just first one for sd-jwt used.","example":["VerifiableCredential","TestCredential]"]},"x-groupid":{"type":"string","description":"Tenant Group","default":"","example":"group1"},"x-origin":{"type":"string","description":"Origin of call","example":"https://test"},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"credentialSubject":{"hello":"world"},"disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","holder":"urn:3333:ddd","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":true,"statuslisttype":"urn:3333:ddd","type":["VerifiableCredential","TestCredential]"],"x-groupid":"group1","x-origin":"https://test","x-tenantid":"demotenant"},"required":["namespace","key","credentialSubject","x-origin","x-tenantid"]},"CreateCredentialRequest2":{"type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Unde magni quis."},"description":"Additional JSONLD contexts to be specified in the VC.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"credentialSubject":{"description":"Raw JSON that will be the VC subject.","example":{"hello":"world"}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Qui sit numquam a eos molestiae totam."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Credential.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"status":{"type":"boolean","description":"Append Status","example":true},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"type":{"type":"array","items":{"type":"string","example":"Corrupti fugiat."},"description":"Type(s) of the credential. Just first one for sd-jwt used.","example":["VerifiableCredential","TestCredential]"]}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"credentialSubject":{"hello":"world"},"disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","holder":"urn:3333:ddd","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":true,"statuslisttype":"urn:3333:ddd","type":["VerifiableCredential","TestCredential]"]},"required":["namespace","key","credentialSubject"]},"CreatePresentationRequest":{"type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Cupiditate sunt ipsam sed."},"description":"Additional JSONLD contexts to be specified in the VP.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"data":{"type":"array","items":{"example":"Aut quam."},"description":"Raw JSON to be included inside the VP as Verifiable Credential.","example":[{"hello":"world"},{"hola":"mundo"}]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Presentation.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"data":[{"hello":"world"},{"hola":"mundo"}],"group":"Group","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020"},"required":["namespace","key","data"]},"CredentialProofRequest":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in JSON format or as sdjwt.","example":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Aliquid excepturi explicabo quos veritatis."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"key":{"type":"string","description":"Key to use for the proof signature (optional).","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature.For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"x-did":{"type":"string","description":"Did","example":"https://test"},"x-groupid":{"type":"string","description":"Tenant Group","default":"","example":"group1"},"x-origin":{"type":"string","description":"Origin of call","example":"https://test"},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"credential":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}},"disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","holder":"urn:3333:ddd","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","statuslisttype":"urn:3333:ddd","x-did":"https://test","x-groupid":"group1","x-origin":"https://test","x-tenantid":"demotenant"},"required":["namespace","key","credential","x-tenantid","x-did","x-origin"]},"DIDVerificationMethod":{"type":"object","properties":{"controller":{"type":"string","description":"Controller of verification method specified as DID.","example":"did:web:example.com"},"id":{"type":"string","description":"ID of verification method.","example":"key1"},"publicKeyJwk":{"description":"Public Key encoded in JWK format.","example":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK"},"type":{"type":"string","description":"Type of verification method key.","example":"JsonWebKey2020"}},"example":{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},"required":["id","type","controller","publicKeyJwk"]},"DidConfiguration":{"type":"object","properties":{"x-did":{"type":"string","description":"did for the Configuration","example":"Dolorem quos et eius ullam."},"x-group":{"type":"string","description":"Group.","default":"","example":"Group"},"x-groupid":{"type":"string","description":"Tenant Group","example":"group1"},"x-namespace":{"type":"string","description":"Namespace.","example":"Illo magnam et occaecati."},"x-nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"x-origin":{"type":"string","description":"origin for the configuration.","example":"Porro asperiores eligendi nisi voluptatibus voluptatum voluptas."},"x-signatureType":{"type":"string","description":"Type of signature","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"x-did":"Nobis rerum est aut.","x-group":"Group","x-groupid":"group1","x-namespace":"Corrupti sapiente consequatur ut architecto qui.","x-nonce":"3483492392vvv-fff","x-origin":"Aut asperiores sequi.","x-signatureType":"ed25519signature2020","x-tenantid":"demotenant"},"required":["x-namespace","x-origin","x-tenantid"]},"DidConfiguration2":{"type":"object","properties":{"x-groupid":{"type":"string","description":"Tenant Group","example":"group1"},"x-signatureType":{"type":"string","description":"Type of signature","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"x-groupid":"group1","x-signatureType":"ed25519signature2020","x-tenantid":"demotenant"},"required":["x-tenantid"]},"DidListRequest":{"type":"object","properties":{"x-engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"x-group":{"type":"string","description":"Group.","default":"","example":"Group"},"x-namespace":{"type":"string","description":"Namespace.","example":"Assumenda nam."}},"example":{"x-engine":"transit","x-group":"Group","x-namespace":"Aut neque dolorum praesentium voluptatum."},"required":["x-namespace"]},"DidListResponse":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/DidListResponseItem"},"description":"did jwk list of keys","example":[{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."},{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."},{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."},{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."}]}},"example":{"list":[{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."},{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."}]},"required":["list"]},"DidListResponseItem":{"type":"object","properties":{"did":{"type":"string","description":"DID JWK of key","example":"Quaerat officia magni recusandae aut autem nesciunt."},"name":{"type":"string","description":"name of the key.","example":"Tempore quia voluptatem aliquid."}},"example":{"did":"Repudiandae voluptatem possimus nisi dolorum.","name":"Ut omnis."},"required":["name","did"]},"DidRequest":{"type":"object","properties":{"x-did":{"type":"string","description":"did which is used for controller and id","default":"did:web:localhost%3A:8080","example":"exampl:com"},"x-engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"x-group":{"type":"string","description":"Group.","default":"","example":"Group"},"x-namespace":{"type":"string","description":"Namespace.","default":"transit","example":"Quidem veritatis."}},"example":{"x-did":"exampl:com","x-engine":"transit","x-group":"Group","x-namespace":"Id voluptatem consectetur dolorem et saepe."}},"DidResponse":{"type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Ea placeat velit minus praesentium doloribus qui."},"description":"JSON-LD @context","example":["https://www.w3.org/ns/did/v1"]},"controller":{"type":"string","description":"controler of the document","example":"Ratione aut delectus illo autem."},"id":{"type":"string","description":"did of the document","example":"Impedit nihil."},"service":{"type":"array","items":{"$ref":"#/components/schemas/ServiceEndpoint"},"description":"serviceendpoints","example":[{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."},{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."}]},"verificationMethod":{"type":"array","items":{"$ref":"#/components/schemas/DIDVerificationMethod"},"description":"methods of the document","example":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}},"example":{"context":["https://www.w3.org/ns/did/v1"],"controller":"Beatae labore error qui sit.","id":"Sed aut et et autem.","service":[{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."},{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]},"required":["id","controller"]},"HealthResponse":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","example":"Sint mollitia."},"status":{"type":"string","description":"Status message.","example":"Quas magnam dolorem quia."},"version":{"type":"string","description":"Service runtime version.","example":"Reiciendis sunt accusamus hic."}},"example":{"service":"Animi non quidem eum veniam.","status":"Facilis numquam adipisci et laudantium.","version":"Autem inventore exercitationem provident."},"required":["service","status","version"]},"JwkPublicKeyRequest":{"type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"key":{"type":"string","description":"Key name.","example":"my-ecdsa-key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"}},"example":{"engine":"transit","group":"Group","key":"my-ecdsa-key1","namespace":"transit"},"required":["namespace","key","group"]},"JwkPublicKeyRequest2":{"type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"},"required":["group"]},"JwksRequest":{"type":"object","properties":{"x-engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"x-group":{"type":"string","description":"Group.","example":"Assumenda consectetur officia."},"x-namespace":{"type":"string","description":"Namespace.","example":"Sint qui repudiandae laudantium."}},"example":{"x-engine":"transit","x-group":"Voluptatem cumque cum id provident.","x-namespace":"Odit sequi commodi odit unde consequatur."},"required":["x-namespace"]},"JwksResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"example":"Quia ratione qui."},"description":"List of jwk","example":["Voluptatem illo.","Neque in.","Facere occaecati nulla perspiciatis dolores molestiae quos.","Aut minus omnis quidem."]}},"example":{"keys":["Et ipsa tenetur.","Qui sint illo molestias nihil ex.","Pariatur dicta.","Quis magnam aut quod."]},"required":["keys"]},"NamespaceKeysRequest":{"type":"object","properties":{"namespace":{"type":"string","description":"Namespace for signing keys.","example":"did:web:example.com"},"x-group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"namespace":"did:web:example.com","x-group":"Group"},"required":["namespace"]},"PresentationProofRequest":{"type":"object","properties":{"aud":{"type":"string","description":"audience","example":"http://..."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Reiciendis consequatur possimus cupiditate temporibus."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"issuer":{"type":"string","description":"Issuer DID used to specify proof verification info.","example":"Et ut eum maiores quam pariatur."},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"presentation":{"description":"Verifiable Presentation in JSON format.","example":"Voluptatibus ipsum ea totam quam aperiam."},"signatureType":{"type":"string","description":"Type of signature.For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020","sdjwt"]}},"example":{"aud":"http://...","disclosureFrame":["email"],"format":"ldp_vc or vc+sd-jwt","group":"Group","issuer":"Consequatur laudantium ipsum fugiat.","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","presentation":"Tempora et ipsa omnis hic quasi molestiae.","signatureType":"ed25519signature2020"},"required":["namespace","key","presentation"]},"ServiceEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"did of the document","example":"Molestiae quisquam hic sed id quas."},"serviceEndpoint":{"type":"string","description":"Endpoint URL","example":"Saepe fugiat et pariatur saepe."},"type":{"type":"string","description":"type of endpoint","example":"Ab exercitationem esse praesentium nemo."}},"example":{"id":"Eveniet et.","serviceEndpoint":"Itaque cum sed tempora dicta quibusdam aut.","type":"Consequatur expedita."},"required":["id","type","serviceEndpoint"]},"SignRequest":{"type":"object","properties":{"data":{"type":"string","description":"Data that must be signed, encoded as base64 string.","example":"Nobis velit cumque voluptas et nobis."},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"key":{"type":"string","description":"Key to be used for signing.","example":"Eum fuga nihil non sapiente."},"namespace":{"type":"string","description":"Key namespace to be used for signing.","example":"Officia omnis est."}},"example":{"data":"Voluptatem culpa exercitationem molestias id.","group":"Group","key":"Omnis atque.","namespace":"Enim aperiam similique."},"required":["namespace","key","data","group"]},"SignResult":{"type":"object","properties":{"signature":{"type":"string","description":"Signature encoded as base64 string.","example":"Quibusdam quia et."}},"example":{"signature":"Voluptatem neque aut repudiandae praesentium eligendi repellat."},"required":["signature"]},"VerificationMethodRequest":{"type":"object","properties":{"did":{"type":"string","description":"DID controller of the key.","example":"did:web:example.com"},"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"key":{"type":"string","description":"Name of requested key.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"}},"example":{"did":"did:web:example.com","engine":"transit","group":"Group","key":"key1","namespace":"transit"},"required":["namespace","key","did"]},"VerificationMethodRequest2":{"type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"}},"VerificationMethodsRequest":{"type":"object","properties":{"did":{"type":"string","description":"DID controller of the keys.","example":"did:web:example.com"},"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"namespace":{"type":"string","description":"Keys namespace.","example":"transit"}},"example":{"did":"did:web:example.com","engine":"transit","group":"Group","namespace":"transit"},"required":["namespace","did"]},"VerificationMethodsRequest2":{"type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"}},"VerifyCredentialRequest":{"type":"object","properties":{"credential":{"type":"string","description":"Verifiable Credential in JSON format.","example":"SW4gaXVzdG8gcGxhY2VhdCBmdWdhIHJlcHJlaGVuZGVyaXQgbm9uLg==","format":"binary"},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Quia libero error."},"description":"Disclosed Attributes","example":["email"]},"x-format":{"type":"string","description":"format","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]},"x-group":{"type":"string","description":"Group for status check","example":"Neque quia facere hic necessitatibus sequi."},"x-groupid":{"type":"string","description":"Group","example":"group1"},"x-namespace":{"type":"string","description":"Namespace for status check","example":"Sunt velit."},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"credential":"TW9sZXN0aWFlIHF1aWEu","disclosureFrame":["email"],"x-format":"ldp_vc or vc+sd-jwt","x-group":"Non vitae veniam totam.","x-groupid":"group1","x-namespace":"Inventore sed maiores voluptatem possimus natus nostrum.","x-tenantid":"demotenant"},"required":["credential","x-namespace"]},"VerifyCredentialRequest2":{"type":"object","properties":{"credential":{"type":"string","description":"Verifiable Credential in JSON format.","example":"RXhlcmNpdGF0aW9uZW0gZnVnaWF0IGRvbG9yZW1xdWUgZGljdGEu","format":"binary"},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Ad earum."},"description":"Disclosed Attributes","example":["email"]}},"example":{"credential":"TWFnbmkgZXhjZXB0dXJpIHJlcnVtLg==","disclosureFrame":["email"]},"required":["credential"]},"VerifyPresentationRequest":{"type":"object","properties":{"aud":{"type":"string","description":"expected audience","example":"Repudiandae deleniti ea consequatur voluptatem minima pariatur."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Qui voluptatum et."},"description":"Disclosed Attributes","example":["email"]},"nonce":{"type":"string","description":"expected nonce","example":"Quia illum est velit quam."},"presentation":{"type":"string","description":"Verifiable Presentation in JSON or sdjwt format.","example":"RG9sb3JlbXF1ZSBvZmZpY2lhIHZvbHVwdGF0ZW0gYXV0IGRlc2VydW50IHF1aWJ1c2RhbS4=","format":"binary"},"x-format":{"type":"string","description":"format","default":"ldp_vc","example":"ldp_vc or vc+sd-jwt","enum":["ldp_vc","vc+sd-jwt"]}},"example":{"aud":"Numquam ipsum sed et quia consequatur.","disclosureFrame":["email"],"nonce":"Ut sed sed architecto voluptate.","presentation":"QW5pbWkgZHVjaW11cyBwb3JybyBxdWkgbmVjZXNzaXRhdGlidXMgdm9sdXB0YXR1bSBuZXF1ZS4=","x-format":"ldp_vc or vc+sd-jwt"},"required":["presentation"]},"VerifyPresentationRequest2":{"type":"object","properties":{"aud":{"type":"string","description":"expected audience","example":"Et doloribus voluptas delectus voluptatem in."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Architecto cupiditate voluptas ea."},"description":"Disclosed Attributes","example":["email"]},"nonce":{"type":"string","description":"expected nonce","example":"Explicabo laborum temporibus rerum aut provident nihil."},"presentation":{"type":"string","description":"Verifiable Presentation in JSON or sdjwt format.","example":"Vm9sdXB0YXRlcyBzZWQgdm9sdXB0YXR1bSBzYWVwZSBxdWlidXNkYW0gdXQgbmVjZXNzaXRhdGlidXMu","format":"binary"}},"example":{"aud":"Harum eligendi.","disclosureFrame":["email"],"nonce":"Numquam rerum nobis repudiandae in.","presentation":"TWludXMgc2VxdWkgYXBlcmlhbSBjb25zZXF1dW50dXIgdGVtcG9yYSBldC4="},"required":["presentation"]},"VerifyResult":{"type":"object","properties":{"disclosedCredential":{"description":"Disclosed Credential","example":"Sapiente nisi et est sint sint."},"valid":{"type":"boolean","description":"Valid specifies if the proof is successfully verified.","example":true}},"example":{"disclosedCredential":"Culpa ut voluptatem explicabo commodi ipsum sit.","valid":false},"required":["valid"]}}},"tags":[{"name":"health","description":"Health service provides health check endpoints."},{"name":"signer","description":"Signer service makes digital signatures and proofs for verifiable credentials and presentations."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Signer Service","description":"Signer service exposes HTTP API for making and verifying digital signatures and proofs for Verifiable Credentials.","version":"0.0.1"},"servers":[{"url":"http://localhost:8085","description":"Signer Server"}],"paths":{"/liveness":{"get":{"tags":["health"],"summary":"Liveness health","operationId":"health#Liveness","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"service":"Ut occaecati repellat.","status":"Non amet.","version":"Nihil iste debitis."}}}}}}},"/readiness":{"get":{"tags":["health"],"summary":"Readiness health","operationId":"health#Readiness","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"service":"Sapiente dolorem qui possimus qui labore veritatis.","status":"Fuga officia excepturi velit aut.","version":"Natus quos ut corrupti."}}}}}}},"/v1/credential":{"post":{"tags":["signer"],"summary":"CreateCredential signer","description":"CreateCredential creates VC with proof from raw JSON data.","operationId":"signer#CreateCredential","parameters":[{"name":"x-origin","in":"header","description":"Origin of call","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Origin of call","example":"https://test"},"example":"https://test"},{"name":"x-tenantid","in":"header","description":"tenantid","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"tenantid","example":"demotenant"},"example":"demotenant"},{"name":"x-groupid","in":"header","description":"Tenant Group","allowEmptyValue":true,"schema":{"type":"string","description":"Tenant Group","default":"","example":"group1"},"example":"group1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialRequest2"},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"credentialSubject":{"hello":"world"},"disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","holder":"urn:3333:ddd","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":true,"statuslisttype":"urn:3333:ddd","type":["VerifiableCredential","TestCredential]"]}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Explicabo laborum temporibus rerum aut provident nihil."},"example":"Est rem."}}}}}},"/v1/credential/proof":{"post":{"tags":["signer"],"summary":"CredentialProof signer","description":"CredentialProof adds a proof to a given Verifiable Credential.","operationId":"signer#CredentialProof","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialProofRequest"},"example":{"credential":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}},"disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","holder":"urn:3333:ddd","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":false,"statuslisttype":"urn:3333:ddd","x-did":"https://test","x-groupid":"group1","x-origin":"https://test","x-tenantid":"demotenant"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Ad earum."},"example":"Esse quae explicabo odio vero neque officiis."}}}}}},"/v1/credential/verify":{"post":{"tags":["signer"],"summary":"VerifyCredential signer","description":"VerifyCredential verifies the proof of a Verifiable Credential.","operationId":"signer#VerifyCredential","parameters":[{"name":"x-format","in":"header","description":"format","allowEmptyValue":true,"schema":{"type":"string","description":"format","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"example":"ldp_vc or dc+sd-jwt"},{"name":"x-namespace","in":"header","description":"Namespace for status check","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Namespace for status check","example":"Animi qui quia natus laudantium et."},"example":"Veritatis cum."},{"name":"x-group","in":"header","description":"Group for status check","allowEmptyValue":true,"schema":{"type":"string","description":"Group for status check","example":"Voluptas alias culpa omnis."},"example":"Qui ea eum enim numquam tempora."},{"name":"x-tenantid","in":"header","description":"tenantid","allowEmptyValue":true,"schema":{"type":"string","description":"tenantid","example":"demotenant"},"example":"demotenant"},{"name":"x-groupid","in":"header","description":"Group","allowEmptyValue":true,"schema":{"type":"string","description":"Group","example":"group1"},"example":"group1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCredentialRequest2"},"example":{"credential":"QWNjdXNhbXVzIGV4IG5paGlsIGludmVudG9yZSBlYSBxdWku","disclosureFrame":["email"]}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResult"},"example":{"disclosedCredential":"Quis fugiat qui quia et.","valid":true}}}}}}},"/v1/did/configuration":{"get":{"tags":["signer"],"summary":"DidConfiguration signer","description":"Creates did configuration.","operationId":"signer#DidConfiguration","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Namespace.","example":"Totam nam consequatur ea nobis est."},"example":"Deleniti debitis sunt sunt at aut adipisci."},{"name":"x-group","in":"header","description":"Group.","allowEmptyValue":true,"schema":{"type":"string","description":"Group.","default":"","example":"Group"},"example":"Group"},{"name":"x-origin","in":"header","description":"origin for the configuration.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"origin for the configuration.","example":"Quam quae."},"example":"Dolores voluptas itaque omnis."},{"name":"x-did","in":"header","description":"did for the Configuration","allowEmptyValue":true,"schema":{"type":"string","description":"did for the Configuration","example":"Asperiores saepe."},"example":"Dignissimos amet qui quod minus."},{"name":"x-nonce","in":"header","description":"Proof challenge","allowEmptyValue":true,"schema":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"example":"3483492392vvv-fff"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidConfiguration2"},"example":{"x-groupid":"group1","x-signatureType":"ed25519signature2020","x-tenantid":"demotenant"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Voluptas dolor aperiam unde non veritatis."},"example":"Rerum sequi."}}}}}},"/v1/did/document":{"get":{"tags":["signer"],"summary":"didDoc signer","operationId":"signer#didDoc","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","allowEmptyValue":true,"schema":{"type":"string","description":"Namespace.","default":"transit","example":"Quis occaecati rerum et quo laborum."},"example":"Animi exercitationem."},{"name":"x-group","in":"header","description":"Group.","allowEmptyValue":true,"schema":{"type":"string","description":"Group.","default":"","example":"Group"},"example":"Group"},{"name":"x-did","in":"header","description":"did which is used for controller and id","allowEmptyValue":true,"schema":{"type":"string","description":"did which is used for controller and id","default":"did:web:localhost%3A:8080","example":"exampl:com"},"example":"exampl:com"},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","allowEmptyValue":true,"schema":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"example":"transit"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidResponse"},"example":{"assertionMethod":["did:web:example.com#key1"],"context":["https://www.w3.org/ns/did/v1"],"controller":"Rerum ratione voluptatibus asperiores rem tempora.","id":"Ut error perspiciatis velit repudiandae voluptatem.","service":[{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidResponse"},"example":{"assertionMethod":["did:web:example.com#key1"],"context":["https://www.w3.org/ns/did/v1"],"controller":"Aperiam odit illo natus.","id":"Nam accusamus ea dolorem tenetur.","service":[{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidResponse"},"example":{"assertionMethod":["did:web:example.com#key1"],"context":["https://www.w3.org/ns/did/v1"],"controller":"Quia deserunt quidem et.","id":"Consequuntur tempore occaecati doloremque.","service":[{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."},{"id":"Sint laudantium rerum neque.","serviceEndpoint":"Qui rerum.","type":"Suscipit expedita quos eligendi."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}}}}}}},"/v1/did/list":{"get":{"tags":["signer"],"summary":"didList signer","operationId":"signer#didList","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Namespace.","example":"Nihil quidem in debitis consequatur."},"example":"Qui ut aut facilis sed quaerat doloremque."},{"name":"x-group","in":"header","description":"Group.","allowEmptyValue":true,"schema":{"type":"string","description":"Group.","default":"","example":"Group"},"example":"Group"},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","allowEmptyValue":true,"schema":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"example":"transit"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidListResponse"},"example":{"list":[{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."}]}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidListResponse"},"example":{"list":[{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."}]}}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidListResponse"},"example":{"list":[{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."},{"did":"Et non.","name":"Molestias aperiam."}]}}}}}}},"/v1/jwk/{namespace}/{key}":{"get":{"tags":["signer"],"summary":"JwkPublicKey signer","description":"JwkPublicKey returns public key by name and namespace.","operationId":"signer#JwkPublicKey","parameters":[{"name":"namespace","in":"path","description":"Key namespace.","required":true,"schema":{"type":"string","description":"Key namespace.","example":"transit"},"example":"transit"},{"name":"key","in":"path","description":"Key name.","required":true,"schema":{"type":"string","description":"Key name.","example":"my-ecdsa-key1"},"example":"my-ecdsa-key1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwkPublicKeyRequest2"},"example":{"engine":"transit","group":"Group"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"description":"Public key encoded as JSON Web Key.","example":"Harum amet."},"example":"Ut debitis."}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"description":"Public key encoded as JSON Web Key.","example":"Aut minima consequuntur voluptatem ea molestias doloribus."},"example":"Quo inventore enim est rem modi est."}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"description":"Public key encoded as JSON Web Key.","example":"Exercitationem fugiat doloremque dicta."},"example":"Ex distinctio quod porro dolorum."}}}}}},"/v1/jwks":{"get":{"tags":["signer"],"summary":"Jwks signer","operationId":"signer#Jwks","parameters":[{"name":"x-namespace","in":"header","description":"Namespace.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Namespace.","example":"Sit amet libero accusamus ut a ea."},"example":"Quas et distinctio laboriosam a non laborum."},{"name":"x-group","in":"header","description":"Group.","allowEmptyValue":true,"schema":{"type":"string","description":"Group.","example":"Sint nihil cum praesentium."},"example":"Expedita quibusdam occaecati."},{"name":"x-engine","in":"header","description":"Engine which shall be used. Eg transit or transit;kv or kv","allowEmptyValue":true,"schema":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"example":"transit"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwksResponse"},"example":{"keys":["Labore quia rem.","Eum hic autem in.","Magnam unde provident explicabo numquam culpa eum."]}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwksResponse"},"example":{"keys":["Maiores officiis magni cum sunt.","Quibusdam sunt.","Tempora dolores aliquid porro iste totam."]}}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwksResponse"},"example":{"keys":["Non est fugiat et.","Vel consequatur veritatis ab molestiae minus et.","Ullam quidem vitae qui est et.","Voluptatum saepe itaque ratione accusamus laborum."]}}}}}}},"/v1/namespaces":{"get":{"tags":["signer"],"summary":"Namespaces signer","description":"Namespaces returns all keys namespaces, which corresponds to enabled Vault transit engines.","operationId":"signer#Namespaces","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Corporis nobis fugiat aperiam soluta necessitatibus illo."},"description":"List of available keys namespaces.","example":["Blanditiis dolores aut saepe sit sed.","Beatae ab architecto quos."]},"example":["Eligendi recusandae impedit maiores earum perspiciatis et.","Veritatis assumenda.","Sapiente optio laudantium nihil minima ut."]}}}}}},"/v1/namespaces/{namespace}/keys":{"get":{"tags":["signer"],"summary":"NamespaceKeys signer","description":"NamespaceKeys returns all keys in a given namespace.","operationId":"signer#NamespaceKeys","parameters":[{"name":"namespace","in":"path","description":"Namespace for signing keys.","required":true,"schema":{"type":"string","description":"Namespace for signing keys.","example":"did:web:example.com"},"example":"did:web:example.com"},{"name":"x-group","in":"header","description":"Group identifies a group of keys within a namespace.","allowEmptyValue":true,"schema":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"example":"Group"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Iure illo libero recusandae vel ipsum."},"description":"Array of key names in a given namespace.","example":["Minima temporibus nobis.","Unde magni quis.","Corrupti fugiat.","Qui sit numquam a eos molestiae totam."]},"example":["Voluptas expedita repellat iusto quis.","Illum sit et libero labore culpa."]}}}}}},"/v1/presentation":{"post":{"tags":["signer"],"summary":"CreatePresentation signer","description":"CreatePresentation creates VP with proof from raw JSON data.","operationId":"signer#CreatePresentation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePresentationRequest"},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"data":[{"hello":"world"},{"hola":"mundo"}],"group":"Group","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Minus sequi aperiam consequuntur tempora et."},"example":"Delectus cumque voluptatem nihil neque."}}}}}},"/v1/presentation/proof":{"post":{"tags":["signer"],"summary":"PresentationProof signer","description":"PresentationProof adds a proof to a given Verifiable Presentation.","operationId":"signer#PresentationProof","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresentationProofRequest"},"example":{"aud":"http://...","disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","issuer":"Sit explicabo possimus ea accusantium.","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","presentation":"Ut velit.","signatureType":"ed25519signature2020"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"example":"Magni excepturi rerum."},"example":"In consequatur aut."}}}}}},"/v1/presentation/verify":{"post":{"tags":["signer"],"summary":"VerifyPresentation signer","description":"VerifyPresentation verifies the proof of a Verifiable Presentation.","operationId":"signer#VerifyPresentation","parameters":[{"name":"x-format","in":"header","description":"format","allowEmptyValue":true,"schema":{"type":"string","description":"format","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"example":"ldp_vc or dc+sd-jwt"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyPresentationRequest2"},"example":{"aud":"Molestiae eveniet vero est aliquam.","disclosureFrame":["email"],"nonce":"Totam quam.","presentation":"U2l0IGV4ZXJjaXRhdGlvbmVtIGV0IGVsaWdlbmRpIGluY2lkdW50Lg=="}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResult"},"example":{"disclosedCredential":"Consectetur et repellat illum repudiandae aut.","valid":false}}}}}}},"/v1/sign":{"post":{"tags":["signer"],"summary":"Sign signer","description":"Sign creates digital signature on base64 encoded binary data.","operationId":"signer#Sign","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignRequest"},"example":{"data":"Rerum veritatis delectus quis recusandae.","group":"Group","key":"Ratione earum debitis.","namespace":"Hic aut voluptatem."}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignResult"},"example":{"signature":"Est quos possimus sed sit voluptates nihil."}}}},"404":{"description":"Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignResult"},"example":{"signature":"Sunt laudantium nulla."}}}},"500":{"description":"Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignResult"},"example":{"signature":"Ab adipisci odio."}}}}}}},"/v1/verification-methods/{namespace}/{did}":{"get":{"tags":["signer"],"summary":"VerificationMethods signer","description":"VerificationMethods returns all public keys in a given namespace. The result is formatted as array of DID verification methods with their controller attribute being the given DID in the request.","operationId":"signer#VerificationMethods","parameters":[{"name":"namespace","in":"path","description":"Keys namespace.","required":true,"schema":{"type":"string","description":"Keys namespace.","example":"transit"},"example":"transit"},{"name":"did","in":"path","description":"DID controller of the keys.","required":true,"schema":{"type":"string","description":"DID controller of the keys.","example":"did:web:example.com"},"example":"did:web:example.com"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationMethodsRequest2"},"example":{"engine":"transit","group":"Group"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DIDVerificationMethod"},"description":"Array of public keys represented as DID Verification Methods.","example":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]},"example":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}}}}}},"/v1/verification-methods/{namespace}/{key}/{did}":{"get":{"tags":["signer"],"summary":"VerificationMethod signer","description":"VerificationMethod returns a single public key formatted as DID verification method for a given namespace, key and did. When did:jwk is set for did, a did:jwk is generated from the key.","operationId":"signer#VerificationMethod","parameters":[{"name":"namespace","in":"path","description":"Key namespace.","required":true,"schema":{"type":"string","description":"Key namespace.","example":"transit"},"example":"transit"},{"name":"key","in":"path","description":"Name of requested key.","required":true,"schema":{"type":"string","description":"Name of requested key.","example":"key1"},"example":"key1"},{"name":"did","in":"path","description":"DID controller of the key.","required":true,"schema":{"type":"string","description":"DID controller of the key.","example":"did:web:example.com"},"example":"did:web:example.com"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationMethodRequest2"},"example":{"engine":"transit","group":"Group"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DIDVerificationMethod"},"example":{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}}}}}}}},"components":{"schemas":{"CreateCredentialRequest":{"type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Quia libero error."},"description":"Additional JSONLD contexts to be specified in the VC.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"credentialSubject":{"description":"Raw JSON that will be the VC subject.","example":{"hello":"world"}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Inventore sed maiores voluptatem possimus natus nostrum."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Credential.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"status":{"type":"boolean","description":"Append Status","example":true},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"type":{"type":"array","items":{"type":"string","example":"Molestiae quia."},"description":"Type(s) of the credential. Just first one for sd-jwt used.","example":["VerifiableCredential","TestCredential]"]},"x-groupid":{"type":"string","description":"Tenant Group","default":"","example":"group1"},"x-origin":{"type":"string","description":"Origin of call","example":"https://test"},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"credentialSubject":{"hello":"world"},"disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","holder":"urn:3333:ddd","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":true,"statuslisttype":"urn:3333:ddd","type":["VerifiableCredential","TestCredential]"],"x-groupid":"group1","x-origin":"https://test","x-tenantid":"demotenant"},"required":["namespace","key","credentialSubject","x-origin","x-tenantid"]},"CreateCredentialRequest2":{"type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Voluptates sed voluptatum saepe quibusdam ut necessitatibus."},"description":"Additional JSONLD contexts to be specified in the VC.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"credentialSubject":{"description":"Raw JSON that will be the VC subject.","example":{"hello":"world"}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Et doloribus voluptas delectus voluptatem in."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Credential.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"status":{"type":"boolean","description":"Append Status","example":true},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"type":{"type":"array","items":{"type":"string","example":"Architecto cupiditate voluptas ea."},"description":"Type(s) of the credential. Just first one for sd-jwt used.","example":["VerifiableCredential","TestCredential]"]}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"credentialSubject":{"hello":"world"},"disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","holder":"urn:3333:ddd","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":true,"statuslisttype":"urn:3333:ddd","type":["VerifiableCredential","TestCredential]"]},"required":["namespace","key","credentialSubject"]},"CreatePresentationRequest":{"type":"object","properties":{"context":{"type":"array","items":{"type":"string","example":"Hic necessitatibus sequi."},"description":"Additional JSONLD contexts to be specified in the VP.","example":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"]},"data":{"type":"array","items":{"example":"Ut neque quia."},"description":"Raw JSON to be included inside the VP as Verifiable Credential.","example":[{"hello":"world"},{"hola":"mundo"}]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"issuer":{"type":"string","description":"Issuer DID of the Verifiable Presentation.","example":"did:web:example.com"},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature. For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]}},"example":{"context":["https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"data":[{"hello":"world"},{"hola":"mundo"}],"group":"Group","issuer":"did:web:example.com","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020"},"required":["namespace","key","data"]},"CredentialProofRequest":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in JSON format or as sdjwt.","example":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}}},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Hic quasi molestiae reiciendis aut quam illum."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"holder":{"type":"string","description":"Holder Binding","example":"urn:3333:ddd"},"key":{"type":"string","description":"Key to use for the proof signature (optional).","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"signatureType":{"type":"string","description":"Type of signature.For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"status":{"type":"boolean","description":"Status embedded or not","example":false},"statuslisttype":{"type":"string","description":"Statuslist. Ignored when status=false","default":"StatusList2021","example":"urn:3333:ddd"},"x-did":{"type":"string","description":"Did","example":"https://test"},"x-groupid":{"type":"string","description":"Tenant Group","default":"","example":"group1"},"x-origin":{"type":"string","description":"Origin of call","example":"https://test"},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"credential":{"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/security/suites/jws-2020/v1","https://schema.org"],"type":["VerifiableCredential"],"issuer":"did:web:nginx:policy:policy:example:example:1.0:evaluation","issuanceDate":"2010-01-01T19:23:24.651387237Z","credentialSubject":{"name":"Alice","allow":true}},"disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","holder":"urn:3333:ddd","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","signatureType":"ed25519signature2020","status":false,"statuslisttype":"urn:3333:ddd","x-did":"https://test","x-groupid":"group1","x-origin":"https://test","x-tenantid":"demotenant"},"required":["namespace","key","credential","x-tenantid","x-did","x-origin"]},"DIDVerificationMethod":{"type":"object","properties":{"controller":{"type":"string","description":"Controller of verification method specified as DID.","example":"did:web:example.com"},"id":{"type":"string","description":"ID of verification method.","example":"key1"},"publicKeyJwk":{"description":"Public Key encoded in JWK format.","example":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK"},"type":{"type":"string","description":"Type of verification method key.","example":"JsonWebKey2020"}},"example":{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},"required":["id","type","controller","publicKeyJwk"]},"DidConfiguration":{"type":"object","properties":{"x-did":{"type":"string","description":"did for the Configuration","example":"Delectus quis facilis."},"x-group":{"type":"string","description":"Group.","default":"","example":"Group"},"x-groupid":{"type":"string","description":"Tenant Group","example":"group1"},"x-namespace":{"type":"string","description":"Namespace.","example":"Nam nesciunt accusantium facilis ut est labore."},"x-nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"x-origin":{"type":"string","description":"origin for the configuration.","example":"Magnam quidem veniam asperiores."},"x-signatureType":{"type":"string","description":"Type of signature","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"x-did":"Esse ab temporibus.","x-group":"Group","x-groupid":"group1","x-namespace":"Qui quis in laborum.","x-nonce":"3483492392vvv-fff","x-origin":"Aut est aut harum sed eius nisi.","x-signatureType":"ed25519signature2020","x-tenantid":"demotenant"},"required":["x-namespace","x-origin","x-tenantid"]},"DidConfiguration2":{"type":"object","properties":{"x-groupid":{"type":"string","description":"Tenant Group","example":"group1"},"x-signatureType":{"type":"string","description":"Type of signature","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020"]},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"x-groupid":"group1","x-signatureType":"ed25519signature2020","x-tenantid":"demotenant"},"required":["x-tenantid"]},"DidListRequest":{"type":"object","properties":{"x-engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"x-group":{"type":"string","description":"Group.","default":"","example":"Group"},"x-namespace":{"type":"string","description":"Namespace.","example":"Amet molestiae quisquam hic sed."}},"example":{"x-engine":"transit","x-group":"Group","x-namespace":"Quas sit."},"required":["x-namespace"]},"DidListResponse":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/DidListResponseItem"},"description":"did jwk list of keys","example":[{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."},{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."},{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."}]}},"example":{"list":[{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."},{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."},{"did":"Odit ut magnam dicta.","name":"Aut omnis aut."}]},"required":["list"]},"DidListResponseItem":{"type":"object","properties":{"did":{"type":"string","description":"DID JWK of key","example":"Fugiat et."},"name":{"type":"string","description":"name of the key.","example":"Exercitationem esse praesentium nemo occaecati."}},"example":{"did":"Et consequatur expedita magni itaque cum.","name":"Saepe tenetur eveniet."},"required":["name","did"]},"DidRequest":{"type":"object","properties":{"x-did":{"type":"string","description":"did which is used for controller and id","default":"did:web:localhost%3A:8080","example":"exampl:com"},"x-engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"x-group":{"type":"string","description":"Group.","default":"","example":"Group"},"x-namespace":{"type":"string","description":"Namespace.","default":"transit","example":"Quia ratione qui."}},"example":{"x-did":"exampl:com","x-engine":"transit","x-group":"Group","x-namespace":"Omnis voluptatem illo dicta neque in."}},"DidResponse":{"type":"object","properties":{"assertionMethod":{"type":"array","items":{"type":"string","example":"Eligendi nisi voluptatibus voluptatum voluptas vel."},"description":"Verification methods authorized for assertion purposes.","example":["did:web:example.com#key1"]},"context":{"type":"array","items":{"type":"string","example":"Sit eum veritatis."},"description":"JSON-LD @context","example":["https://www.w3.org/ns/did/v1"]},"controller":{"type":"string","description":"controler of the document","example":"Dolorem quos et eius ullam."},"id":{"type":"string","description":"did of the document","example":"Illo magnam et occaecati."},"service":{"type":"array","items":{"$ref":"#/components/schemas/ServiceEndpoint"},"description":"serviceendpoints","example":[{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."},{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."}]},"verificationMethod":{"type":"array","items":{"$ref":"#/components/schemas/DIDVerificationMethod"},"description":"methods of the document","example":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]}},"example":{"assertionMethod":["did:web:example.com#key1"],"context":["https://www.w3.org/ns/did/v1"],"controller":"Rerum est aut a aut asperiores sequi.","id":"Sapiente consequatur ut architecto qui quis.","service":[{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."},{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."},{"id":"Minus ut.","serviceEndpoint":"Iure maxime quasi exercitationem.","type":"Eveniet dolor minima nemo modi placeat."}],"verificationMethod":[{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"},{"controller":"did:web:example.com","id":"key1","publicKeyJwk":"https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK","type":"JsonWebKey2020"}]},"required":["id","controller"]},"HealthResponse":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","example":"Quidem veritatis."},"status":{"type":"string","description":"Status message.","example":"Id voluptatem consectetur dolorem et saepe."},"version":{"type":"string","description":"Service runtime version.","example":"Sint qui repudiandae laudantium."}},"example":{"service":"Assumenda consectetur officia.","status":"Odit sequi commodi odit unde consequatur.","version":"Voluptatem cumque cum id provident."},"required":["service","status","version"]},"JwkPublicKeyRequest":{"type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"key":{"type":"string","description":"Key name.","example":"my-ecdsa-key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"}},"example":{"engine":"transit","group":"Group","key":"my-ecdsa-key1","namespace":"transit"},"required":["namespace","key","group"]},"JwkPublicKeyRequest2":{"type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"},"required":["group"]},"JwksRequest":{"type":"object","properties":{"x-engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"x-group":{"type":"string","description":"Group.","example":"Aut minus omnis quidem."},"x-namespace":{"type":"string","description":"Namespace.","example":"Facere occaecati nulla perspiciatis dolores molestiae quos."}},"example":{"x-engine":"transit","x-group":"Tenetur quia qui.","x-namespace":"Expedita et."},"required":["x-namespace"]},"JwksResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"example":"Illo molestias nihil ex."},"description":"List of jwk","example":["Dicta repellat quis magnam aut quod.","Assumenda nam."]}},"example":{"keys":["Neque dolorum praesentium voluptatum suscipit tempore quia.","Aliquid itaque quaerat.","Magni recusandae aut autem nesciunt eaque ut.","Quo repudiandae voluptatem possimus nisi dolorum nam."]},"required":["keys"]},"NamespaceKeysRequest":{"type":"object","properties":{"namespace":{"type":"string","description":"Namespace for signing keys.","example":"did:web:example.com"},"x-group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"namespace":"did:web:example.com","x-group":"Group"},"required":["namespace"]},"PresentationProofRequest":{"type":"object","properties":{"aud":{"type":"string","description":"audience","example":"http://..."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Dolor id aliquid mollitia in."},"description":"Disclosed Attributes","example":["email"]},"format":{"type":"string","description":"identifies the format of the credential.","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"issuer":{"type":"string","description":"Issuer DID used to specify proof verification info.","example":"Sed ipsam quae earum sunt."},"key":{"type":"string","description":"Key to use for the proof signature.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"},"nonce":{"type":"string","description":"Proof challenge","example":"3483492392vvv-fff"},"presentation":{"description":"Verifiable Presentation in JSON format.","example":"Cum asperiores sapiente."},"signatureType":{"type":"string","description":"Type of signature.For sd-jwt is it automatically selected.","default":"jsonwebsignature2020","example":"ed25519signature2020","enum":["ed25519signature2020","jsonwebsignature2020","sdjwt"]}},"example":{"aud":"http://...","disclosureFrame":["email"],"format":"ldp_vc or dc+sd-jwt","group":"Group","issuer":"Placeat fuga.","key":"key1","namespace":"transit","nonce":"3483492392vvv-fff","presentation":"Non consequatur sunt.","signatureType":"ed25519signature2020"},"required":["namespace","key","presentation"]},"ServiceEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"did of the document","example":"Quibusdam aut."},"serviceEndpoint":{"type":"string","description":"Endpoint URL","example":"Impedit nihil."},"type":{"type":"string","description":"type of endpoint","example":"Ea placeat velit minus praesentium doloribus qui."}},"example":{"id":"Ratione aut delectus illo autem.","serviceEndpoint":"Et et autem commodi beatae labore error.","type":"Tempore aut sed."},"required":["id","type","serviceEndpoint"]},"SignRequest":{"type":"object","properties":{"data":{"type":"string","description":"Data that must be signed, encoded as base64 string.","example":"Sint mollitia."},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"key":{"type":"string","description":"Key to be used for signing.","example":"Eligendi repellat."},"namespace":{"type":"string","description":"Key namespace to be used for signing.","example":"Et qui voluptatem neque aut repudiandae."}},"example":{"data":"Animi non quidem eum veniam.","group":"Group","key":"Reiciendis sunt accusamus hic.","namespace":"Quas magnam dolorem quia."},"required":["namespace","key","data","group"]},"SignResult":{"type":"object","properties":{"signature":{"type":"string","description":"Signature encoded as base64 string.","example":"Facilis numquam adipisci et laudantium."}},"example":{"signature":"Autem inventore exercitationem provident."},"required":["signature"]},"VerificationMethodRequest":{"type":"object","properties":{"did":{"type":"string","description":"DID controller of the key.","example":"did:web:example.com"},"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"key":{"type":"string","description":"Name of requested key.","example":"key1"},"namespace":{"type":"string","description":"Key namespace.","example":"transit"}},"example":{"did":"did:web:example.com","engine":"transit","group":"Group","key":"key1","namespace":"transit"},"required":["namespace","key","did"]},"VerificationMethodRequest2":{"type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"}},"VerificationMethodsRequest":{"type":"object","properties":{"did":{"type":"string","description":"DID controller of the keys.","example":"did:web:example.com"},"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"},"namespace":{"type":"string","description":"Keys namespace.","example":"transit"}},"example":{"did":"did:web:example.com","engine":"transit","group":"Group","namespace":"transit"},"required":["namespace","did"]},"VerificationMethodsRequest2":{"type":"object","properties":{"engine":{"type":"string","description":"Engine which shall be used. Eg transit or transit;kv or kv","default":"transit","example":"transit"},"group":{"type":"string","description":"Group identifies a group of keys within a namespace.","default":"","example":"Group"}},"example":{"engine":"transit","group":"Group"}},"VerifyCredentialRequest":{"type":"object","properties":{"credential":{"type":"string","description":"Verifiable Credential in JSON format.","example":"Tm9uIHZpdGFlIHZlbmlhbSB0b3RhbS4=","format":"binary"},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Repudiandae deleniti ea consequatur voluptatem minima pariatur."},"description":"Disclosed Attributes","example":["email"]},"x-format":{"type":"string","description":"format","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]},"x-group":{"type":"string","description":"Group for status check","example":"Qui voluptatum et."},"x-groupid":{"type":"string","description":"Group","example":"group1"},"x-namespace":{"type":"string","description":"Namespace for status check","example":"Doloremque officia voluptatem aut deserunt quibusdam."},"x-tenantid":{"type":"string","description":"tenantid","example":"demotenant"}},"example":{"credential":"UXVpYSBpbGx1bSBlc3QgdmVsaXQgcXVhbS4=","disclosureFrame":["email"],"x-format":"ldp_vc or dc+sd-jwt","x-group":"Numquam ipsum sed et quia consequatur.","x-groupid":"group1","x-namespace":"Animi ducimus porro qui necessitatibus voluptatum neque.","x-tenantid":"demotenant"},"required":["credential","x-namespace"]},"VerifyCredentialRequest2":{"type":"object","properties":{"credential":{"type":"string","description":"Verifiable Credential in JSON format.","example":"SGFydW0gZWxpZ2VuZGku","format":"binary"},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Numquam rerum nobis repudiandae in."},"description":"Disclosed Attributes","example":["email"]}},"example":{"credential":"UmF0aW9uZSBxdWlhIGFtZXQgcGVyZmVyZW5kaXMgaW1wZWRpdCBtaW5pbWEu","disclosureFrame":["email"]},"required":["credential"]},"VerifyPresentationRequest":{"type":"object","properties":{"aud":{"type":"string","description":"expected audience","example":"Sint est dolor culpa ut voluptatem explicabo."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Voluptas sapiente nisi et est."},"description":"Disclosed Attributes","example":["email"]},"nonce":{"type":"string","description":"expected nonce","example":"Ipsum sit."},"presentation":{"type":"string","description":"Verifiable Presentation in JSON or sdjwt format.","example":"VXQgc2VkIHNlZCBhcmNoaXRlY3RvIHZvbHVwdGF0ZS4=","format":"binary"},"x-format":{"type":"string","description":"format","default":"ldp_vc","example":"ldp_vc or dc+sd-jwt","enum":["ldp_vc","dc+sd-jwt"]}},"example":{"aud":"Eum fuga nihil non sapiente.","disclosureFrame":["email"],"nonce":"Nobis velit cumque voluptas et nobis.","presentation":"T2ZmaWNpYSBvbW5pcyBlc3Qu","x-format":"ldp_vc or dc+sd-jwt"},"required":["presentation"]},"VerifyPresentationRequest2":{"type":"object","properties":{"aud":{"type":"string","description":"expected audience","example":"Voluptatem aut accusamus."},"disclosureFrame":{"type":"array","items":{"type":"string","example":"Provident quo quo voluptates provident."},"description":"Disclosed Attributes","example":["email"]},"nonce":{"type":"string","description":"expected nonce","example":"Aperiam velit doloremque."},"presentation":{"type":"string","description":"Verifiable Presentation in JSON or sdjwt format.","example":"UmVwcmVoZW5kZXJpdCBhbmltaSBxdW8gcmVtIG1hZ25pIGlwc2EgbGFib3J1bS4=","format":"binary"}},"example":{"aud":"Incidunt excepturi vel aliquid est esse.","disclosureFrame":["email"],"nonce":"Soluta enim vitae voluptatibus quos in nulla.","presentation":"T21uaXMgbW9sZXN0aWFlLg=="},"required":["presentation"]},"VerifyResult":{"type":"object","properties":{"disclosedCredential":{"description":"Disclosed Credential","example":"Aperiam similique saepe omnis atque nulla."},"valid":{"type":"boolean","description":"Valid specifies if the proof is successfully verified.","example":true}},"example":{"disclosedCredential":"Exercitationem molestias id nemo quibusdam.","valid":false},"required":["valid"]}}},"tags":[{"name":"health","description":"Health service provides health check endpoints."},{"name":"signer","description":"Signer service makes digital signatures and proofs for verifiable credentials and presentations."}]} \ No newline at end of file diff --git a/gen/http/openapi3.yaml b/gen/http/openapi3.yaml index a12c0d0..0c12803 100644 --- a/gen/http/openapi3.yaml +++ b/gen/http/openapi3.yaml @@ -93,7 +93,7 @@ paths: hello: world disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group holder: urn:3333:ddd issuer: did:web:example.com @@ -112,8 +112,8 @@ paths: content: application/json: schema: - example: Dicta harum amet. - example: Dicta voluptas expedita. + example: Explicabo laborum temporibus rerum aut provident nihil. + example: Est rem. /v1/credential/proof: post: tags: @@ -142,13 +142,14 @@ paths: allow: true disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group holder: urn:3333:ddd key: key1 namespace: transit nonce: 3483492392vvv-fff signatureType: ed25519signature2020 + status: false statuslisttype: urn:3333:ddd x-did: https://test x-groupid: group1 @@ -160,8 +161,8 @@ paths: content: application/json: schema: - example: Vel ipsum consequatur. - example: Maiores earum perspiciatis et voluptas veritatis assumenda. + example: Ad earum. + example: Esse quae explicabo odio vero neque officiis. /v1/credential/verify: post: tags: @@ -178,11 +179,11 @@ paths: type: string description: format default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt - example: ldp_vc or vc+sd-jwt + - dc+sd-jwt + example: ldp_vc or dc+sd-jwt - name: x-namespace in: header description: Namespace for status check @@ -191,8 +192,8 @@ paths: schema: type: string description: Namespace for status check - example: Culpa alias qui ut debitis sequi quo. - example: Enim est rem modi. + example: Animi qui quia natus laudantium et. + example: Veritatis cum. - name: x-group in: header description: Group for status check @@ -200,8 +201,8 @@ paths: schema: type: string description: Group for status check - example: Adipisci ex distinctio quod porro. - example: Dolor esse quae explicabo odio vero. + example: Voluptas alias culpa omnis. + example: Qui ea eum enim numquam tempora. - name: x-tenantid in: header description: tenantid @@ -228,23 +229,41 @@ paths: $ref: '#/components/schemas/VerifyCredentialRequest2' example: credential: - - 69 - - 115 - - 116 - - 32 - - 111 + - 65 - 99 - 99 + - 117 + - 115 - 97 + - 109 + - 117 + - 115 + - 32 - 101 - - 99 - - 97 - - 116 + - 120 + - 32 + - 110 + - 105 + - 104 - 105 + - 108 - 32 + - 105 - 110 + - 118 + - 101 + - 110 + - 116 + - 111 + - 114 + - 101 + - 32 + - 101 - 97 - - 109 + - 32 + - 113 + - 117 + - 105 - 46 disclosureFrame: - email @@ -256,8 +275,8 @@ paths: schema: $ref: '#/components/schemas/VerifyResult' example: - disclosedCredential: Incidunt et repellat cum sit quibusdam. - valid: false + disclosedCredential: Quis fugiat qui quia et. + valid: true /v1/did/configuration: get: tags: @@ -274,8 +293,8 @@ paths: schema: type: string description: Namespace. - example: Quia natus. - example: Et praesentium veritatis. + example: Totam nam consequatur ea nobis est. + example: Deleniti debitis sunt sunt at aut adipisci. - name: x-group in: header description: Group. @@ -294,8 +313,8 @@ paths: schema: type: string description: origin for the configuration. - example: At voluptas. - example: Culpa omnis exercitationem qui ea. + example: Quam quae. + example: Dolores voluptas itaque omnis. - name: x-did in: header description: did for the Configuration @@ -303,8 +322,8 @@ paths: schema: type: string description: did for the Configuration - example: Enim numquam tempora asperiores quis occaecati rerum. - example: Quo laborum et animi exercitationem. + example: Asperiores saepe. + example: Dignissimos amet qui quod minus. - name: x-nonce in: header description: Proof challenge @@ -330,8 +349,8 @@ paths: content: application/json: schema: - example: Ratione quia amet perferendis impedit minima. - example: Nihil quidem in debitis consequatur. + example: Voluptas dolor aperiam unde non veritatis. + example: Rerum sequi. /v1/did/document: get: tags: @@ -347,8 +366,8 @@ paths: type: string description: Namespace. default: transit - example: Officiis consequatur in. - example: Aut iusto est. + example: Quis occaecati rerum et quo laborum. + example: Animi exercitationem. - name: x-group in: header description: Group. @@ -387,20 +406,25 @@ paths: schema: $ref: '#/components/schemas/DidResponse' example: + assertionMethod: + - did:web:example.com#key1 context: - https://www.w3.org/ns/did/v1 - controller: Ut error perspiciatis velit repudiandae voluptatem. - id: Qui rerum. + controller: Rerum ratione voluptatibus asperiores rem tempora. + id: Ut error perspiciatis velit repudiandae voluptatem. service: - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. verificationMethod: - controller: did:web:example.com id: key1 @@ -417,23 +441,25 @@ paths: schema: $ref: '#/components/schemas/DidResponse' example: + assertionMethod: + - did:web:example.com#key1 context: - https://www.w3.org/ns/did/v1 controller: Aperiam odit illo natus. id: Nam accusamus ea dolorem tenetur. service: - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. verificationMethod: - controller: did:web:example.com id: key1 @@ -450,23 +476,25 @@ paths: schema: $ref: '#/components/schemas/DidResponse' example: + assertionMethod: + - did:web:example.com#key1 context: - https://www.w3.org/ns/did/v1 controller: Quia deserunt quidem et. id: Consequuntur tempore occaecati doloremque. service: - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. - - id: Ducimus eum facere enim accusantium. - serviceEndpoint: Suscipit expedita quos eligendi. - type: Sint laudantium rerum neque. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. + - id: Sint laudantium rerum neque. + serviceEndpoint: Qui rerum. + type: Suscipit expedita quos eligendi. verificationMethod: - controller: did:web:example.com id: key1 @@ -495,8 +523,8 @@ paths: schema: type: string description: Namespace. - example: Cumque delectus. - example: Voluptatem nihil neque quia animi. + example: Nihil quidem in debitis consequatur. + example: Qui ut aut facilis sed quaerat doloremque. - name: x-group in: header description: Group. @@ -526,12 +554,12 @@ paths: $ref: '#/components/schemas/DidListResponse' example: list: - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. "404": description: Not Found response. content: @@ -540,12 +568,12 @@ paths: $ref: '#/components/schemas/DidListResponse' example: list: - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. "500": description: Internal Server Error response. content: @@ -554,12 +582,12 @@ paths: $ref: '#/components/schemas/DidListResponse' example: list: - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. - - did: Unde facilis ut similique molestias aperiam quia. - name: Tempora et non aut inventore. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. + - did: Et non. + name: Molestias aperiam. /v1/jwk/{namespace}/{key}: get: tags: @@ -602,24 +630,24 @@ paths: application/json: schema: description: Public key encoded as JSON Web Key. - example: Aut saepe. - example: Quam soluta enim. + example: Harum amet. + example: Ut debitis. "404": description: Not Found response. content: application/json: schema: description: Public key encoded as JSON Web Key. - example: Sed quas beatae ab architecto. - example: Voluptatibus quos in nulla nemo voluptas dolor. + example: Aut minima consequuntur voluptatem ea molestias doloribus. + example: Quo inventore enim est rem modi est. "500": description: Internal Server Error response. content: application/json: schema: description: Public key encoded as JSON Web Key. - example: Omnis iure illo libero. - example: Unde non veritatis perferendis dolorem eligendi recusandae. + example: Exercitationem fugiat doloremque dicta. + example: Ex distinctio quod porro dolorum. /v1/jwks: get: tags: @@ -635,8 +663,8 @@ paths: schema: type: string description: Namespace. - example: Qui ut aut facilis sed quaerat doloremque. - example: Totam nam consequatur ea nobis est. + example: Sit amet libero accusamus ut a ea. + example: Quas et distinctio laboriosam a non laborum. - name: x-group in: header description: Group. @@ -644,8 +672,8 @@ paths: schema: type: string description: Group. - example: Deleniti debitis sunt sunt at aut adipisci. - example: Quam quae. + example: Sint nihil cum praesentium. + example: Expedita quibusdam occaecati. - name: x-engine in: header description: Engine which shall be used. Eg transit or transit;kv or kv @@ -665,9 +693,9 @@ paths: $ref: '#/components/schemas/JwksResponse' example: keys: - - Reprehenderit neque. - - Quia rem at eum. - - Autem in voluptatem magnam. + - Labore quia rem. + - Eum hic autem in. + - Magnam unde provident explicabo numquam culpa eum. "404": description: Not Found response. content: @@ -707,16 +735,15 @@ paths: type: array items: type: string - example: Aut odit nam nesciunt accusantium facilis. + example: Corporis nobis fugiat aperiam soluta necessitatibus illo. description: List of available keys namespaces. example: - - Labore facilis delectus quis. - - Maxime magnam quidem veniam asperiores consectetur. - - Quis in laborum laudantium esse. + - Blanditiis dolores aut saepe sit sed. + - Beatae ab architecto quos. example: - - Animi quo rem. - - Ipsa laborum aut provident quo quo voluptates. - - Illo voluptatem. + - Eligendi recusandae impedit maiores earum perspiciatis et. + - Veritatis assumenda. + - Sapiente optio laudantium nihil minima ut. /v1/namespaces/{namespace}/keys: get: tags: @@ -753,14 +780,16 @@ paths: type: array items: type: string - example: Temporibus error. + example: Iure illo libero recusandae vel ipsum. description: Array of key names in a given namespace. example: - - Aut harum sed eius nisi at corporis. - - Fugiat aperiam soluta necessitatibus illo unde expedita. + - Minima temporibus nobis. + - Unde magni quis. + - Corrupti fugiat. + - Qui sit numquam a eos molestiae totam. example: - - Nihil aperiam velit doloremque ratione. - - Molestiae qui incidunt excepturi vel aliquid. + - Voluptas expedita repellat iusto quis. + - Illum sit et libero labore culpa. /v1/presentation: post: tags: @@ -793,8 +822,8 @@ paths: content: application/json: schema: - example: Aut minima consequuntur voluptatem ea molestias doloribus. - example: Iusto quis qui illum sit et libero. + example: Minus sequi aperiam consequuntur tempora et. + example: Delectus cumque voluptatem nihil neque. /v1/presentation/proof: post: tags: @@ -812,13 +841,13 @@ paths: aud: http://... disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group - issuer: Neque blanditiis nostrum nihil consequuntur est. + issuer: Sit explicabo possimus ea accusantium. key: key1 namespace: transit nonce: 3483492392vvv-fff - presentation: Explicabo possimus ea. + presentation: Ut velit. signatureType: ed25519signature2020 responses: "200": @@ -826,8 +855,8 @@ paths: content: application/json: schema: - example: Minima temporibus nobis. - example: Sapiente optio laudantium nihil minima ut. + example: Magni excepturi rerum. + example: In consequatur aut. /v1/presentation/verify: post: tags: @@ -844,11 +873,11 @@ paths: type: string description: format default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt - example: ldp_vc or vc+sd-jwt + - dc+sd-jwt + example: ldp_vc or dc+sd-jwt requestBody: required: true content: @@ -856,39 +885,50 @@ paths: schema: $ref: '#/components/schemas/VerifyPresentationRequest2' example: - aud: Velit sit exercitationem et eligendi incidunt. + aud: Molestiae eveniet vero est aliquam. disclosureFrame: - email - nonce: Molestiae eveniet vero est aliquam. + nonce: Totam quam. presentation: - - 68 - - 111 - - 108 - - 111 - - 114 - - 101 - - 115 - - 32 - - 113 - - 117 + - 83 - 105 - - 115 + - 116 - 32 - - 102 - - 117 - - 103 + - 101 + - 120 + - 101 + - 114 + - 99 - 105 + - 116 - 97 - 116 + - 105 + - 111 + - 110 + - 101 + - 109 + - 32 + - 101 + - 116 - 32 - - 113 - - 117 + - 101 + - 108 + - 105 + - 103 + - 101 + - 110 + - 100 - 105 - 32 - - 113 - - 117 - 105 - - 97 + - 110 + - 99 + - 105 + - 100 + - 117 + - 110 + - 116 - 46 responses: "200": @@ -898,7 +938,7 @@ paths: schema: $ref: '#/components/schemas/VerifyResult' example: - disclosedCredential: Quam sint voluptates consectetur. + disclosedCredential: Consectetur et repellat illum repudiandae aut. valid: false /v1/sign: post: @@ -914,10 +954,10 @@ paths: schema: $ref: '#/components/schemas/SignRequest' example: - data: Ratione earum debitis. + data: Rerum veritatis delectus quis recusandae. group: Group - key: Dolorum hic aut voluptatem. - namespace: Repellat illum repudiandae. + key: Ratione earum debitis. + namespace: Hic aut voluptatem. responses: "200": description: OK response. @@ -926,7 +966,7 @@ paths: schema: $ref: '#/components/schemas/SignResult' example: - signature: Rerum veritatis delectus quis recusandae. + signature: Est quos possimus sed sit voluptates nihil. "404": description: Not Found response. content: @@ -934,7 +974,7 @@ paths: schema: $ref: '#/components/schemas/SignResult' example: - signature: Provident explicabo numquam culpa eum porro. + signature: Sunt laudantium nulla. "500": description: Internal Server Error response. content: @@ -942,7 +982,7 @@ paths: schema: $ref: '#/components/schemas/SignResult' example: - signature: Laudantium nulla quod ab adipisci odio. + signature: Ab adipisci odio. /v1/verification-methods/{namespace}/{did}: get: tags: @@ -1001,10 +1041,6 @@ paths: id: key1 publicKeyJwk: https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK type: JsonWebKey2020 - - controller: did:web:example.com - id: key1 - publicKeyJwk: https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK - type: JsonWebKey2020 example: - controller: did:web:example.com id: key1 @@ -1087,7 +1123,7 @@ components: type: array items: type: string - example: Quae earum. + example: Quia libero error. description: Additional JSONLD contexts to be specified in the VC. example: - https://w3id.org/security/suites/jws-2020/v1 @@ -1100,7 +1136,7 @@ components: type: array items: type: string - example: Velit dolor id aliquid. + example: Inventore sed maiores voluptatem possimus natus nostrum. description: Disclosed Attributes example: - email @@ -1108,10 +1144,10 @@ components: type: string description: identifies the format of the credential. default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt group: type: string description: Group identifies a group of keys within a namespace. @@ -1158,7 +1194,7 @@ components: type: array items: type: string - example: Dolorum cum asperiores. + example: Molestiae quia. description: Type(s) of the credential. Just first one for sd-jwt used. example: - VerifiableCredential @@ -1184,7 +1220,7 @@ components: hello: world disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group holder: urn:3333:ddd issuer: did:web:example.com @@ -1213,7 +1249,7 @@ components: type: array items: type: string - example: Unde magni quis. + example: Voluptates sed voluptatum saepe quibusdam ut necessitatibus. description: Additional JSONLD contexts to be specified in the VC. example: - https://w3id.org/security/suites/jws-2020/v1 @@ -1226,7 +1262,7 @@ components: type: array items: type: string - example: Qui sit numquam a eos molestiae totam. + example: Et doloribus voluptas delectus voluptatem in. description: Disclosed Attributes example: - email @@ -1234,10 +1270,10 @@ components: type: string description: identifies the format of the credential. default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt group: type: string description: Group identifies a group of keys within a namespace. @@ -1284,7 +1320,7 @@ components: type: array items: type: string - example: Corrupti fugiat. + example: Architecto cupiditate voluptas ea. description: Type(s) of the credential. Just first one for sd-jwt used. example: - VerifiableCredential @@ -1297,7 +1333,7 @@ components: hello: world disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group holder: urn:3333:ddd issuer: did:web:example.com @@ -1321,7 +1357,7 @@ components: type: array items: type: string - example: Cupiditate sunt ipsam sed. + example: Hic necessitatibus sequi. description: Additional JSONLD contexts to be specified in the VP. example: - https://w3id.org/security/suites/jws-2020/v1 @@ -1329,7 +1365,7 @@ components: data: type: array items: - example: Aut quam. + example: Ut neque quia. description: Raw JSON to be included inside the VP as Verifiable Credential. example: - hello: world @@ -1401,7 +1437,7 @@ components: type: array items: type: string - example: Aliquid excepturi explicabo quos veritatis. + example: Hic quasi molestiae reiciendis aut quam illum. description: Disclosed Attributes example: - email @@ -1409,10 +1445,10 @@ components: type: string description: identifies the format of the credential. default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt group: type: string description: Group identifies a group of keys within a namespace. @@ -1442,6 +1478,10 @@ components: enum: - ed25519signature2020 - jsonwebsignature2020 + status: + type: boolean + description: Status embedded or not + example: false statuslisttype: type: string description: Statuslist. Ignored when status=false @@ -1479,13 +1519,14 @@ components: allow: true disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group holder: urn:3333:ddd key: key1 namespace: transit nonce: 3483492392vvv-fff signatureType: ed25519signature2020 + status: false statuslisttype: urn:3333:ddd x-did: https://test x-groupid: group1 @@ -1532,7 +1573,7 @@ components: x-did: type: string description: did for the Configuration - example: Dolorem quos et eius ullam. + example: Delectus quis facilis. x-group: type: string description: Group. @@ -1545,7 +1586,7 @@ components: x-namespace: type: string description: Namespace. - example: Illo magnam et occaecati. + example: Nam nesciunt accusantium facilis ut est labore. x-nonce: type: string description: Proof challenge @@ -1553,7 +1594,7 @@ components: x-origin: type: string description: origin for the configuration. - example: Porro asperiores eligendi nisi voluptatibus voluptatum voluptas. + example: Magnam quidem veniam asperiores. x-signatureType: type: string description: Type of signature @@ -1567,12 +1608,12 @@ components: description: tenantid example: demotenant example: - x-did: Nobis rerum est aut. + x-did: Esse ab temporibus. x-group: Group x-groupid: group1 - x-namespace: Corrupti sapiente consequatur ut architecto qui. + x-namespace: Qui quis in laborum. x-nonce: 3483492392vvv-fff - x-origin: Aut asperiores sequi. + x-origin: Aut est aut harum sed eius nisi. x-signatureType: ed25519signature2020 x-tenantid: demotenant required: @@ -1620,11 +1661,11 @@ components: x-namespace: type: string description: Namespace. - example: Assumenda nam. + example: Amet molestiae quisquam hic sed. example: x-engine: transit x-group: Group - x-namespace: Aut neque dolorum praesentium voluptatum. + x-namespace: Quas sit. required: - x-namespace DidListResponse: @@ -1642,14 +1683,14 @@ components: name: Aut omnis aut. - did: Odit ut magnam dicta. name: Aut omnis aut. - - did: Odit ut magnam dicta. - name: Aut omnis aut. example: list: - did: Odit ut magnam dicta. name: Aut omnis aut. - did: Odit ut magnam dicta. name: Aut omnis aut. + - did: Odit ut magnam dicta. + name: Aut omnis aut. required: - list DidListResponseItem: @@ -1658,14 +1699,14 @@ components: did: type: string description: DID JWK of key - example: Quaerat officia magni recusandae aut autem nesciunt. + example: Fugiat et. name: type: string description: name of the key. - example: Tempore quia voluptatem aliquid. + example: Exercitationem esse praesentium nemo occaecati. example: - did: Repudiandae voluptatem possimus nisi dolorum. - name: Ut omnis. + did: Et consequatur expedita magni itaque cum. + name: Saepe tenetur eveniet. required: - name - did @@ -1691,31 +1732,39 @@ components: type: string description: Namespace. default: transit - example: Quidem veritatis. + example: Quia ratione qui. example: x-did: exampl:com x-engine: transit x-group: Group - x-namespace: Id voluptatem consectetur dolorem et saepe. + x-namespace: Omnis voluptatem illo dicta neque in. DidResponse: type: object properties: + assertionMethod: + type: array + items: + type: string + example: Eligendi nisi voluptatibus voluptatum voluptas vel. + description: Verification methods authorized for assertion purposes. + example: + - did:web:example.com#key1 context: type: array items: type: string - example: Ea placeat velit minus praesentium doloribus qui. + example: Sit eum veritatis. description: JSON-LD @context example: - https://www.w3.org/ns/did/v1 controller: type: string description: controler of the document - example: Ratione aut delectus illo autem. + example: Dolorem quos et eius ullam. id: type: string description: did of the document - example: Impedit nihil. + example: Illo magnam et occaecati. service: type: array items: @@ -1746,11 +1795,17 @@ components: id: key1 publicKeyJwk: https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK type: JsonWebKey2020 + - controller: did:web:example.com + id: key1 + publicKeyJwk: https://openid.net/specs/draft-jones-json-web-key-03.html#ExampleJWK + type: JsonWebKey2020 example: + assertionMethod: + - did:web:example.com#key1 context: - https://www.w3.org/ns/did/v1 - controller: Beatae labore error qui sit. - id: Sed aut et et autem. + controller: Rerum est aut a aut asperiores sequi. + id: Sapiente consequatur ut architecto qui quis. service: - id: Minus ut. serviceEndpoint: Iure maxime quasi exercitationem. @@ -1758,6 +1813,9 @@ components: - id: Minus ut. serviceEndpoint: Iure maxime quasi exercitationem. type: Eveniet dolor minima nemo modi placeat. + - id: Minus ut. + serviceEndpoint: Iure maxime quasi exercitationem. + type: Eveniet dolor minima nemo modi placeat. verificationMethod: - controller: did:web:example.com id: key1 @@ -1776,19 +1834,19 @@ components: service: type: string description: Service name. - example: Sint mollitia. + example: Quidem veritatis. status: type: string description: Status message. - example: Quas magnam dolorem quia. + example: Id voluptatem consectetur dolorem et saepe. version: type: string description: Service runtime version. - example: Reiciendis sunt accusamus hic. + example: Sint qui repudiandae laudantium. example: - service: Animi non quidem eum veniam. - status: Facilis numquam adipisci et laudantium. - version: Autem inventore exercitationem provident. + service: Assumenda consectetur officia. + status: Odit sequi commodi odit unde consequatur. + version: Voluptatem cumque cum id provident. required: - service - status @@ -1852,15 +1910,15 @@ components: x-group: type: string description: Group. - example: Assumenda consectetur officia. + example: Aut minus omnis quidem. x-namespace: type: string description: Namespace. - example: Sint qui repudiandae laudantium. + example: Facere occaecati nulla perspiciatis dolores molestiae quos. example: x-engine: transit - x-group: Voluptatem cumque cum id provident. - x-namespace: Odit sequi commodi odit unde consequatur. + x-group: Tenetur quia qui. + x-namespace: Expedita et. required: - x-namespace JwksResponse: @@ -1869,19 +1927,17 @@ components: keys: type: array items: - example: Quia ratione qui. + example: Illo molestias nihil ex. description: List of jwk example: - - Voluptatem illo. - - Neque in. - - Facere occaecati nulla perspiciatis dolores molestiae quos. - - Aut minus omnis quidem. + - Dicta repellat quis magnam aut quod. + - Assumenda nam. example: keys: - - Et ipsa tenetur. - - Qui sint illo molestias nihil ex. - - Pariatur dicta. - - Quis magnam aut quod. + - Neque dolorum praesentium voluptatum suscipit tempore quia. + - Aliquid itaque quaerat. + - Magni recusandae aut autem nesciunt eaque ut. + - Quo repudiandae voluptatem possimus nisi dolorum nam. required: - keys NamespaceKeysRequest: @@ -1912,7 +1968,7 @@ components: type: array items: type: string - example: Reiciendis consequatur possimus cupiditate temporibus. + example: Dolor id aliquid mollitia in. description: Disclosed Attributes example: - email @@ -1920,10 +1976,10 @@ components: type: string description: identifies the format of the credential. default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt group: type: string description: Group identifies a group of keys within a namespace. @@ -1932,7 +1988,7 @@ components: issuer: type: string description: Issuer DID used to specify proof verification info. - example: Et ut eum maiores quam pariatur. + example: Sed ipsam quae earum sunt. key: type: string description: Key to use for the proof signature. @@ -1947,7 +2003,7 @@ components: example: 3483492392vvv-fff presentation: description: Verifiable Presentation in JSON format. - example: Voluptatibus ipsum ea totam quam aperiam. + example: Cum asperiores sapiente. signatureType: type: string description: Type of signature.For sd-jwt is it automatically selected. @@ -1961,13 +2017,13 @@ components: aud: http://... disclosureFrame: - email - format: ldp_vc or vc+sd-jwt + format: ldp_vc or dc+sd-jwt group: Group - issuer: Consequatur laudantium ipsum fugiat. + issuer: Placeat fuga. key: key1 namespace: transit nonce: 3483492392vvv-fff - presentation: Tempora et ipsa omnis hic quasi molestiae. + presentation: Non consequatur sunt. signatureType: ed25519signature2020 required: - namespace @@ -1979,19 +2035,19 @@ components: id: type: string description: did of the document - example: Molestiae quisquam hic sed id quas. + example: Quibusdam aut. serviceEndpoint: type: string description: Endpoint URL - example: Saepe fugiat et pariatur saepe. + example: Impedit nihil. type: type: string description: type of endpoint - example: Ab exercitationem esse praesentium nemo. + example: Ea placeat velit minus praesentium doloribus qui. example: - id: Eveniet et. - serviceEndpoint: Itaque cum sed tempora dicta quibusdam aut. - type: Consequatur expedita. + id: Ratione aut delectus illo autem. + serviceEndpoint: Et et autem commodi beatae labore error. + type: Tempore aut sed. required: - id - type @@ -2002,7 +2058,7 @@ components: data: type: string description: Data that must be signed, encoded as base64 string. - example: Nobis velit cumque voluptas et nobis. + example: Sint mollitia. group: type: string description: Group identifies a group of keys within a namespace. @@ -2011,16 +2067,16 @@ components: key: type: string description: Key to be used for signing. - example: Eum fuga nihil non sapiente. + example: Eligendi repellat. namespace: type: string description: Key namespace to be used for signing. - example: Officia omnis est. + example: Et qui voluptatem neque aut repudiandae. example: - data: Voluptatem culpa exercitationem molestias id. + data: Animi non quidem eum veniam. group: Group - key: Omnis atque. - namespace: Enim aperiam similique. + key: Reiciendis sunt accusamus hic. + namespace: Quas magnam dolorem quia. required: - namespace - key @@ -2032,9 +2088,9 @@ components: signature: type: string description: Signature encoded as base64 string. - example: Quibusdam quia et. + example: Facilis numquam adipisci et laudantium. example: - signature: Voluptatem neque aut repudiandae praesentium eligendi repellat. + signature: Autem inventore exercitationem provident. required: - signature VerificationMethodRequest: @@ -2140,52 +2196,35 @@ components: type: string description: Verifiable Credential in JSON format. example: - - 73 + - 78 + - 111 - 110 - 32 + - 118 - 105 - - 117 - - 115 - 116 - - 111 - - 32 - - 112 - - 108 - 97 - - 99 - 101 - - 97 - - 116 - - 32 - - 102 - - 117 - - 103 - - 97 - 32 - - 114 - - 101 - - 112 - - 114 - - 101 - - 104 + - 118 - 101 - 110 - - 100 - - 101 - - 114 - 105 - - 116 + - 97 + - 109 - 32 - - 110 + - 116 - 111 - - 110 + - 116 + - 97 + - 109 - 46 format: binary disclosureFrame: type: array items: type: string - example: Quia libero error. + example: Repudiandae deleniti ea consequatur voluptatem minima pariatur. description: Disclosed Attributes example: - email @@ -2193,14 +2232,14 @@ components: type: string description: format default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt x-group: type: string description: Group for status check - example: Neque quia facere hic necessitatibus sequi. + example: Qui voluptatum et. x-groupid: type: string description: Group @@ -2208,34 +2247,45 @@ components: x-namespace: type: string description: Namespace for status check - example: Sunt velit. + example: Doloremque officia voluptatem aut deserunt quibusdam. x-tenantid: type: string description: tenantid example: demotenant example: credential: - - 77 - - 111 + - 81 + - 117 + - 105 + - 97 + - 32 + - 105 + - 108 - 108 + - 117 + - 109 + - 32 - 101 - 115 - 116 - - 105 - - 97 + - 32 + - 118 - 101 + - 108 + - 105 + - 116 - 32 - 113 - 117 - - 105 - 97 + - 109 - 46 disclosureFrame: - email - x-format: ldp_vc or vc+sd-jwt - x-group: Non vitae veniam totam. + x-format: ldp_vc or dc+sd-jwt + x-group: Numquam ipsum sed et quia consequatur. x-groupid: group1 - x-namespace: Inventore sed maiores voluptatem possimus natus nostrum. + x-namespace: Animi ducimus porro qui necessitatibus voluptatum neque. x-tenantid: demotenant required: - credential @@ -2247,77 +2297,76 @@ components: type: string description: Verifiable Credential in JSON format. example: - - 69 - - 120 - - 101 - - 114 - - 99 - - 105 - - 116 + - 72 - 97 - - 116 - - 105 - - 111 - - 110 - - 101 - - 109 - - 32 - - 102 + - 114 - 117 - - 103 - - 105 - - 97 - - 116 + - 109 - 32 - - 100 - - 111 - - 108 - - 111 - - 114 - 101 - - 109 - - 113 - - 117 + - 108 + - 105 + - 103 - 101 - - 32 + - 110 - 100 - 105 - - 99 - - 116 - - 97 - 46 format: binary disclosureFrame: type: array items: type: string - example: Ad earum. + example: Numquam rerum nobis repudiandae in. description: Disclosed Attributes example: - email example: credential: - - 77 + - 82 - 97 - - 103 + - 116 + - 105 + - 111 - 110 + - 101 + - 32 + - 113 + - 117 - 105 + - 97 - 32 + - 97 + - 109 - 101 - - 120 - - 99 - - 101 - - 112 - 116 - - 117 - - 114 - - 105 - 32 + - 112 + - 101 - 114 + - 102 - 101 - 114 - - 117 + - 101 + - 110 + - 100 + - 105 + - 115 + - 32 + - 105 + - 109 + - 112 + - 101 + - 100 + - 105 + - 116 + - 32 + - 109 + - 105 + - 110 + - 105 - 109 + - 97 - 46 disclosureFrame: - email @@ -2329,41 +2378,44 @@ components: aud: type: string description: expected audience - example: Repudiandae deleniti ea consequatur voluptatem minima pariatur. + example: Sint est dolor culpa ut voluptatem explicabo. disclosureFrame: type: array items: type: string - example: Qui voluptatum et. + example: Voluptas sapiente nisi et est. description: Disclosed Attributes example: - email nonce: type: string description: expected nonce - example: Quia illum est velit quam. + example: Ipsum sit. presentation: type: string description: Verifiable Presentation in JSON or sdjwt format. example: - - 68 - - 111 - - 108 - - 111 - - 114 + - 85 + - 116 + - 32 + - 115 - 101 - - 109 - - 113 - - 117 + - 100 + - 32 + - 115 - 101 + - 100 - 32 - - 111 - - 102 - - 102 - - 105 + - 97 + - 114 - 99 + - 104 - 105 - - 97 + - 116 + - 101 + - 99 + - 116 + - 111 - 32 - 118 - 111 @@ -2374,103 +2426,41 @@ components: - 97 - 116 - 101 - - 109 - - 32 - - 97 - - 117 - - 116 - - 32 - - 100 - - 101 - - 115 - - 101 - - 114 - - 117 - - 110 - - 116 - - 32 - - 113 - - 117 - - 105 - - 98 - - 117 - - 115 - - 100 - - 97 - - 109 - 46 format: binary x-format: type: string description: format default: ldp_vc - example: ldp_vc or vc+sd-jwt + example: ldp_vc or dc+sd-jwt enum: - ldp_vc - - vc+sd-jwt + - dc+sd-jwt example: - aud: Numquam ipsum sed et quia consequatur. + aud: Eum fuga nihil non sapiente. disclosureFrame: - email - nonce: Ut sed sed architecto voluptate. + nonce: Nobis velit cumque voluptas et nobis. presentation: - - 65 - - 110 - - 105 - - 109 + - 79 + - 102 + - 102 - 105 - - 32 - - 100 - - 117 - 99 - 105 - - 109 - - 117 - - 115 + - 97 - 32 - - 112 - 111 - - 114 - - 114 - - 111 - - 32 - - 113 - - 117 - - 105 - - 32 + - 109 - 110 - - 101 - - 99 - - 101 - - 115 - - 115 - 105 - - 116 - - 97 - - 116 - - 105 - - 98 - - 117 - 115 - 32 - - 118 - - 111 - - 108 - - 117 - - 112 - - 116 - - 97 - - 116 - - 117 - - 109 - - 32 - - 110 - - 101 - - 113 - - 117 - 101 + - 115 + - 116 - 46 - x-format: ldp_vc or vc+sd-jwt + x-format: ldp_vc or dc+sd-jwt required: - presentation VerifyPresentationRequest2: @@ -2479,133 +2469,92 @@ components: aud: type: string description: expected audience - example: Et doloribus voluptas delectus voluptatem in. + example: Voluptatem aut accusamus. disclosureFrame: type: array items: type: string - example: Architecto cupiditate voluptas ea. + example: Provident quo quo voluptates provident. description: Disclosed Attributes example: - email nonce: type: string description: expected nonce - example: Explicabo laborum temporibus rerum aut provident nihil. + example: Aperiam velit doloremque. presentation: type: string description: Verifiable Presentation in JSON or sdjwt format. example: - - 86 - - 111 - - 108 - - 117 + - 82 + - 101 - 112 - - 116 - - 97 - - 116 + - 114 - 101 - - 115 - - 32 - - 115 + - 104 - 101 + - 110 - 100 - - 32 - - 118 - - 111 - - 108 - - 117 - - 112 + - 101 + - 114 + - 105 - 116 + - 32 - 97 - - 116 + - 110 + - 105 + - 109 + - 105 + - 32 + - 113 - 117 + - 111 + - 32 + - 114 + - 101 - 109 - 32 - - 115 + - 109 - 97 - - 101 - - 112 - - 101 + - 103 + - 110 + - 105 - 32 - - 113 - - 117 - 105 - - 98 - - 117 + - 112 - 115 - - 100 - 97 - - 109 - - 32 - - 117 - - 116 - 32 - - 110 - - 101 - - 99 - - 101 - - 115 - - 115 - - 105 - - 116 + - 108 - 97 - - 116 - - 105 - 98 + - 111 + - 114 - 117 - - 115 + - 109 - 46 format: binary example: - aud: Harum eligendi. + aud: Incidunt excepturi vel aliquid est esse. disclosureFrame: - email - nonce: Numquam rerum nobis repudiandae in. + nonce: Soluta enim vitae voluptatibus quos in nulla. presentation: - - 77 - - 105 + - 79 + - 109 - 110 - - 117 - - 115 - - 32 - - 115 - - 101 - - 113 - - 117 - 105 + - 115 - 32 - - 97 - - 112 - - 101 - - 114 - - 105 - - 97 - 109 - - 32 - - 99 - 111 - - 110 - - 115 + - 108 - 101 - - 113 - - 117 - - 117 - - 110 - - 116 - - 117 - - 114 - - 32 + - 115 - 116 - - 101 - - 109 - - 112 - - 111 - - 114 + - 105 - 97 - - 32 - 101 - - 116 - 46 required: - presentation @@ -2614,13 +2563,13 @@ components: properties: disclosedCredential: description: Disclosed Credential - example: Sapiente nisi et est sint sint. + example: Aperiam similique saepe omnis atque nulla. valid: type: boolean description: Valid specifies if the proof is successfully verified. example: true example: - disclosedCredential: Culpa ut voluptatem explicabo commodi ipsum sit. + disclosedCredential: Exercitationem molestias id nemo quibusdam. valid: false required: - valid diff --git a/gen/http/signer/client/cli.go b/gen/http/signer/client/cli.go index f955fd7..b80a9f4 100644 --- a/gen/http/signer/client/cli.go +++ b/gen/http/signer/client/cli.go @@ -165,13 +165,13 @@ func BuildCredentialProofPayload(signerCredentialProofBody string) (*signer.Cred { err = json.Unmarshal([]byte(signerCredentialProofBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"credential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/security/suites/jws-2020/v1\",\n \"https://schema.org\"\n ],\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"issuer\": \"did:web:nginx:policy:policy:example:example:1.0:evaluation\",\n \"issuanceDate\": \"2010-01-01T19:23:24.651387237Z\",\n \"credentialSubject\": {\n \"name\": \"Alice\",\n \"allow\": true\n }\n },\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or vc+sd-jwt\",\n \"group\": \"Group\",\n \"holder\": \"urn:3333:ddd\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"signatureType\": \"ed25519signature2020\",\n \"statuslisttype\": \"urn:3333:ddd\",\n \"x-did\": \"https://test\",\n \"x-groupid\": \"group1\",\n \"x-origin\": \"https://test\",\n \"x-tenantid\": \"demotenant\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"credential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/security/suites/jws-2020/v1\",\n \"https://schema.org\"\n ],\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"issuer\": \"did:web:nginx:policy:policy:example:example:1.0:evaluation\",\n \"issuanceDate\": \"2010-01-01T19:23:24.651387237Z\",\n \"credentialSubject\": {\n \"name\": \"Alice\",\n \"allow\": true\n }\n },\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or dc+sd-jwt\",\n \"group\": \"Group\",\n \"holder\": \"urn:3333:ddd\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"signatureType\": \"ed25519signature2020\",\n \"status\": false,\n \"statuslisttype\": \"urn:3333:ddd\",\n \"x-did\": \"https://test\",\n \"x-groupid\": \"group1\",\n \"x-origin\": \"https://test\",\n \"x-tenantid\": \"demotenant\"\n }'") } if body.Credential == nil { err = goa.MergeErrors(err, goa.MissingFieldError("credential", "body")) } - if !(body.Format == "ldp_vc" || body.Format == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", body.Format, []any{"ldp_vc", "vc+sd-jwt"})) + if !(body.Format == "ldp_vc" || body.Format == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", body.Format, []any{"ldp_vc", "dc+sd-jwt"})) } if !(body.SignatureType == "ed25519signature2020" || body.SignatureType == "jsonwebsignature2020") { err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.signatureType", body.SignatureType, []any{"ed25519signature2020", "jsonwebsignature2020"})) @@ -194,6 +194,7 @@ func BuildCredentialProofPayload(signerCredentialProofBody string) (*signer.Cred Statuslisttype: body.Statuslisttype, XOrigin: body.XOrigin, XDid: body.XDid, + Status: body.Status, } { var zero string @@ -243,7 +244,7 @@ func BuildPresentationProofPayload(signerPresentationProofBody string) (*signer. { err = json.Unmarshal([]byte(signerPresentationProofBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"aud\": \"http://...\",\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or vc+sd-jwt\",\n \"group\": \"Group\",\n \"issuer\": \"Neque blanditiis nostrum nihil consequuntur est.\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"presentation\": \"Explicabo possimus ea.\",\n \"signatureType\": \"ed25519signature2020\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"aud\": \"http://...\",\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or dc+sd-jwt\",\n \"group\": \"Group\",\n \"issuer\": \"Sit explicabo possimus ea accusantium.\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"presentation\": \"Ut velit.\",\n \"signatureType\": \"ed25519signature2020\"\n }'") } if body.Presentation == nil { err = goa.MergeErrors(err, goa.MissingFieldError("presentation", "body")) @@ -251,8 +252,8 @@ func BuildPresentationProofPayload(signerPresentationProofBody string) (*signer. if !(body.SignatureType == "ed25519signature2020" || body.SignatureType == "jsonwebsignature2020" || body.SignatureType == "sdjwt") { err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.signatureType", body.SignatureType, []any{"ed25519signature2020", "jsonwebsignature2020", "sdjwt"})) } - if !(body.Format == "ldp_vc" || body.Format == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", body.Format, []any{"ldp_vc", "vc+sd-jwt"})) + if !(body.Format == "ldp_vc" || body.Format == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", body.Format, []any{"ldp_vc", "dc+sd-jwt"})) } if err != nil { return nil, err @@ -305,13 +306,13 @@ func BuildCreateCredentialPayload(signerCreateCredentialBody string, signerCreat { err = json.Unmarshal([]byte(signerCreateCredentialBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"context\": [\n \"https://w3id.org/security/suites/jws-2020/v1\",\n \"https://schema.org\"\n ],\n \"credentialSubject\": {\n \"hello\": \"world\"\n },\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or vc+sd-jwt\",\n \"group\": \"Group\",\n \"holder\": \"urn:3333:ddd\",\n \"issuer\": \"did:web:example.com\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"signatureType\": \"ed25519signature2020\",\n \"status\": true,\n \"statuslisttype\": \"urn:3333:ddd\",\n \"type\": [\n \"VerifiableCredential\",\n \"TestCredential]\"\n ]\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"context\": [\n \"https://w3id.org/security/suites/jws-2020/v1\",\n \"https://schema.org\"\n ],\n \"credentialSubject\": {\n \"hello\": \"world\"\n },\n \"disclosureFrame\": [\n \"email\"\n ],\n \"format\": \"ldp_vc or dc+sd-jwt\",\n \"group\": \"Group\",\n \"holder\": \"urn:3333:ddd\",\n \"issuer\": \"did:web:example.com\",\n \"key\": \"key1\",\n \"namespace\": \"transit\",\n \"nonce\": \"3483492392vvv-fff\",\n \"signatureType\": \"ed25519signature2020\",\n \"status\": true,\n \"statuslisttype\": \"urn:3333:ddd\",\n \"type\": [\n \"VerifiableCredential\",\n \"TestCredential]\"\n ]\n }'") } if body.CredentialSubject == nil { err = goa.MergeErrors(err, goa.MissingFieldError("credentialSubject", "body")) } - if !(body.Format == "ldp_vc" || body.Format == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", body.Format, []any{"ldp_vc", "vc+sd-jwt"})) + if !(body.Format == "ldp_vc" || body.Format == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", body.Format, []any{"ldp_vc", "dc+sd-jwt"})) } if !(body.SignatureType == "ed25519signature2020" || body.SignatureType == "jsonwebsignature2020") { err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.signatureType", body.SignatureType, []any{"ed25519signature2020", "jsonwebsignature2020"})) @@ -462,7 +463,7 @@ func BuildVerifyCredentialPayload(signerVerifyCredentialBody string, signerVerif { err = json.Unmarshal([]byte(signerVerifyCredentialBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"credential\": \"RXN0IG9jY2FlY2F0aSBuYW0u\",\n \"disclosureFrame\": [\n \"email\"\n ]\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"credential\": \"QWNjdXNhbXVzIGV4IG5paGlsIGludmVudG9yZSBlYSBxdWku\",\n \"disclosureFrame\": [\n \"email\"\n ]\n }'") } if body.Credential == nil { err = goa.MergeErrors(err, goa.MissingFieldError("credential", "body")) @@ -475,8 +476,8 @@ func BuildVerifyCredentialPayload(signerVerifyCredentialBody string, signerVerif { if signerVerifyCredentialXFormat != "" { xFormat = signerVerifyCredentialXFormat - if !(xFormat == "ldp_vc" || xFormat == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("x-format", xFormat, []any{"ldp_vc", "vc+sd-jwt"})) + if !(xFormat == "ldp_vc" || xFormat == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("x-format", xFormat, []any{"ldp_vc", "dc+sd-jwt"})) } if err != nil { return nil, err @@ -531,7 +532,7 @@ func BuildVerifyPresentationPayload(signerVerifyPresentationBody string, signerV { err = json.Unmarshal([]byte(signerVerifyPresentationBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"aud\": \"Velit sit exercitationem et eligendi incidunt.\",\n \"disclosureFrame\": [\n \"email\"\n ],\n \"nonce\": \"Molestiae eveniet vero est aliquam.\",\n \"presentation\": \"RG9sb3JlcyBxdWlzIGZ1Z2lhdCBxdWkgcXVpYS4=\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"aud\": \"Molestiae eveniet vero est aliquam.\",\n \"disclosureFrame\": [\n \"email\"\n ],\n \"nonce\": \"Totam quam.\",\n \"presentation\": \"U2l0IGV4ZXJjaXRhdGlvbmVtIGV0IGVsaWdlbmRpIGluY2lkdW50Lg==\"\n }'") } if body.Presentation == nil { err = goa.MergeErrors(err, goa.MissingFieldError("presentation", "body")) @@ -544,8 +545,8 @@ func BuildVerifyPresentationPayload(signerVerifyPresentationBody string, signerV { if signerVerifyPresentationXFormat != "" { xFormat = signerVerifyPresentationXFormat - if !(xFormat == "ldp_vc" || xFormat == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("x-format", xFormat, []any{"ldp_vc", "vc+sd-jwt"})) + if !(xFormat == "ldp_vc" || xFormat == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("x-format", xFormat, []any{"ldp_vc", "dc+sd-jwt"})) } if err != nil { return nil, err @@ -576,7 +577,7 @@ func BuildSignPayload(signerSignBody string) (*signer.SignRequest, error) { { err = json.Unmarshal([]byte(signerSignBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"data\": \"Ratione earum debitis.\",\n \"group\": \"Group\",\n \"key\": \"Dolorum hic aut voluptatem.\",\n \"namespace\": \"Repellat illum repudiandae.\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"data\": \"Rerum veritatis delectus quis recusandae.\",\n \"group\": \"Group\",\n \"key\": \"Ratione earum debitis.\",\n \"namespace\": \"Hic aut voluptatem.\"\n }'") } } v := &signer.SignRequest{ diff --git a/gen/http/signer/client/types.go b/gen/http/signer/client/types.go index 62a34b2..e9e024b 100644 --- a/gen/http/signer/client/types.go +++ b/gen/http/signer/client/types.go @@ -70,6 +70,8 @@ type CredentialProofRequestBody struct { XOrigin string `form:"x-origin" json:"x-origin" xml:"x-origin"` // Did XDid string `form:"x-did" json:"x-did" xml:"x-did"` + // Status embedded or not + Status *bool `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` } // PresentationProofRequestBody is the type of the "signer" service @@ -248,6 +250,8 @@ type DidDocOKResponseBody struct { VerificationMethod []*DIDVerificationMethodResponseBody `form:"verificationMethod,omitempty" json:"verificationMethod,omitempty" xml:"verificationMethod,omitempty"` // serviceendpoints Service []*ServiceEndpointResponseBody `form:"service,omitempty" json:"service,omitempty" xml:"service,omitempty"` + // Verification methods authorized for assertion purposes. + AssertionMethod []string `form:"assertionMethod,omitempty" json:"assertionMethod,omitempty" xml:"assertionMethod,omitempty"` } // DidListOKResponseBody is the type of the "signer" service "didList" endpoint @@ -325,6 +329,8 @@ type DidDocNotFoundResponseBody struct { VerificationMethod []*DIDVerificationMethodResponseBody `form:"verificationMethod,omitempty" json:"verificationMethod,omitempty" xml:"verificationMethod,omitempty"` // serviceendpoints Service []*ServiceEndpointResponseBody `form:"service,omitempty" json:"service,omitempty" xml:"service,omitempty"` + // Verification methods authorized for assertion purposes. + AssertionMethod []string `form:"assertionMethod,omitempty" json:"assertionMethod,omitempty" xml:"assertionMethod,omitempty"` } // DidDocInternalServerErrorResponseBody is used to define fields on response @@ -340,6 +346,8 @@ type DidDocInternalServerErrorResponseBody struct { VerificationMethod []*DIDVerificationMethodResponseBody `form:"verificationMethod,omitempty" json:"verificationMethod,omitempty" xml:"verificationMethod,omitempty"` // serviceendpoints Service []*ServiceEndpointResponseBody `form:"service,omitempty" json:"service,omitempty" xml:"service,omitempty"` + // Verification methods authorized for assertion purposes. + AssertionMethod []string `form:"assertionMethod,omitempty" json:"assertionMethod,omitempty" xml:"assertionMethod,omitempty"` } // DidListResponseItemResponseBody is used to define fields on response body @@ -454,6 +462,7 @@ func NewCredentialProofRequestBody(p *signer.CredentialProofRequest) *Credential Statuslisttype: p.Statuslisttype, XOrigin: p.XOrigin, XDid: p.XDid, + Status: p.Status, } { var zero string @@ -790,6 +799,12 @@ func NewDidDocDidResponseOK(body *DidDocOKResponseBody) *signer.DidResponse { v.Service[i] = unmarshalServiceEndpointResponseBodyToSignerServiceEndpoint(val) } } + if body.AssertionMethod != nil { + v.AssertionMethod = make([]string, len(body.AssertionMethod)) + for i, val := range body.AssertionMethod { + v.AssertionMethod[i] = val + } + } return v } diff --git a/gen/http/signer/server/encode_decode.go b/gen/http/signer/server/encode_decode.go index 90fa0de..9d67ba5 100644 --- a/gen/http/signer/server/encode_decode.go +++ b/gen/http/signer/server/encode_decode.go @@ -450,8 +450,8 @@ func DecodeVerifyCredentialRequest(mux goahttp.Muxer, decoder func(*http.Request } else { xFormat = "ldp_vc" } - if !(xFormat == "ldp_vc" || xFormat == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("x-format", xFormat, []any{"ldp_vc", "vc+sd-jwt"})) + if !(xFormat == "ldp_vc" || xFormat == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("x-format", xFormat, []any{"ldp_vc", "dc+sd-jwt"})) } xNamespace = r.Header.Get("x-namespace") if xNamespace == "" { @@ -524,8 +524,8 @@ func DecodeVerifyPresentationRequest(mux goahttp.Muxer, decoder func(*http.Reque } else { xFormat = "ldp_vc" } - if !(xFormat == "ldp_vc" || xFormat == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("x-format", xFormat, []any{"ldp_vc", "vc+sd-jwt"})) + if !(xFormat == "ldp_vc" || xFormat == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("x-format", xFormat, []any{"ldp_vc", "dc+sd-jwt"})) } if err != nil { return payload, err diff --git a/gen/http/signer/server/types.go b/gen/http/signer/server/types.go index 7782f9c..4eda69c 100644 --- a/gen/http/signer/server/types.go +++ b/gen/http/signer/server/types.go @@ -70,6 +70,8 @@ type CredentialProofRequestBody struct { XOrigin *string `form:"x-origin,omitempty" json:"x-origin,omitempty" xml:"x-origin,omitempty"` // Did XDid *string `form:"x-did,omitempty" json:"x-did,omitempty" xml:"x-did,omitempty"` + // Status embedded or not + Status *bool `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` } // PresentationProofRequestBody is the type of the "signer" service @@ -252,6 +254,8 @@ type DidDocOKResponseBody struct { VerificationMethod []*DIDVerificationMethodResponseBody `form:"verificationMethod,omitempty" json:"verificationMethod,omitempty" xml:"verificationMethod,omitempty"` // serviceendpoints Service []*ServiceEndpointResponseBody `form:"service,omitempty" json:"service,omitempty" xml:"service,omitempty"` + // Verification methods authorized for assertion purposes. + AssertionMethod []string `form:"assertionMethod,omitempty" json:"assertionMethod,omitempty" xml:"assertionMethod,omitempty"` } // DidListOKResponseBody is the type of the "signer" service "didList" endpoint @@ -401,6 +405,12 @@ func NewDidDocOKResponseBody(res *signer.DidResponse) *DidDocOKResponseBody { body.Service[i] = marshalSignerServiceEndpointToServiceEndpointResponseBody(val) } } + if res.AssertionMethod != nil { + body.AssertionMethod = make([]string, len(res.AssertionMethod)) + for i, val := range res.AssertionMethod { + body.AssertionMethod[i] = val + } + } return body } @@ -522,6 +532,7 @@ func NewCredentialProofRequest(body *CredentialProofRequestBody) *signer.Credent Holder: body.Holder, XOrigin: *body.XOrigin, XDid: *body.XDid, + Status: body.Status, } if body.Group != nil { v.Group = *body.Group @@ -834,8 +845,8 @@ func ValidateCredentialProofRequestBody(body *CredentialProofRequestBody) (err e err = goa.MergeErrors(err, goa.MissingFieldError("x-origin", "body")) } if body.Format != nil { - if !(*body.Format == "ldp_vc" || *body.Format == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", *body.Format, []any{"ldp_vc", "vc+sd-jwt"})) + if !(*body.Format == "ldp_vc" || *body.Format == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", *body.Format, []any{"ldp_vc", "dc+sd-jwt"})) } } if body.SignatureType != nil { @@ -864,8 +875,8 @@ func ValidatePresentationProofRequestBody(body *PresentationProofRequestBody) (e } } if body.Format != nil { - if !(*body.Format == "ldp_vc" || *body.Format == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", *body.Format, []any{"ldp_vc", "vc+sd-jwt"})) + if !(*body.Format == "ldp_vc" || *body.Format == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", *body.Format, []any{"ldp_vc", "dc+sd-jwt"})) } } return @@ -884,8 +895,8 @@ func ValidateCreateCredentialRequestBody(body *CreateCredentialRequestBody) (err err = goa.MergeErrors(err, goa.MissingFieldError("credentialSubject", "body")) } if body.Format != nil { - if !(*body.Format == "ldp_vc" || *body.Format == "vc+sd-jwt") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", *body.Format, []any{"ldp_vc", "vc+sd-jwt"})) + if !(*body.Format == "ldp_vc" || *body.Format == "dc+sd-jwt") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("body.format", *body.Format, []any{"ldp_vc", "dc+sd-jwt"})) } } if body.SignatureType != nil { diff --git a/gen/signer/service.go b/gen/signer/service.go index 9424d62..72ac0f6 100644 --- a/gen/signer/service.go +++ b/gen/signer/service.go @@ -160,6 +160,8 @@ type CredentialProofRequest struct { XOrigin string // Did XDid string + // Status embedded or not + Status *bool } // Public Key represented as DID Verification Method. @@ -242,6 +244,8 @@ type DidResponse struct { VerificationMethod []*DIDVerificationMethod // serviceendpoints Service []*ServiceEndpoint + // Verification methods authorized for assertion purposes. + AssertionMethod []string } // JwkPublicKeyRequest is the payload type of the signer service JwkPublicKey diff --git a/go.mod b/go.mod index b4184c5..0b6541e 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,12 @@ module github.com/eclipse-xfsc/crypto-provider-service/v2 go 1.25.0 require ( + github.com/bytedance/gopkg v0.1.4 github.com/cloudevents/sdk-go/v2 v2.15.2 github.com/eclipse-xfsc/cloud-event-provider v0.1.5 github.com/eclipse-xfsc/crypto-provider-core/v2 v2.3.0 - github.com/eclipse-xfsc/crypto-provider-service v1.1.6 github.com/eclipse-xfsc/microservice-core-go v1.1.1 - github.com/eclipse-xfsc/nats-message-library v1.4.3 + github.com/eclipse-xfsc/nats-message-library v1.5.0 github.com/eclipse-xfsc/ssi-jwt/v2 v2.2.0 github.com/eclipse-xfsc/train-trusted-content-resolver/clients/go v1.0.0 github.com/google/uuid v1.6.0 @@ -47,22 +47,18 @@ require ( github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/eclipse-xfsc/did-core/v2 v2.1.0 // indirect - github.com/eclipse-xfsc/oid4-vci-vp-library v1.6.5 // indirect + github.com/eclipse-xfsc/oid4-vci-vp-library v1.8.1 // indirect github.com/eclipse/paho.golang v0.12.0 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/getkin/kin-openapi v0.133.0 // indirect github.com/go-chi/chi/v5 v5.3.0 // indirect github.com/go-jose/go-jose/v3 v3.0.3 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.21.1 // indirect - github.com/go-openapi/swag v0.23.1 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/goccy/go-json v0.10.5 // indirect github.com/gohugoio/hashstructure v0.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/go-cmp v0.7.0 // indirect github.com/google/tink/go v1.7.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -77,18 +73,14 @@ require ( github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kilic/bls12-381 v0.1.1-0.20210503002446-7b7597926c69 // indirect github.com/klauspost/compress v1.17.8 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect github.com/lestrrat-go/blackmagic v1.0.4 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect github.com/lestrrat-go/httprc v1.0.6 // indirect github.com/lestrrat-go/iter v1.0.2 // indirect github.com/lestrrat-go/option v1.0.1 // indirect - github.com/mailru/easyjson v0.9.0 // indirect github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect @@ -96,7 +88,6 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.1.0 // indirect @@ -106,10 +97,7 @@ require ( github.com/nats-io/nats.go v1.35.0 // indirect github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect - github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect - github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect - github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -129,8 +117,6 @@ require ( github.com/spf13/viper v1.21.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8 // indirect - github.com/ugorji/go/codec v1.2.12 // indirect - github.com/woodsbury/decimal128 v1.3.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect @@ -144,6 +130,5 @@ require ( golang.org/x/tools v0.45.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect google.golang.org/protobuf v1.36.11 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 9fc2df7..d28a1fc 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,8 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bytedance/gopkg v0.1.4 h1:oZnQwnX82KAIWb7033bEwtxvTqXcYMxDBaQxo5JJHWM= +github.com/bytedance/gopkg v0.1.4/go.mod h1:v1zWfPm21Fb+OsyXN2VAHdL6TBb2L88anLQgdyje6R4= github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= @@ -62,7 +64,6 @@ github.com/cloudevents/sdk-go/v2 v2.15.2 h1:54+I5xQEnI73RBhWHxbI1XJcqOFOVJN85vb4 github.com/cloudevents/sdk-go/v2 v2.15.2/go.mod h1:lL7kSWAE/V8VI4Wh0jbL2v/jvqsm6tjmaQBSvxcv4uE= github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2/go.mod h1:qwXFYgsP6T7XnJtbKlf1HP8AjxZZyzxMmc+Lq5GjlU4= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -75,7 +76,6 @@ github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZsmLR/+RGffQSXwEkXgfLSA08qDn9AI= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= -github.com/dimfeld/httptreemux/v5 v5.5.0/go.mod h1:QeEylH57C0v3VO0tkKraVz9oD3Uu93CKPnTLbsidvSw= github.com/eapache/go-resiliency v1.6.0 h1:CqGDTLtpwuWKn6Nj3uNUdflaq+/kIPsg0gfNzHton30= github.com/eapache/go-resiliency v1.6.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= @@ -87,16 +87,18 @@ github.com/eclipse-xfsc/cloud-event-provider v0.1.5/go.mod h1:jVuAEKC3wIzB1yQci7 github.com/eclipse-xfsc/crypto-provider-core v1.4.1/go.mod h1:dkIbKR46k3rwBY85gpgLbElrd/7/S78oKH8D/E1Rl+4= github.com/eclipse-xfsc/crypto-provider-core/v2 v2.3.0 h1:FtYtDREOzD2kkDiV2H4eP3ooKCniA9XbM/drpYfq2vM= github.com/eclipse-xfsc/crypto-provider-core/v2 v2.3.0/go.mod h1:hGNyvd79fLlKlN10VsturS7zHEGyHTpYLMSvIdL8ZoQ= -github.com/eclipse-xfsc/crypto-provider-service v1.1.6 h1:NxmZds7ojtKbnaEtsR/DVfUukhPO1Zx+3ruhb4JPy9o= -github.com/eclipse-xfsc/crypto-provider-service v1.1.6/go.mod h1:102kHvz3tw3aqBe1ACSC7KFO3GR0KZS0DFCeFZyEekQ= github.com/eclipse-xfsc/did-core/v2 v2.1.0 h1:56fifKCHqw2WrCxBC3PERRh0Qqv+rd9gg+9QRYADnDU= github.com/eclipse-xfsc/did-core/v2 v2.1.0/go.mod h1:JvGH0Au3l53zPJ4ear8OOVuInjeJ/G+olYyLQAj5g/c= github.com/eclipse-xfsc/microservice-core-go v1.1.1 h1:G3PEu2N+/I9ije1gnPEUkOr27s8m3+18qtrVJLrBdMw= github.com/eclipse-xfsc/microservice-core-go v1.1.1/go.mod h1:YRLyt66TYC1Km40w6oagYrXjrMCyI1tym2wGEgWQ9pI= github.com/eclipse-xfsc/nats-message-library v1.4.3 h1:htNoUcMO7riwtjujBgH9xI4JmhYYTpc1FjNFz+xacN0= github.com/eclipse-xfsc/nats-message-library v1.4.3/go.mod h1:1wRcQ7pBzscQLfwYy25TM8yeCNGO+2u6NFkmKZYEd5g= +github.com/eclipse-xfsc/nats-message-library v1.5.0 h1:lazecSf2LLBw9HTVUUkaC6jghIGoRvg9JFxcMoJOdTo= +github.com/eclipse-xfsc/nats-message-library v1.5.0/go.mod h1:vOqJUxJnd3K2iP++cO3erFUIl7z6XGUn2gvHlaJ8wkM= github.com/eclipse-xfsc/oid4-vci-vp-library v1.6.5 h1:MpOhZo7rXOIUTmXBYg2JYL4Qkogv3Uzc0x0QpBkA08I= github.com/eclipse-xfsc/oid4-vci-vp-library v1.6.5/go.mod h1:0SLW2+MoLNnK0XaUGJlWxrzQbkWVDLHwxKALqm3LPCk= +github.com/eclipse-xfsc/oid4-vci-vp-library v1.8.1 h1:gME6SDK5iFFrPVxa86YrxLQJYcZHt1VD9yT7g8mcm+w= +github.com/eclipse-xfsc/oid4-vci-vp-library v1.8.1/go.mod h1:z3IaBHrKd+ku3eDMDSMSpWLsLNJY/Qn1kZgZE88uC60= github.com/eclipse-xfsc/ssi-jwt/v2 v2.2.0 h1:JDsx/iPimPGWnBy1qvVDc2vvWmyS/yY0Fo4X+lbAYA4= github.com/eclipse-xfsc/ssi-jwt/v2 v2.2.0/go.mod h1:AanSJ720LclsvKfLgB5U4LnnIAAAMAcI949ILddY3EA= github.com/eclipse-xfsc/train-trusted-content-resolver/clients/go v1.0.0 h1:6YvyacVYw8d/2GC73cJS0Q5Z5BUKY6nVcAwGDJpiL9w= @@ -116,7 +118,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= -github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= @@ -133,16 +134,13 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= -github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU= github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= @@ -170,8 +168,7 @@ github.com/google/tink/go v1.7.0/go.mod h1:GAUOd+QE3pgj9q8VKIGTCP33c/B7eb4NhxLcg github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/gopherjs/gopherjs v1.12.80/go.mod h1:d55Q4EjGQHeJVms+9LGtXul6ykz5Xzx1E1gaXQXdimY= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= @@ -237,13 +234,11 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a h1:zPPuIq2jAWWPTrGt70eK/BSch+gFAGrNzecsoENgu2o= github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kawamuray/jsonpath v0.0.0-20201211160320-7483bafabd7e h1:Eh/0JuXDdcBHc39j4tFXKTy/AKiK7IQkGJXQxyryXiU= github.com/kawamuray/jsonpath v0.0.0-20201211160320-7483bafabd7e/go.mod h1:dz00yqWNWlKa9ff7RJzpnHPAPUazsid3yhVzXcsok94= @@ -255,11 +250,8 @@ github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6 github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= @@ -279,7 +271,6 @@ github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/madflojo/tasks v1.2.1/go.mod h1:/WMv6u3Xb5eyy+aIM76ildaIT166GOxN/jya9oI7dyo= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqCDBcAhLXoi3TzC27Zad/Vn+gnVQ= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s= @@ -305,7 +296,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= @@ -328,9 +318,7 @@ github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDm github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4= @@ -340,14 +328,12 @@ github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/piprate/json-gold v0.5.0 h1:RmGh1PYboCFcchVFuh2pbSWAZy4XJaqTMU4KQYsApbM= github.com/piprate/json-gold v0.5.0/go.mod h1:WZ501QQMbZZ+3pXFPhQKzNwS1+jls0oqov3uQ2WasLs= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= @@ -367,7 +353,6 @@ github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPH github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= @@ -379,11 +364,9 @@ github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9t github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v1.13.0/go.mod h1:wDmR7qL282YbGsPy6H/yAsesrxfxaaSlJazyFLYVFx8= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -425,11 +408,9 @@ github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhV github.com/tidwall/sjson v1.1.4 h1:bTSsPLdAYF5QNLSwYsKfBKKTnlGbIuhqL3CpRsjzGhg= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/woodsbury/decimal128 v1.3.0 h1:8pffMNWIlC0O5vbyHWFZAt5yWvWcrHA+3ovIIjVWss0= github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= @@ -440,14 +421,6 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea/go.mod h1:eNr558nEUjP8acGw8FFjTeWvSgU1stO7FAO6eknhHe4= -gitlab.eclipse.org/eclipse/xfsc/libraries/crypto/engine/core v1.2.0/go.mod h1:wvT+bZZmQgHrYqeyoIkY+EaxTZZSbZza2j/gG+Ca+A8= -gitlab.eclipse.org/eclipse/xfsc/libraries/crypto/jwt v1.0.1/go.mod h1:rljyPrL3QvUGuErGgVYZCOaXwdjwCqR3V5MEgSjifQk= -gitlab.eclipse.org/eclipse/xfsc/libraries/messaging/cloudeventprovider v0.1.4/go.mod h1:UdoA3qxEYoBWleNI/oAtp3LTU6tJa1UOovMR/K9h9lM= -gitlab.eclipse.org/eclipse/xfsc/libraries/ssi/oid4vip v0.1.2/go.mod h1:zEswN6WqrvXbxgiKmP9nY+TyTsGLuun/ED41QbMFFp8= -gitlab.eclipse.org/eclipse/xfsc/organisational-credential-manager-w-stack/libraries/messaging v1.10.0/go.mod h1:6Vy3010QU4RJvEOwxF+idncvK4kWVVQaetAfqx6D7ek= -gitlab.eclipse.org/eclipse/xfsc/train/trusted-content-resolver/clients/go v0.0.0-20240202152216-f1a0d50c3e8b/go.mod h1:I5gShljA7TRqRGJ2x19inWv9KiqHXyv6blK0KsjsfyI= -gitlab.eclipse.org/eclipse/xfsc/tsa/golib v1.3.2/go.mod h1:csApc+9NYX7AoquLOLu644c/uxuPAVhv+kJpOAe3npg= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= diff --git a/integration/integration_test.go b/integration/integration_test.go index 3f1253d..40cd866 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -191,7 +191,7 @@ func TestCreateAndVerifySdJwtPresentation(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, vp) - err = signer.VerifyPresentationProof(vp, &aud, &nonce, []string{}, "vc+sd-jwt") + err = signer.VerifyPresentationProof(vp, &aud, &nonce, []string{}, "dc+sd-jwt") assert.NoError(t, err) }) } @@ -447,7 +447,7 @@ func TestCreateCredential(t *testing.T) { req: map[string]interface{}{ "issuer": "did:web:yourdomain.com:policy:policies:example:returnDID:1.0:evaluation", "namespace": "transit", - "format": "vc+sd-jwt", + "format": "dc+sd-jwt", "holder": "eyJhbGciOiJFZERTQSIsImp3ayI6eyJhbGciOiJFZERTQSIsImNydiI6IkVkMjU1MTkiLCJraWQiOiIyZjE0NTEwMi0yMGU0LTRjYzQtYjE1OS01OWUyZTIwYzQ2NGYiLCJrdHkiOiJPS1AiLCJ4Ijoianl4VVpLQjNIUjVfLTNJa1A1VEFLeTh2SXVoX192dko4OG5CZjFDcFV1byJ9LCJraWQiOiJkaWQ6andrOmV5SmhiR2NpT2lKRlpFUlRRU0lzSW1OeWRpSTZJa1ZrTWpVMU1Ua2lMQ0pyYVdRaU9pSXlaakUwTlRFd01pMHlNR1UwTFRSall6UXRZakUxT1MwMU9XVXlaVEl3WXpRMk5HWWlMQ0pyZEhraU9pSlBTMUFpTENKNElqb2lhbmw0VlZwTFFqTklValZmTFROSmExQTFWRUZMZVRoMlNYVm9YMTkyZGtvNE9HNUNaakZEY0ZWMWJ5SjkiLCJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCJ9.eyJhdWQiOlsiaHR0cHM6Ly9jbG91ZC13YWxsZXQueGZzYy5kZXYiXSwiaWF0IjoxNzI3MjQ4OTc2LCJub25jZSI6ImRhYzRhODFlLWUyNjItNDkzMS1hODA2LWY0NGFmMWIzMjE4NyJ9.0chMgVQ_NvPpB3VF-pjp4ib0aMpRvepx1dcW45CC1J1PAxyg_wEhD24yDQ-o6Dxp-Qp5c9RhRRe1oG1uw8w3Cg", "key": "eckey", "credentialSubject": map[string]interface{}{ @@ -463,7 +463,7 @@ func TestCreateCredential(t *testing.T) { "issuer": "did:web:yourdomain.com:policy:policies:example:returnDID:1.0:evaluation", "namespace": "transit", "status": true, - "format": "vc+sd-jwt", + "format": "dc+sd-jwt", "holder": "eyJhbGciOiJFZERTQSIsImp3ayI6eyJhbGciOiJFZERTQSIsImNydiI6IkVkMjU1MTkiLCJraWQiOiIyZjE0NTEwMi0yMGU0LTRjYzQtYjE1OS01OWUyZTIwYzQ2NGYiLCJrdHkiOiJPS1AiLCJ4Ijoianl4VVpLQjNIUjVfLTNJa1A1VEFLeTh2SXVoX192dko4OG5CZjFDcFV1byJ9LCJraWQiOiJkaWQ6andrOmV5SmhiR2NpT2lKRlpFUlRRU0lzSW1OeWRpSTZJa1ZrTWpVMU1Ua2lMQ0pyYVdRaU9pSXlaakUwTlRFd01pMHlNR1UwTFRSall6UXRZakUxT1MwMU9XVXlaVEl3WXpRMk5HWWlMQ0pyZEhraU9pSlBTMUFpTENKNElqb2lhbmw0VlZwTFFqTklValZmTFROSmExQTFWRUZMZVRoMlNYVm9YMTkyZGtvNE9HNUNaakZEY0ZWMWJ5SjkiLCJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCJ9.eyJhdWQiOlsiaHR0cHM6Ly9jbG91ZC13YWxsZXQueGZzYy5kZXYiXSwiaWF0IjoxNzI3MjQ4OTc2LCJub25jZSI6ImRhYzRhODFlLWUyNjItNDkzMS1hODA2LWY0NGFmMWIzMjE4NyJ9.0chMgVQ_NvPpB3VF-pjp4ib0aMpRvepx1dcW45CC1J1PAxyg_wEhD24yDQ-o6Dxp-Qp5c9RhRRe1oG1uw8w3Cg", "key": "eckey", "credentialSubject": map[string]interface{}{ diff --git a/integration/internal/client/signer.go b/integration/internal/client/signer.go index 6ee28a2..e04f69e 100644 --- a/integration/internal/client/signer.go +++ b/integration/internal/client/signer.go @@ -188,7 +188,7 @@ func (s *Signer) VerifyCredentialSdJwtProof(vc []byte, disclosureFrame []string) body, err := io.ReadAll(r.Body) p.Credential = []byte(strings.Replace(strings.Replace(string(body), `"`, "", -1), "\n", "", -1)) - p.XFormat = "vc+sd-jwt" + p.XFormat = "dc+sd-jwt" p.DisclosureFrame = disclosureFrame if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) @@ -274,7 +274,7 @@ func (s *Signer) CreateCredentialSdJwtProof(key string, vc []byte) ([]byte, erro "group": "", "key": key, "credential": cred, - "format": "vc+sd-jwt", + "format": "dc+sd-jwt", "signatureType": "ES256", "disclosureFrame": []string{"allow"}, } @@ -336,7 +336,7 @@ func (s *Signer) CreateCredentialSdJwtPresentation(key, aud, group, sdjwt, nonce "nonce": nonce, "aud": aud, "discloureFrame": disclosureFrame, - "format": "vc+sd-jwt", + "format": "dc+sd-jwt", } payloadJSON, err := json.Marshal(payload) diff --git a/internal/service/signer/proof.go b/internal/service/signer/proof.go index 9f034df..0c69757 100644 --- a/internal/service/signer/proof.go +++ b/internal/service/signer/proof.go @@ -5,6 +5,7 @@ import ( "fmt" "strings" + "github.com/bytedance/gopkg/util/logger" "github.com/eclipse-xfsc/crypto-provider-core/v2/types" pkgErr "github.com/eclipse-xfsc/microservice-core-go/pkg/err" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/jsonld" @@ -21,7 +22,7 @@ const ( EdSignature = "ed25519signature2020" ) -func (s *Service) addCredentialProof(ctx context.Context, issuer string, namespace, group, keyname string, vc *verifiable.Credential, nonce *string, sigType string) (*verifiable.Credential, error) { +func (s *Service) addCredentialProof(ctx context.Context, issuer string, tenantId, groupid, namespace, group, keyname string, vc *verifiable.Credential, nonce *string, sigType, statuslisttype string, status *bool, origin string) (*verifiable.Credential, error) { key, err := s.getKey(ctx, namespace, group, keyname, sigType) if err != nil { @@ -44,6 +45,11 @@ func (s *Service) addCredentialProof(ctx context.Context, issuer string, namespa } } + if status != nil && *status { + logger.Debug("Append Status") + err = s.appendVCStatus(vc, tenantId, groupid, namespace, group, origin, keyname, statuslisttype, vc.Issuer.ID, vc.Expired.Time) + } + proofContext, err := s.proofContext(ctx, issuer, namespace, group, key.Identifier.KeyId, nonce, sigType) if err != nil { return nil, &pkgErr.Error{ diff --git a/internal/service/signer/service.go b/internal/service/signer/service.go index b048125..3a078da 100644 --- a/internal/service/signer/service.go +++ b/internal/service/signer/service.go @@ -409,7 +409,7 @@ func (s *Service) JwkPublicKey(ctx context.Context, req *signer.JwkPublicKeyRequ return pubKey, nil } -func (s *Service) addProof(ctx context.Context, credential any, tenantId, groupId, format, namespace, group, key, origin, did string, nonce *string, logger *zap.Logger, sigType string, disclosureFrame []string) (interface{}, error) { +func (s *Service) addProof(ctx context.Context, credential any, tenantId, groupId, format, namespace, group, key, origin, did string, nonce *string, logger *zap.Logger, sigType string, disclosureFrame []string, statuslistype string, status *bool) (interface{}, error) { vcBytes, err := json.Marshal(credential) if err != nil { logger.Error("credential is not valid json", zap.Error(err)) @@ -426,8 +426,8 @@ func (s *Service) addProof(ctx context.Context, credential any, tenantId, groupI return nil, pkgErr.New(pkgErr.BadRequest, err.Error()) } - if format == "vc+sd-jwt" { - return s.createSdJwt(vc, tenantId, groupId, namespace, group, key, sigType, disclosureFrame, origin, nil, "", did, nil) + if format == "dc+sd-jwt" { + return s.createSdJwt(vc, tenantId, groupId, namespace, group, key, sigType, disclosureFrame, origin, status, statuslistype, did, nil) } if format == "ldp_vc" { @@ -445,7 +445,7 @@ func (s *Service) addProof(ctx context.Context, credential any, tenantId, groupI return nil, pkgErr.New(pkgErr.BadRequest, err.Error()) } - vcWithProof, err := s.addCredentialProof(ctx, vc.Issuer.ID, namespace, group, key, vc, nonce, sigType) + vcWithProof, err := s.addCredentialProof(ctx, vc.Issuer.ID, tenantId, groupId, namespace, group, key, vc, nonce, sigType, statuslistype, status, origin) if err != nil { logger.Error("error making credential proof", zap.Error(err)) return nil, pkgErr.New(err) @@ -467,7 +467,7 @@ func (s *Service) CredentialProof(ctx context.Context, req *signer.CredentialPro zap.String("key", req.Key), zap.String("group", req.Group), ) - return s.addProof(ctx, req.Credential, req.XTenantid, req.XGroupid, req.Format, req.Namespace, req.Group, req.Key, req.XOrigin, req.XDid, req.Nonce, logger, req.SignatureType, req.DisclosureFrame) + return s.addProof(ctx, req.Credential, req.XTenantid, req.XGroupid, req.Format, req.Namespace, req.Group, req.Key, req.XOrigin, req.XDid, req.Nonce, logger, req.SignatureType, req.DisclosureFrame, req.Statuslisttype, req.Status) } func (s *Service) convertIssuer(ctx context.Context, key, namespace, group string, iss *string) (string, error) { @@ -496,7 +496,7 @@ func (s *Service) PresentationProof(ctx context.Context, req *signer.Presentatio zap.String("key", req.Key), ) - if req.Format == "vc+sd-jwt" { + if req.Format == "dc+sd-jwt" { if req.Presentation == nil { return nil, pkgErr.New("sdjwt presentation is nil") @@ -828,11 +828,13 @@ func (s *Service) CreateCredential(ctx context.Context, req *signer.CreateCreden } subject.CustomFields = credSubject - expiration := time.Now().Add(time.Duration(time.Now().Year())) + now := time.Now() + expiration := now.AddDate(1, 0, 0) + vc := &verifiable.Credential{ Context: jsonldContexts, Types: []string{verifiable.VCType}, - Issued: &util.TimeWrapper{Time: time.Now()}, + Issued: &util.TimeWrapper{Time: now}, Expired: &util.TimeWrapper{Time: expiration}, Subject: subject, } @@ -904,7 +906,7 @@ func (s *Service) CreateCredential(ctx context.Context, req *signer.CreateCreden vc.Issuer = verifiable.Issuer{ID: "did:jwk:" + base64.RawURLEncoding.EncodeToString(bytes)} } - if req.Format == "vc+sd-jwt" { + if req.Format == "dc+sd-jwt" { logger.Debug("Start Building sd jwt vc...") return s.createSdJwt(vc, req.XTenantid, req.XGroupid, req.Namespace, req.Group, req.Key, getSignatureType(key.KeyType), req.DisclosureFrame, req.XOrigin, req.Status, req.Statuslisttype, vc.Issuer.ID, holderJwk) @@ -959,7 +961,7 @@ func (s *Service) CreateCredential(ctx context.Context, req *signer.CreateCreden } logger.Debug("Start building ldp vc...") - vcWithProof, err := s.addCredentialProof(ctx, vc.Issuer.ID, req.Namespace, req.Group, req.Key, vc, req.Nonce, req.SignatureType) + vcWithProof, err := s.addCredentialProof(ctx, vc.Issuer.ID, req.XTenantid, req.XGroupid, req.Namespace, req.Group, req.Key, vc, req.Nonce, req.SignatureType, req.Statuslisttype, req.Status, req.XOrigin) if err != nil { logger.Error("error making credential proof", zap.Error(err)) return nil, &pkgErr.Error{ @@ -1181,7 +1183,7 @@ func (s *Service) verifyLdProof(ctx context.Context, credential []byte, tenantId func (s *Service) VerifyCredential(ctx context.Context, req *signer.VerifyCredentialRequest) (*signer.VerifyResult, error) { logger := s.logger.With(zap.String("operation", "verifyCredential")) - if req.XFormat == "vc+sd-jwt" { + if req.XFormat == "dc+sd-jwt" { if req.DisclosureFrame == nil { return &signer.VerifyResult{Valid: false}, pkgErr.New("no disclosure frame given") } @@ -1203,7 +1205,7 @@ func (s *Service) VerifyCredential(ctx context.Context, req *signer.VerifyCreden func (s *Service) VerifyPresentation(ctx context.Context, req *signer.VerifyPresentationRequest) (*signer.VerifyResult, error) { logger := s.logger.With(zap.String("operation", "verifyPresentation")) - if req.XFormat == "vc+sd-jwt" { + if req.XFormat == "dc+sd-jwt" { sdjwt := strings.Replace(strings.Replace(string(req.Presentation), `"`, "", -1), "\n", "", -1) return s.verifySdJwt([]byte(sdjwt), req.DisclosureFrame, true, *req.Nonce, *req.Aud) } @@ -1479,17 +1481,30 @@ func (s *Service) createSdJwt(vc *verifiable.Credential, tenantid, groupid, name } if status != nil && *status { - url, _, purpose, index, err := s.getStatusListEntry(tenantid, groupid, namespace, group, origin, keyId, statuslisttype, did, vc.Expired.Time) + url, _, _, index, err := s.getStatusListEntry( + tenantid, + groupid, + namespace, + group, + origin, + keyId, + statuslisttype, + did, + vc.Expired.Time, + ) if err != nil { return nil, err } - st := make(map[string]interface{}) - st["statusPurpose"] = purpose - st["statusListCredential"] = url - st["statusListIndex"] = index - m.CustomFields["status"] = st + statusList := map[string]interface{}{ + "idx": index, + "uri": url, + } + + m.CustomFields["status"] = map[string]interface{}{ + "status_list": statusList, + } } subject["claims"] = m.CustomFields @@ -1719,6 +1734,7 @@ func (s *Service) DidDoc(c context.Context, req *signer.DidRequest) (*signer.Did Controller: req.XDid, VerificationMethod: make([]*signer.DIDVerificationMethod, 0), Service: make([]*signer.ServiceEndpoint, 0), + AssertionMethod: make([]string, 0), } var didresponse = &signer.DidResponse{ @@ -1730,6 +1746,7 @@ func (s *Service) DidDoc(c context.Context, req *signer.DidRequest) (*signer.Did }, VerificationMethod: make([]*signer.DIDVerificationMethod, 0), Service: make([]*signer.ServiceEndpoint, 0), + AssertionMethod: make([]string, 0), } for _, e := range engines { @@ -1776,6 +1793,10 @@ func (s *Service) DidDoc(c context.Context, req *signer.DidRequest) (*signer.Did } } + for _, m := range mthds { + didresponse.AssertionMethod = append(didresponse.AssertionMethod, m.ID) + } + didresponse.VerificationMethod = append(didresponse.VerificationMethod, mthds...) } } @@ -1923,7 +1944,7 @@ func (s *Service) DidConfiguration(c context.Context, req *signer.DidConfigurati vc["issuer"] = req.XDid vc["credentialSubject"].(map[string]interface{})["id"] = req.XDid - res, err := s.addProof(ctx.Context, vc, req.XTenantid, *req.XGroupid, "ldp_vc", req.XNamespace, req.XGroup, k.Identifier.KeyId, req.XOrigin, *req.XDid, req.XNonce, logger, req.XSignatureType, []string{}) + res, err := s.addProof(ctx.Context, vc, req.XTenantid, *req.XGroupid, "ldp_vc", req.XNamespace, req.XGroup, k.Identifier.KeyId, req.XOrigin, *req.XDid, req.XNonce, logger, req.XSignatureType, []string{}, "", nil) if err != nil { return didConfigError, &pkgErr.Error{ @@ -1940,7 +1961,7 @@ func (s *Service) DidConfiguration(c context.Context, req *signer.DidConfigurati vc["issuer"] = did vc["credentialSubject"].(map[string]interface{})["id"] = did - res, err := s.addProof(ctx.Context, vc, req.XTenantid, *req.XGroupid, "ldp_vc", req.XNamespace, req.XGroup, k.Identifier.KeyId, req.XOrigin, did, req.XNonce, logger, req.XSignatureType, []string{}) + res, err := s.addProof(ctx.Context, vc, req.XTenantid, *req.XGroupid, "ldp_vc", req.XNamespace, req.XGroup, k.Identifier.KeyId, req.XOrigin, did, req.XNonce, logger, req.XSignatureType, []string{}, "", nil) if err != nil { return didConfigError, &pkgErr.Error{ diff --git a/vendor/github.com/bytedance/gopkg/LICENSE b/vendor/github.com/bytedance/gopkg/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/vendor/github.com/bytedance/gopkg/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/bytedance/gopkg/util/logger/README.md b/vendor/github.com/bytedance/gopkg/util/logger/README.md new file mode 100644 index 0000000..00cc58d --- /dev/null +++ b/vendor/github.com/bytedance/gopkg/util/logger/README.md @@ -0,0 +1,3 @@ +# logger + +`logger` is the package which provides logging functions for all the utilities in gopkg. \ No newline at end of file diff --git a/vendor/github.com/bytedance/gopkg/util/logger/default.go b/vendor/github.com/bytedance/gopkg/util/logger/default.go new file mode 100644 index 0000000..a69fcd9 --- /dev/null +++ b/vendor/github.com/bytedance/gopkg/util/logger/default.go @@ -0,0 +1,143 @@ +// Copyright 2021 ByteDance Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package logger + +import ( + "context" + "fmt" + "log" + "os" +) + +var ( + _ Logger = (*localLogger)(nil) +) + +// SetDefaultLogger sets the default logger. +// This is not concurrency safe, which means it should only be called during init. +func SetDefaultLogger(l Logger) { + if l == nil { + panic("logger must not be nil") + } + defaultLogger = l +} + +var defaultLogger Logger = &localLogger{ + logger: log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile|log.Lmicroseconds), +} + +type localLogger struct { + logger *log.Logger +} + +func (ll *localLogger) logf(lv Level, format *string, v ...interface{}) { + if level > lv { + return + } + msg := lv.toString() + if format != nil { + msg += fmt.Sprintf(*format, v...) + } else { + msg += fmt.Sprint(v...) + } + ll.logger.Output(3, msg) + if lv == LevelFatal { + os.Exit(1) + } +} + +func (ll *localLogger) Fatal(v ...interface{}) { + ll.logf(LevelFatal, nil, v...) +} + +func (ll *localLogger) Error(v ...interface{}) { + ll.logf(LevelError, nil, v...) +} + +func (ll *localLogger) Warn(v ...interface{}) { + ll.logf(LevelWarn, nil, v...) +} + +func (ll *localLogger) Notice(v ...interface{}) { + ll.logf(LevelNotice, nil, v...) +} + +func (ll *localLogger) Info(v ...interface{}) { + ll.logf(LevelInfo, nil, v...) +} + +func (ll *localLogger) Debug(v ...interface{}) { + ll.logf(LevelDebug, nil, v...) +} + +func (ll *localLogger) Trace(v ...interface{}) { + ll.logf(LevelTrace, nil, v...) +} + +func (ll *localLogger) Fatalf(format string, v ...interface{}) { + ll.logf(LevelFatal, &format, v...) +} + +func (ll *localLogger) Errorf(format string, v ...interface{}) { + ll.logf(LevelError, &format, v...) +} + +func (ll *localLogger) Warnf(format string, v ...interface{}) { + ll.logf(LevelWarn, &format, v...) +} + +func (ll *localLogger) Noticef(format string, v ...interface{}) { + ll.logf(LevelNotice, &format, v...) +} + +func (ll *localLogger) Infof(format string, v ...interface{}) { + ll.logf(LevelInfo, &format, v...) +} + +func (ll *localLogger) Debugf(format string, v ...interface{}) { + ll.logf(LevelDebug, &format, v...) +} + +func (ll *localLogger) Tracef(format string, v ...interface{}) { + ll.logf(LevelTrace, &format, v...) +} + +func (ll *localLogger) CtxFatalf(ctx context.Context, format string, v ...interface{}) { + ll.logf(LevelFatal, &format, v...) +} + +func (ll *localLogger) CtxErrorf(ctx context.Context, format string, v ...interface{}) { + ll.logf(LevelError, &format, v...) +} + +func (ll *localLogger) CtxWarnf(ctx context.Context, format string, v ...interface{}) { + ll.logf(LevelWarn, &format, v...) +} + +func (ll *localLogger) CtxNoticef(ctx context.Context, format string, v ...interface{}) { + ll.logf(LevelNotice, &format, v...) +} + +func (ll *localLogger) CtxInfof(ctx context.Context, format string, v ...interface{}) { + ll.logf(LevelInfo, &format, v...) +} + +func (ll *localLogger) CtxDebugf(ctx context.Context, format string, v ...interface{}) { + ll.logf(LevelDebug, &format, v...) +} + +func (ll *localLogger) CtxTracef(ctx context.Context, format string, v ...interface{}) { + ll.logf(LevelTrace, &format, v...) +} diff --git a/vendor/github.com/bytedance/gopkg/util/logger/logger.go b/vendor/github.com/bytedance/gopkg/util/logger/logger.go new file mode 100644 index 0000000..60ca74f --- /dev/null +++ b/vendor/github.com/bytedance/gopkg/util/logger/logger.go @@ -0,0 +1,250 @@ +// Copyright 2021 ByteDance Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package logger + +import ( + "context" + "fmt" +) + +// Logger is a logger interface that provides logging function with levels. +type Logger interface { + Trace(v ...interface{}) + Debug(v ...interface{}) + Info(v ...interface{}) + Notice(v ...interface{}) + Warn(v ...interface{}) + Error(v ...interface{}) + Fatal(v ...interface{}) + + Tracef(format string, v ...interface{}) + Debugf(format string, v ...interface{}) + Infof(format string, v ...interface{}) + Noticef(format string, v ...interface{}) + Warnf(format string, v ...interface{}) + Errorf(format string, v ...interface{}) + Fatalf(format string, v ...interface{}) + + CtxTracef(ctx context.Context, format string, v ...interface{}) + CtxDebugf(ctx context.Context, format string, v ...interface{}) + CtxInfof(ctx context.Context, format string, v ...interface{}) + CtxNoticef(ctx context.Context, format string, v ...interface{}) + CtxWarnf(ctx context.Context, format string, v ...interface{}) + CtxErrorf(ctx context.Context, format string, v ...interface{}) + CtxFatalf(ctx context.Context, format string, v ...interface{}) +} + +// Level defines the priority of a log message. +// When a logger is configured with a level, any log message with a lower +// log level (smaller by integer comparison) will not be output. +type Level int + +// The levels of logs. +const ( + LevelTrace Level = iota + LevelDebug + LevelInfo + LevelNotice + LevelWarn + LevelError + LevelFatal +) + +// SetLevel sets the level of logs below which logs will not be output. +// The default log level is LevelTrace. +func SetLevel(lv Level) { + if lv < LevelTrace || lv > LevelFatal { + panic("invalid level") + } + level = lv +} + +// Fatal calls the default logger's Fatal method and then os.Exit(1). +func Fatal(v ...interface{}) { + defaultLogger.Fatal(v) +} + +// Error calls the default logger's Error method. +func Error(v ...interface{}) { + if level > LevelError { + return + } + defaultLogger.Error(v) +} + +// Warn calls the default logger's Warn method. +func Warn(v ...interface{}) { + if level > LevelWarn { + return + } + defaultLogger.Warn(v) +} + +// Notice calls the default logger's Notice method. +func Notice(v ...interface{}) { + if level > LevelNotice { + return + } + defaultLogger.Notice(v) +} + +// Info calls the default logger's Info method. +func Info(v ...interface{}) { + if level > LevelInfo { + return + } + defaultLogger.Info(v) +} + +// Debug calls the default logger's Debug method. +func Debug(v ...interface{}) { + if level > LevelDebug { + return + } + defaultLogger.Debug(v) +} + +// Trace calls the default logger's Trace method. +func Trace(v ...interface{}) { + if level > LevelTrace { + return + } + defaultLogger.Trace(v) +} + +// Fatalf calls the default logger's Fatalf method and then os.Exit(1). +func Fatalf(format string, v ...interface{}) { + defaultLogger.Fatalf(format, v...) +} + +// Errorf calls the default logger's Errorf method. +func Errorf(format string, v ...interface{}) { + if level > LevelError { + return + } + defaultLogger.Errorf(format, v...) +} + +// Warnf calls the default logger's Warnf method. +func Warnf(format string, v ...interface{}) { + if level > LevelWarn { + return + } + defaultLogger.Warnf(format, v...) +} + +// Noticef calls the default logger's Noticef method. +func Noticef(format string, v ...interface{}) { + if level > LevelNotice { + return + } + defaultLogger.Noticef(format, v...) +} + +// Infof calls the default logger's Infof method. +func Infof(format string, v ...interface{}) { + if level > LevelInfo { + return + } + defaultLogger.Infof(format, v...) +} + +// Debugf calls the default logger's Debugf method. +func Debugf(format string, v ...interface{}) { + if level > LevelDebug { + return + } + defaultLogger.Debugf(format, v...) +} + +// Tracef calls the default logger's Tracef method. +func Tracef(format string, v ...interface{}) { + if level > LevelTrace { + return + } + defaultLogger.Tracef(format, v...) +} + +// CtxFatalf calls the default logger's CtxFatalf method and then os.Exit(1). +func CtxFatalf(ctx context.Context, format string, v ...interface{}) { + defaultLogger.CtxFatalf(ctx, format, v...) +} + +// CtxErrorf calls the default logger's CtxErrorf method. +func CtxErrorf(ctx context.Context, format string, v ...interface{}) { + if level > LevelError { + return + } + defaultLogger.CtxErrorf(ctx, format, v...) +} + +// CtxWarnf calls the default logger's CtxWarnf method. +func CtxWarnf(ctx context.Context, format string, v ...interface{}) { + if level > LevelWarn { + return + } + defaultLogger.CtxWarnf(ctx, format, v...) +} + +// CtxNoticef calls the default logger's CtxNoticef method. +func CtxNoticef(ctx context.Context, format string, v ...interface{}) { + if level > LevelNotice { + return + } + defaultLogger.CtxNoticef(ctx, format, v...) +} + +// CtxInfof calls the default logger's CtxInfof method. +func CtxInfof(ctx context.Context, format string, v ...interface{}) { + if level > LevelInfo { + return + } + defaultLogger.CtxInfof(ctx, format, v...) +} + +// CtxDebugf calls the default logger's CtxDebugf method. +func CtxDebugf(ctx context.Context, format string, v ...interface{}) { + if level > LevelDebug { + return + } + defaultLogger.CtxDebugf(ctx, format, v...) +} + +// CtxTracef calls the default logger's CtxTracef method. +func CtxTracef(ctx context.Context, format string, v ...interface{}) { + if level > LevelTrace { + return + } + defaultLogger.CtxTracef(ctx, format, v...) +} + +var level Level + +var strs = []string{ + "[Trace] ", + "[Debug] ", + "[Info] ", + "[Notice] ", + "[Warn] ", + "[Error] ", + "[Fatal] ", +} + +func (lv Level) toString() string { + if lv >= LevelTrace && lv <= LevelFatal { + return strs[lv] + } + return fmt.Sprintf("[?%d] ", lv) +} diff --git a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/IssuerMetaData.go b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/IssuerMetaData.go index 3011d78..8bb4e1f 100644 --- a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/IssuerMetaData.go +++ b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/IssuerMetaData.go @@ -3,6 +3,8 @@ package credential import ( "encoding/json" "errors" + "fmt" + "net/url" "strings" "golang.org/x/exp/slices" @@ -12,45 +14,100 @@ import ( ) type IssuerMetadata struct { - CredentialIssuer string `json:"credential_issuer"` - AuthorizationServers []string `json:"authorization_servers"` - CredentialEndpoint string `json:"credential_endpoint"` - BatchCredentialEndpoint *string `json:"batch_credential_endpoint"` - DeferredCredentialEndpoint *string `json:"deferred_credential_endpoint"` - NotificationEndpoint *string `json:"notification_endpoint"` - CredentialResponseEncryption CredentialRespEnc `json:"credential_response_encryption"` - Display []LocalizedCredential `json:"display"` - CredentialIdentifiersSupported bool `json:"credential_identifiers_supported"` - SignedMetadata *string `json:"signed_metadata"` + CredentialIssuer string `json:"credential_issuer"` + + AuthorizationServers []string `json:"authorization_servers,omitempty"` + + CredentialEndpoint string `json:"credential_endpoint"` + NonceEndpoint *string `json:"nonce_endpoint,omitempty"` + DeferredCredentialEndpoint *string `json:"deferred_credential_endpoint,omitempty"` + NotificationEndpoint *string `json:"notification_endpoint,omitempty"` + + CredentialRequestEncryption *CredentialRequestEncryption `json:"credential_request_encryption,omitempty"` + CredentialResponseEncryption *CredentialResponseEncryption `json:"credential_response_encryption,omitempty"` + + BatchCredentialIssuance *BatchCredentialIssuance `json:"batch_credential_issuance,omitempty"` + + Display []LocalizedCredential `json:"display,omitempty"` + + SignedMetadata *string `json:"signed_metadata,omitempty"` + CredentialConfigurationsSupported map[string]CredentialConfiguration `json:"credential_configurations_supported"` } -type CredentialRespEnc struct { +// CredentialRequestEncryption describes the Credential Issuer's +// capabilities for encrypted Credential Requests. +// +// According to OID4VCI 1.0, the Issuer publishes one or more public +// encryption keys through jwks. The Wallet uses these keys for +// encrypting Credential Requests. +type CredentialRequestEncryption struct { + JWKs JWKSet `json:"jwks"` + EncValuesSupported []string `json:"enc_values_supported"` + ZipValuesSupported []string `json:"zip_values_supported,omitempty"` + EncryptionRequired bool `json:"encryption_required"` +} + +// CredentialResponseEncryption describes the Credential Issuer's +// capabilities for encrypted Credential Responses. +type CredentialResponseEncryption struct { AlgValuesSupported []string `json:"alg_values_supported"` EncValuesSupported []string `json:"enc_values_supported"` + ZipValuesSupported []string `json:"zip_values_supported,omitempty"` EncryptionRequired bool `json:"encryption_required"` } +// JWKSet represents the public keys advertised by the Credential Issuer +// for encrypted Credential Requests. +// +// json.RawMessage is intentionally used here to avoid coupling the protocol +// model to a specific JOSE implementation. +type JWKSet struct { + Keys []json.RawMessage `json:"keys"` +} + +// BatchCredentialIssuance indicates that the Credential Endpoint accepts +// more than one key proof in a Credential Request and therefore can issue +// multiple Credentials for the same Credential Dataset. +type BatchCredentialIssuance struct { + BatchSize uint `json:"batch_size"` +} + type CredentialConfigurationIdentifier struct { - Id string `json:"configuration_id"` - CredentialIdentifier []string `json:"credential_identifier,omitempty"` + Id string `json:"configuration_id"` + CredentialIdentifiers []string `json:"credential_identifiers,omitempty"` } type CredentialConfiguration struct { - Format string `json:"format"` - Scope string `json:"scope"` - CryptographicBindingMethodsSupported []string `json:"cryptographic_binding_methods_supported"` - CredentialSigningAlgValuesSupported []string `json:"credential_signing_alg_values_supported"` - CredentialDefinition CredentialDefinition `json:"credential_definition"` - ProofTypesSupported map[ProofVariant]ProofType `json:"proof_types_supported"` - Display []LocalizedCredential `json:"display,omitempty"` - Vct *string `json:"vct,omitempty"` - Order []string `json:"order,omitempty"` - Claims []MetadataClaim `json:"claims,omitempty"` - CredentialMetadata CredentialMetadata `json:"credential_metadata,omitempty"` - ///Out of OID Spec, but useful - Schema map[string]interface{} `json:"schema,omitempty"` //json Schema representation of payload - Subject string `json:"topic,omitempty"` // Subject of the credential within the system + Format string `json:"format"` + + Scope string `json:"scope,omitempty"` + + CryptographicBindingMethodsSupported []string `json:"cryptographic_binding_methods_supported,omitempty"` + + CredentialSigningAlgValuesSupported []string `json:"credential_signing_alg_values_supported,omitempty"` + + CredentialDefinition *CredentialDefinition `json:"credential_definition,omitempty"` + + ProofTypesSupported map[ProofVariant]ProofType `json:"proof_types_supported,omitempty"` + + // Format-specific parameter for SD-JWT VC. + Vct *string `json:"vct,omitempty"` + + // Format-specific metadata. + Order []string `json:"order,omitempty"` + Claims []MetadataClaim `json:"claims,omitempty"` + + CredentialMetadata *CredentialMetadata `json:"credential_metadata,omitempty"` + + // XFSC internal fields. + // + // These fields are not part of OID4VCI. + // The well-known-service must strip these fields from metadata returned + // to Wallets. They may remain in internal/NATS messages so that services + // can route issuance requests. + Schema map[string]interface{} `json:"schema,omitempty"` + Subject string `json:"topic,omitempty"` } type CredentialMetadata struct { @@ -59,14 +116,16 @@ type CredentialMetadata struct { } type CredentialDefinition struct { - Context []string `json:"@context"` - Type []string `json:"type"` + Context []string `json:"@context,omitempty"` + Type []string `json:"type"` + CredentialSubject map[string]CredentialSubject `json:"credentialSubject,omitempty"` } type MetadataClaim struct { oauth.Claim - Display Display `json:"display,omitempty"` + + Display []Display `json:"display,omitempty"` } type CredentialSubject struct { @@ -80,76 +139,180 @@ type Display struct { type ProofType struct { ProofSigningAlgValuesSupported []string `json:"proof_signing_alg_values_supported"` + + KeyAttestationsRequired *KeyAttestationsRequired `json:"key_attestations_required,omitempty"` +} + +type KeyAttestationsRequired struct { + KeyStorage []string `json:"key_storage,omitempty"` + UserAuthentication []string `json:"user_authentication,omitempty"` } type ProofVariant string +const ( + ProofJWT ProofVariant = "jwt" + ProofDIVP ProofVariant = "di_vp" + ProofAttestation ProofVariant = "attestation" +) + var ProofVariants = []ProofVariant{ - "jwt", - "cwt", - "ldp_vc", + ProofJWT, + ProofDIVP, + ProofAttestation, } type LocalizedCredential struct { - Name string `json:"name"` - Locale string `json:"locale"` - Logo DescriptiveURL `json:"logo,omitempty"` - BackgroundColor string `json:"background_color,omitempty"` - TextColor string `json:"text_color,omitempty"` + Name string `json:"name,omitempty"` + Locale string `json:"locale,omitempty"` + + Logo *DescriptiveURL `json:"logo,omitempty"` + + Description string `json:"description,omitempty"` + BackgroundColor string `json:"background_color,omitempty"` + BackgroundImage *DescriptiveURL `json:"background_image,omitempty"` + TextColor string `json:"text_color,omitempty"` } type DescriptiveURL struct { - URL string `json:"url"` - AlternativeText string `json:"alt_text"` + URI string `json:"uri"` + AlternativeText string `json:"alt_text,omitempty"` } -func (metadata *IssuerMetadata) CredentialRequest(request CredentialRequest, token oauth.Token) (*CredentialResponse, error) { +func (metadata *IssuerMetadata) CredentialRequest( + request CredentialRequest, + token oauth.Token, +) (*CredentialResponse, error) { b, err := json.Marshal(request) - if err != nil { return nil, err } - b, err = helper.Post(metadata.CredentialEndpoint, b, helper.ApplicationJson, &token.AccessToken) - + b, err = helper.Post( + metadata.CredentialEndpoint, + b, + helper.ApplicationJson, + &token.AccessToken, + ) if err != nil { return nil, err } var response CredentialResponse - err = json.Unmarshal(b, &response) - if err != nil { + if err := json.Unmarshal(b, &response); err != nil { return nil, err } return &response, nil } -func (metadata *IssuerMetadata) FindFittingAuthorizationServer(grant oauth.GrantType) (*oauth.OpenIdConfiguration, error) { +func (metadata *IssuerMetadata) FindFittingAuthorizationServer( + grant oauth.GrantType, +) (*oauth.OpenIdConfiguration, error) { + + authorizationServers := metadata.AuthorizationServers - if metadata.AuthorizationServers == nil || len(metadata.AuthorizationServers) == 0 { - if metadata.AuthorizationServers != nil { - metadata.AuthorizationServers = make([]string, 0) + // If authorization_servers is omitted, OID4VCI specifies that the + // Credential Issuer itself acts as the Authorization Server. + if len(authorizationServers) == 0 { + authorizationServers = []string{ + metadata.CredentialIssuer, } - metadata.AuthorizationServers = append(metadata.AuthorizationServers, metadata.CredentialIssuer) } - for _, server := range metadata.AuthorizationServers { - b, err := helper.Get(strings.Join([]string{server, ".well-known", "openid-configuration"}, "/")) - - if err == nil { - var config oauth.OpenIdConfiguration - err := json.Unmarshal(b, &config) - if err == nil { - contains := slices.Contains(config.Grant_Types_Supported, string(grant)) - if contains { - return &config, nil - } - } + for _, server := range authorizationServers { + config, err := findAuthorizationServerConfiguration(server) + if err != nil { + continue + } + + if slices.Contains(config.GrantTypesSupported, string(grant)) { + return config, nil + } + } + + return nil, fmt.Errorf( + "no authorization server supporting grant type %q found", + grant, + ) +} + +func findAuthorizationServerConfiguration( + issuer string, +) (*oauth.OpenIdConfiguration, error) { + + var lastErr error + + // OID4VCI 1.0 refers to RFC 8414 OAuth Authorization Server Metadata. + // + // Try that endpoint first. + endpoints := []string{ + authorizationServerMetadataURL(issuer), + + // Keep OpenID Connect discovery as a compatibility fallback because + // existing XFSC deployments currently expose this endpoint. + openIDConfigurationURL(issuer), + } + + for _, endpoint := range endpoints { + b, err := helper.Get(endpoint) + if err != nil { + lastErr = err + continue } + + var config oauth.OpenIdConfiguration + + if err := json.Unmarshal(b, &config); err != nil { + lastErr = err + continue + } + + return &config, nil } - return nil, errors.New("no fitting openidconfiguration found") + if lastErr != nil { + return nil, lastErr + } + + return nil, errors.New("unable to retrieve authorization server metadata") +} + +// authorizationServerMetadataURL builds the RFC 8414 metadata URL. +// +// Example: +// +// https://example.com +// -> https://example.com/.well-known/oauth-authorization-server +// +// https://example.com/tenant +// -> https://example.com/.well-known/oauth-authorization-server/tenant +func authorizationServerMetadataURL(issuer string) string { + u, err := url.Parse(issuer) + if err != nil { + return strings.TrimRight(issuer, "/") + + "/.well-known/oauth-authorization-server" + } + + issuerPath := strings.Trim(u.Path, "/") + + if issuerPath == "" { + u.Path = "/.well-known/oauth-authorization-server" + } else { + u.Path = "/.well-known/oauth-authorization-server/" + issuerPath + } + + u.RawQuery = "" + u.Fragment = "" + + return u.String() +} + +// openIDConfigurationURL is retained for compatibility with Authorization +// Servers exposing OpenID Connect Discovery rather than RFC 8414 metadata. +func openIDConfigurationURL(issuer string) string { + return strings.TrimRight(issuer, "/") + + "/.well-known/openid-configuration" } diff --git a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialDefferedRequest.go b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialDefferedRequest.go index b7ec935..2877036 100644 --- a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialDefferedRequest.go +++ b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialDefferedRequest.go @@ -1,10 +1,7 @@ package credential -const ( - InvalidTransactionId = "invalid_transaction_id" - IssuancePending = "issuance_pending" -) - type CredentialDeferredRequest struct { TransactionID string `json:"transaction_id"` + + CredentialResponseEncryption *CredentialResponseEncryptionParameters `json:"credential_response_encryption,omitempty"` } diff --git a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialOfferRequest.go b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialOfferRequest.go index 26c25c1..e82fc26 100644 --- a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialOfferRequest.go +++ b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialOfferRequest.go @@ -10,106 +10,254 @@ import ( "github.com/eclipse-xfsc/oid4-vci-vp-library/helper" ) +const ( + PreAuthorizedCodeGrantType = "urn:ietf:params:oauth:grant-type:pre-authorized_code" +) + type Grants struct { AuthorizationCode *AuthorizationCode `json:"authorization_code,omitempty"` + PreAuthorizedCode *PreAuthorizedCode `json:"urn:ietf:params:oauth:grant-type:pre-authorized_code,omitempty"` } +type TxCodeInputMode string + +const ( + TxCodeInputModeNumeric TxCodeInputMode = "numeric" + TxCodeInputModeText TxCodeInputMode = "text" +) + type TxCode struct { - InputMode string `json:"input_mode,omitempty"` - Length int `json:"length,omitempty"` - Description string `json:"description,omitempty"` + InputMode TxCodeInputMode `json:"input_mode,omitempty"` + Length int `json:"length,omitempty"` + Description string `json:"description,omitempty"` } type PreAuthorizedCode struct { - PreAuthorizationCode string `json:"pre-authorized_code"` - TxCode *TxCode `json:"tx_code,omitempty"` - Interval int `json:"interval,omitempty"` - AuthorizationServerHint string `json:"authorization_server,omitempty"` + PreAuthorizedCode string `json:"pre-authorized_code"` + + TxCode *TxCode `json:"tx_code,omitempty"` + + AuthorizationServer string `json:"authorization_server,omitempty"` } type AuthorizationCode struct { - IssuerState string `json:"issuer_state"` + IssuerState string `json:"issuer_state,omitempty"` + + AuthorizationServer string `json:"authorization_server,omitempty"` } type CredentialOfferParameters struct { - CredentialIssuer string `json:"credential_issuer"` - Credentials []string `json:"credential_configuration_ids"` - Grants Grants `json:"grants"` + CredentialIssuer string `json:"credential_issuer"` + + CredentialConfigurationIDs []string `json:"credential_configuration_ids"` + + Grants *Grants `json:"grants,omitempty"` } type CredentialOffer struct { - CredentialOfferUri string `json:"credential_offer_uri,omitempty"` - CredentialOffer string `json:"credential_offer,omitempty"` + CredentialOfferURI string `json:"credential_offer_uri,omitempty"` + + CredentialOffer string `json:"credential_offer,omitempty"` } -func (offerParameter *CredentialOfferParameters) CreateOfferLink() (*CredentialOffer, error) { - marshal, err := json.Marshal(offerParameter) +func (offerParameters *CredentialOfferParameters) CreateOfferLink() (*CredentialOffer, error) { + marshal, err := json.Marshal(offerParameters) if err != nil { - return nil, fmt.Errorf("could not marshal credentialOfferObject: %w", err) + return nil, fmt.Errorf("could not marshal credential offer object: %w", err) } - credentialOfferJson := url.QueryEscape(string(marshal)) + credentialOfferJSON := url.QueryEscape(string(marshal)) return &CredentialOffer{ - CredentialOffer: fmt.Sprintf("openid-credential-offer://?credential_offer=%s", credentialOfferJson), + CredentialOffer: fmt.Sprintf( + "openid-credential-offer://?credential_offer=%s", + credentialOfferJSON, + ), }, nil } -/* -Extracts the Parameters of the offering link -*/ -func (offering *CredentialOffer) GetOfferParameters() (*CredentialOfferParameters, error) { - var newCredentialOfferObject CredentialOfferParameters - var rawObject []byte +func (offer *CredentialOffer) GetOfferParameters() (*CredentialOfferParameters, error) { + var offerParameters CredentialOfferParameters - if offering.CredentialOffer != "" { - slice := strings.Split(offering.CredentialOffer, "credential_offer=") - unescaped, err := url.QueryUnescape(slice[len(slice)-1]) + switch { + case offer.CredentialOffer != "": + rawObject, err := extractCredentialOffer(offer.CredentialOffer) if err != nil { return nil, err } - rawObject = []byte(unescaped) - } else if offering.CredentialOfferUri != "" { - slice := strings.Split(offering.CredentialOfferUri, "credential_offer_uri=") - unescape, err := url.QueryUnescape(slice[len(slice)-1]) + if err := json.Unmarshal(rawObject, &offerParameters); err != nil { + return nil, fmt.Errorf( + "could not unmarshal credential offer: %w", + err, + ) + } + + case offer.CredentialOfferURI != "": + offerURI, err := extractCredentialOfferURI(offer.CredentialOfferURI) if err != nil { return nil, err } - rawObject, err = helper.Get(unescape) + rawObject, err := helper.Get(offerURI) if err != nil { return nil, err } - } else { - return nil, fmt.Errorf("no valid credentialOffer: %v", offering) + if err := json.Unmarshal(rawObject, &offerParameters); err != nil { + return nil, fmt.Errorf( + "could not unmarshal credential offer: %w", + err, + ) + } + + default: + return nil, errors.New("credential offer contains neither credential_offer nor credential_offer_uri") } - err := json.Unmarshal(rawObject, &newCredentialOfferObject) - if err != nil { - return nil, fmt.Errorf("error occured while unmarshal credentialOffer: %w", err) + + if err := offerParameters.Validate(); err != nil { + return nil, err } - return &newCredentialOfferObject, err + return &offerParameters, nil } -func (offerParameter *CredentialOfferParameters) GetIssuerMetadata() (*IssuerMetadata, error) { +func (offer *CredentialOfferParameters) Validate() error { + if offer.CredentialIssuer == "" { + return errors.New("credential_issuer is required") + } + + if len(offer.CredentialConfigurationIDs) == 0 { + return errors.New("credential_configuration_ids must not be empty") + } - if offerParameter.CredentialIssuer != "" { + seen := make(map[string]struct{}, len(offer.CredentialConfigurationIDs)) - b, err := helper.Get(strings.Join([]string{offerParameter.CredentialIssuer, ".well-known", "openid-credential-issuer"}, "/")) + for _, configurationID := range offer.CredentialConfigurationIDs { + if configurationID == "" { + return errors.New("credential_configuration_ids must not contain empty values") + } - if err != nil { - return nil, err + if _, ok := seen[configurationID]; ok { + return fmt.Errorf( + "duplicate credential_configuration_id %q", + configurationID, + ) } - var metadata IssuerMetadata - err = json.Unmarshal(b, &metadata) - if err != nil { - return nil, err + seen[configurationID] = struct{}{} + } + + if offer.Grants != nil && + offer.Grants.PreAuthorizedCode != nil && + offer.Grants.PreAuthorizedCode.PreAuthorizedCode == "" { + + return errors.New("pre-authorized_code is required for pre-authorized code grant") + } + + if offer.Grants != nil && + offer.Grants.PreAuthorizedCode != nil && + offer.Grants.PreAuthorizedCode.TxCode != nil { + + if err := offer.Grants.PreAuthorizedCode.TxCode.Validate(); err != nil { + return err } - return &metadata, nil } - return nil, errors.New("no issuer metadata found") + + return nil +} + +func (txCode TxCode) Validate() error { + switch txCode.InputMode { + case "", TxCodeInputModeNumeric, TxCodeInputModeText: + default: + return fmt.Errorf( + "unsupported tx_code input_mode %q", + txCode.InputMode, + ) + } + + if txCode.Length < 0 { + return errors.New("tx_code length must not be negative") + } + + if len(txCode.Description) > 300 { + return errors.New("tx_code description must not exceed 300 characters") + } + + return nil +} + +func (offer *CredentialOfferParameters) GetIssuerMetadata() (*IssuerMetadata, error) { + if offer.CredentialIssuer == "" { + return nil, errors.New("credential_issuer is required") + } + + endpoint := strings.TrimRight( + offer.CredentialIssuer, + "/", + ) + "/.well-known/openid-credential-issuer" + + b, err := helper.Get(endpoint) + if err != nil { + return nil, err + } + + var metadata IssuerMetadata + + if err := json.Unmarshal(b, &metadata); err != nil { + return nil, err + } + + return &metadata, nil +} + +func extractCredentialOffer(rawURI string) ([]byte, error) { + u, err := url.Parse(rawURI) + if err != nil { + return nil, fmt.Errorf("invalid credential offer URI: %w", err) + } + + credentialOffer := u.Query().Get("credential_offer") + if credentialOffer == "" { + return nil, errors.New("credential_offer parameter is missing") + } + + if u.Query().Get("credential_offer_uri") != "" { + return nil, errors.New( + "credential_offer and credential_offer_uri must not both be present", + ) + } + + return []byte(credentialOffer), nil +} + +func extractCredentialOfferURI(rawURI string) (string, error) { + u, err := url.Parse(rawURI) + if err != nil { + return "", fmt.Errorf("invalid credential offer URI: %w", err) + } + + credentialOfferURI := u.Query().Get("credential_offer_uri") + if credentialOfferURI == "" { + return "", errors.New("credential_offer_uri parameter is missing") + } + + if u.Query().Get("credential_offer") != "" { + return "", errors.New( + "credential_offer and credential_offer_uri must not both be present", + ) + } + + reference, err := url.Parse(credentialOfferURI) + if err != nil { + return "", fmt.Errorf("invalid credential_offer_uri: %w", err) + } + + if reference.Scheme != "https" { + return "", errors.New("credential_offer_uri must use https") + } + + return credentialOfferURI, nil } diff --git a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialRequest.go b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialRequest.go index 327bd2c..82941a5 100644 --- a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialRequest.go +++ b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialRequest.go @@ -1,148 +1,539 @@ package credential import ( + "crypto/hmac" + "crypto/rand" + "crypto/sha256" + "encoding/base64" + "encoding/json" "errors" "fmt" + "strings" + "time" "github.com/eclipse-xfsc/oid4-vci-vp-library/config" - "github.com/eclipse-xfsc/oid4-vci-vp-library/model/oauth" jwtext "github.com/eclipse-xfsc/ssi-jwt/v2" "github.com/lestrrat-go/jwx/v2/jwt" - "github.com/sirupsen/logrus" ) const ( - ProofTypeJWT = "jwt" - ProofTypeCWT = "cwt" - ProofTypeLDPvP = "ldp_vp" + ProofTypeJWT ProofVariant = "jwt" + ProofTypeDIVP ProofVariant = "di_vp" + ProofTypeAttestation ProofVariant = "attestation" ) +const ( + DefaultNonceTTL = 5 * time.Minute + MinimumNonceSecretLen = 32 +) + +type CredentialResponseEncryptionParameters struct { + JWK json.RawMessage `json:"jwk"` + Enc string `json:"enc"` + Zip string `json:"zip,omitempty"` +} + +func (p *CredentialResponseEncryptionParameters) Validate() error { + if p == nil { + return nil + } + + if len(p.JWK) == 0 { + return errors.New("credential response encryption jwk is required") + } + + if p.Enc == "" { + return errors.New("credential response encryption enc is required") + } + + return nil +} + type CredentialRequest struct { - ///OID 1.0 - CredentialConfigurationId string `json:"credential_configuration_id,omitempty"` - Proof *Proof `json:"proof,omitempty"` + // Exactly one of CredentialIdentifier or CredentialConfigurationID + // MUST be present. + CredentialIdentifier string `json:"credential_identifier,omitempty"` + + CredentialConfigurationID string `json:"credential_configuration_id,omitempty"` + + // Proofs is optional unless proof_types_supported is advertised + // for the selected Credential Configuration. + Proofs *CredentialProofs `json:"proofs,omitempty"` + + CredentialResponseEncryption *CredentialResponseEncryptionParameters `json:"credential_response_encryption,omitempty"` + + // Format is accepted for interoperability with wallet implementations + // using an older OID4VCI Credential Request structure. + // It MUST NOT be used for credential selection in the 1.0 flow. + Format string `json:"format,omitempty"` + // Proof is accepted for interoperability with wallet implementations + // using the legacy singular proof structure. + // It should be normalized into Proofs before further processing. + Proof *CredentialProof `json:"proof,omitempty"` + // Legacy / wallet interoperability (WaltID) + VCT string `json:"vct,omitempty"` +} - //Draft13, not more used in 1.0 - Format string `json:"format,omitempty"` - CredentialIdentifier string `json:"credential_identifier,omitempty"` - Vct *string `json:"vct,omitempty"` - Claims []oauth.Claim `json:"claims,omitempty"` - Order []string `json:"order,omitempty"` +// CredentialProof represents the legacy singular proof structure used by + +// older OID4VCI wallet implementations. + +type CredentialProof struct { + ProofType string `json:"proof_type,omitempty"` + JWT string `json:"jwt,omitempty"` } -type Proof struct { - ProofType string `json:"proof_type"` - Jwt *string `json:"jwt"` - Cwt *string `json:"cwt"` - LdpVp *string `json:"ldp_vp"` +type CredentialProofs struct { + JWT []string `json:"jwt,omitempty"` + + // A di_vp proof is a W3C Verifiable Presentation object. + DIVP []json.RawMessage `json:"di_vp,omitempty"` + + // The attestation proof type MUST contain exactly one JWT. + Attestation []string `json:"attestation,omitempty"` } -type JwtKeyProofType struct { - Nonce string `json:"nonce"` - Issuer string `json:"iss,omitempty"` +type JWTKeyProofClaims struct { + Issuer string `json:"iss,omitempty"` + Audience string `json:"aud"` - IssuedAt string `json:"iat"` + + // NumericDate, not string. + IssuedAt int64 `json:"iat"` + + // Required only when the Credential Issuer has a Nonce Endpoint. + Nonce string `json:"nonce,omitempty"` } -func (proof *Proof) GetProof() *string { - if proof.ProofType == ProofTypeJWT { - return proof.Jwt +// NoncePayload is the payload protected by the HMAC. +// +// JTI provides randomness and prevents two generated nonces from being +// identical. Exp limits the lifetime of the nonce. +// +// Note: this does not provide one-time/replay protection by itself. +// For strict one-time semantics the JTI additionally needs to be consumed +// in a server-side store. +type NoncePayload struct { + JTI string `json:"jti"` + TenantID string `json:"tenant_id"` + Exp int64 `json:"exp"` +} + +func (r *CredentialRequest) Normalize() { + if r == nil { + return + } + + // Prefer the OID4VCI 1.0 proofs structure if it is already present. + if r.Proofs != nil { + return } - if proof.ProofType == ProofTypeCWT { - return proof.Cwt + + if r.Proof == nil { + return } - if proof.ProofType == ProofTypeLDPvP { - return proof.LdpVp + switch r.Proof.ProofType { + case "jwt": + if r.Proof.JWT != "" { + r.Proofs = &CredentialProofs{ + JWT: []string{ + r.Proof.JWT, + }, + } + } } - return nil } -func (proof *Proof) CheckProof(audience string, cNonce string, proofTypesSupported map[ProofVariant]ProofType) error { +// CreateNonce creates an opaque, HMAC-SHA256 protected nonce. +// +// Format: +// +// base64url(payload).base64url(hmac) +// +// The returned value can be sent directly as c_nonce by the nonce endpoint. +func CreateNonce( + secret string, + tenantID string, + ttl time.Duration, +) (string, error) { - logrus.Debug(proof) + if len(secret) < MinimumNonceSecretLen { + return "", fmt.Errorf( + "nonce secret must contain at least %d characters", + MinimumNonceSecretLen, + ) + } - //no proofcheck required for this - if len(proofTypesSupported) == 0 { - return nil + if tenantID == "" { + return "", errors.New("tenant id is required") } - _, ok := proofTypesSupported[ProofVariant(proof.ProofType)] + if ttl <= 0 { + return "", errors.New("nonce TTL must be greater than zero") + } - if !ok { - return errors.New("unsupported proof type") + jti, err := generateNonceJTI() + if err != nil { + return "", fmt.Errorf("failed to generate nonce jti: %w", err) } - var jToken jwt.Token - var err error - options := []jwt.ParseOption{ - jwt.WithAcceptableSkew(config.DefaultLeeway), - jwt.WithRequiredClaim("nonce"), - jwt.WithClaimValue("nonce", cNonce), + payload := NoncePayload{ + JTI: jti, + TenantID: tenantID, + Exp: time.Now().Add(ttl).Unix(), } - if audience != "" { - options = append(options, jwt.WithAudience(audience)) + payloadBytes, err := json.Marshal(payload) + if err != nil { + return "", fmt.Errorf("failed to marshal nonce payload: %w", err) + } + + payloadEncoded := base64.RawURLEncoding.EncodeToString(payloadBytes) + + signature := signNonce( + []byte(secret), + payloadEncoded, + ) + + signatureEncoded := base64.RawURLEncoding.EncodeToString(signature) + + return payloadEncoded + "." + signatureEncoded, nil +} + +// ValidateNonce verifies the HMAC signature and expiration of an opaque nonce. +func ValidateNonce( + secret string, + tenantID string, + nonce string, +) error { + + if secret == "" { + return errors.New("nonce secret is missing") + } + + if len(secret) < MinimumNonceSecretLen { + return fmt.Errorf( + "nonce secret must contain at least %d characters", + MinimumNonceSecretLen, + ) + } + + if tenantID == "" { + return errors.New("tenant id is required") + } + + if nonce == "" { + return errors.New("nonce is missing") + } + + parts := strings.Split(nonce, ".") + if len(parts) != 2 { + return errors.New("nonce has invalid format") + } + + payloadEncoded := parts[0] + signatureEncoded := parts[1] + + signature, err := base64.RawURLEncoding.DecodeString(signatureEncoded) + if err != nil { + return errors.New("nonce signature is invalid") + } + + expectedSignature := signNonce( + []byte(secret), + payloadEncoded, + ) + + if !hmac.Equal(signature, expectedSignature) { + return errors.New("nonce signature is invalid") + } + + payloadBytes, err := base64.RawURLEncoding.DecodeString(payloadEncoded) + if err != nil { + return errors.New("nonce payload is invalid") + } + + var payload NoncePayload + + if err := json.Unmarshal(payloadBytes, &payload); err != nil { + return errors.New("nonce payload is invalid") + } + + if payload.JTI == "" { + return errors.New("nonce jti is missing") + } + + if payload.TenantID == "" { + return errors.New("nonce tenant id is missing") + } + + if payload.TenantID != tenantID { + return errors.New("nonce tenant id does not match") + } + + if payload.Exp == 0 { + return errors.New("nonce expiration is missing") + } + + if time.Now().Unix() >= payload.Exp { + return errors.New("nonce has expired") + } + + return nil +} + +func signNonce(secret []byte, payload string) []byte { + mac := hmac.New(sha256.New, secret) + + _, _ = mac.Write([]byte(payload)) + + return mac.Sum(nil) +} + +func generateNonceJTI() (string, error) { + value := make([]byte, 32) + + if _, err := rand.Read(value); err != nil { + return "", err + } + + return base64.RawURLEncoding.EncodeToString(value), nil +} + +func (request *CredentialRequest) CheckRequestValid( + audience string, + tenantID string, + nonceSecret string, + proofTypesSupported map[ProofVariant]ProofType, +) (bool, error) { + + if request == nil { + return false, errors.New("credential request is nil") + } + + hasCredentialIdentifier := request.CredentialIdentifier != "" + hasCredentialConfigurationID := request.CredentialConfigurationID != "" + + if hasCredentialIdentifier == hasCredentialConfigurationID { + return false, errors.New( + "exactly one of credential_identifier or credential_configuration_id must be present", + ) } - if proof.ProofType == "jwt" { - jToken, err = jwtext.Parse(*proof.Jwt, options...) - if err != nil { - return errors.Join(fmt.Errorf("failed to verify signature of proof"), err) - } else if jToken == nil { - return errors.Join(fmt.Errorf("failed to verify signature of proof, signature INVALID or expired! "), err) + if len(proofTypesSupported) > 0 { + if request.Proofs == nil { + return false, errors.New( + "proofs are required for the requested credential configuration", + ) } - nonceInf, isSet := jToken.Get("nonce") - if !isSet { - return errors.Join(fmt.Errorf("invalid authorization specified (missing nonce)"), err) + if err := request.Proofs.CheckProofs( + audience, + tenantID, + nonceSecret, + proofTypesSupported, + ); err != nil { + return false, err + } + } + + if request.CredentialResponseEncryption != nil { + if err := request.CredentialResponseEncryption.Validate(); err != nil { + return false, err } + } + + return true, nil +} + +func (proofs *CredentialProofs) CheckProofs( + audience string, + tenantID string, + nonceSecret string, + proofTypesSupported map[ProofVariant]ProofType, +) error { + + if proofs == nil { + return errors.New("proofs are missing") + } + + proofTypeCount := 0 + + if len(proofs.JWT) > 0 { + proofTypeCount++ + } - if _, ok := nonceInf.(string); !ok { - return errors.Join(fmt.Errorf("invalid nonce sepcified (expected string)"), err) + if len(proofs.DIVP) > 0 { + proofTypeCount++ + } + + if len(proofs.Attestation) > 0 { + proofTypeCount++ + } + + if proofTypeCount == 0 { + return errors.New("proofs must contain at least one proof") + } + + if proofTypeCount != 1 { + return errors.New("proofs must contain exactly one proof type") + } + + switch { + case len(proofs.JWT) > 0: + if _, ok := proofTypesSupported[ProofTypeJWT]; !ok { + return errors.New("jwt proof type is not supported") } - if nonceInf.(string) != cNonce { - return errors.Join(fmt.Errorf("nonce is not matching"), err) + for _, proof := range proofs.JWT { + if err := checkJWTProof( + proof, + audience, + tenantID, + nonceSecret, + ); err != nil { + return err + } } return nil - } else { - if proof.ProofType == "cwt" { + case len(proofs.DIVP) > 0: + if _, ok := proofTypesSupported[ProofTypeDIVP]; !ok { + return errors.New("di_vp proof type is not supported") + } + + return errors.New("di_vp proof validation is not implemented") + + case len(proofs.Attestation) > 0: + if _, ok := proofTypesSupported[ProofTypeAttestation]; !ok { + return errors.New("attestation proof type is not supported") + } - } else { - return errors.Join(fmt.Errorf("Invalid proof type, expected %s, got %s", "cwt", proof.ProofType), err) + if len(proofs.Attestation) != 1 { + return errors.New( + "attestation proof type must contain exactly one attestation", + ) } + + return errors.New("attestation proof validation is not implemented") + } + + return errors.New("unsupported proof type") +} + +func checkJWTProof( + proof string, + audience string, + tenantID string, + nonceSecret string, +) error { + + if proof == "" { + return errors.New("jwt proof must not be empty") + } + + options := []jwt.ParseOption{ + jwt.WithAcceptableSkew(config.DefaultLeeway), + jwt.WithRequiredClaim("iat"), + } + + if audience != "" { + options = append( + options, + jwt.WithRequiredClaim("aud"), + jwt.WithAudience(audience), + ) + } + + if nonceSecret != "" { + options = append( + options, + jwt.WithRequiredClaim("nonce"), + ) + } + + jToken, err := jwtext.Parse(proof, options...) + if err != nil { + return fmt.Errorf( + "failed to verify JWT proof: %w", + err, + ) + } + + if jToken == nil { + return errors.New("JWT proof is invalid") + } + + if err := checkJWTProofClaims( + jToken, + audience, + tenantID, + nonceSecret, + ); err != nil { + return err } return nil } -func (request *CredentialRequest) CheckRequestValid(audience string, cNonce string, proofTypesSupported map[ProofVariant]ProofType) (bool, error) { - var err error - b := false +func checkJWTProofClaims( + token jwt.Token, + audience string, + tenantID string, + nonceSecret string, +) error { - if request.Proof != nil && len(proofTypesSupported) > 0 { - err := request.Proof.CheckProof(audience, cNonce, proofTypesSupported) - if err != nil { - return false, err - } + issuedAt := token.IssuedAt() + + if issuedAt.IsZero() { + return errors.New("JWT proof is missing iat") } - if err == nil { - if request.Format != "" && request.CredentialIdentifier != "" { - return false, errors.New("either credential identifier or format is allowed") + if audience != "" { + aud := token.Audience() + + if len(aud) == 0 { + return errors.New("JWT proof is missing aud") } - if request.Format != "" { - if request.Format == "vc+sd-jwt" { - if request.Vct == nil { - return false, errors.New("requested format has missing vct") - } + found := false + + for _, value := range aud { + if value == audience { + found = true + break } } + + if !found { + return errors.New("JWT proof audience does not match") + } + } + + if nonceSecret != "" { + nonceValue, ok := token.Get("nonce") + if !ok { + return errors.New("JWT proof is missing nonce") + } + + nonce, ok := nonceValue.(string) + if !ok { + return errors.New("JWT proof nonce must be a string") + } + + if err := ValidateNonce( + nonceSecret, + tenantID, + nonce, + ); err != nil { + return fmt.Errorf( + "JWT proof nonce is invalid: %w", + err, + ) + } } - return b, err + return nil } diff --git a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialResponse.go b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialResponse.go index 96f3d57..894f2ec 100644 --- a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialResponse.go +++ b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/credential/credentialResponse.go @@ -1,14 +1,48 @@ package credential +import ( + "encoding/json" +) + var ( - ErrInvalidCredentialRequest = CredentialErrorResponse{ErrorMsg: InvalidCredentialRequest} - ErrUnsupportedCredentialType = CredentialErrorResponse{ErrorMsg: UnsupportedCredentialType} - ErrUnsupportedCredentialFormat = CredentialErrorResponse{ErrorMsg: UnsupportedCredentialFormat} - ErrInvalidProof = CredentialErrorResponse{ErrorMsg: InvalidProof} - ErrInvalidEncryptionParameters = CredentialErrorResponse{ErrorMsg: InvalidEncryptionParameters} + ErrInvalidCredentialRequest = CredentialErrorResponse{ + ErrorMsg: InvalidCredentialRequest, + } + + ErrUnknownCredentialConfiguration = CredentialErrorResponse{ + ErrorMsg: UnknownCredentialConfiguration, + } + + ErrUnknownCredentialIdentifier = CredentialErrorResponse{ + ErrorMsg: UnknownCredentialIdentifier, + } + + ErrInvalidProof = CredentialErrorResponse{ + ErrorMsg: InvalidProof, + } + + ErrInvalidNonce = CredentialErrorResponse{ + ErrorMsg: InvalidNonce, + } + + ErrInvalidEncryptionParameters = CredentialErrorResponse{ + ErrorMsg: InvalidEncryptionParameters, + } + + ErrCredentialRequestDenied = CredentialErrorResponse{ + ErrorMsg: CredentialRequestDenied, + } + + ErrInvalidTransactionID = CredentialErrorResponse{ + ErrorMsg: InvalidTransactionID, + } ) func (e CredentialErrorResponse) Error() string { + if e.ErrorDesc != nil { + return e.ErrorMsg + ": " + *e.ErrorDesc + } + return e.ErrorMsg } @@ -18,24 +52,48 @@ type CredentialErrorResponse struct { } const ( - // Credential Error Options - InvalidCredentialRequest = "invalid_credential_request" - UnsupportedCredentialType = "unsupported_credential_type" - UnsupportedCredentialFormat = "unsupported_credential_format" - InvalidProof = "invalid_proof" + InvalidCredentialRequest = "invalid_credential_request" + + UnknownCredentialConfiguration = "unknown_credential_configuration" + + UnknownCredentialIdentifier = "unknown_credential_identifier" + + InvalidProof = "invalid_proof" + + InvalidNonce = "invalid_nonce" + InvalidEncryptionParameters = "invalid_encryption_parameters" + + CredentialRequestDenied = "credential_request_denied" + + InvalidTransactionID = "invalid_transaction_id" ) type CredentialResponse struct { - Format string `json:"format"` - Credential interface{} `json:"credential,omitempty"` - TransactionID string `json:"transaction_id,omitempty"` - CNonce string `json:"c_nonce,omitempty"` - CNonceExpiresIn int `json:"c_nonce_expires_in,omitempty"` - NotificationId string `json:"notification_id,omitempty"` + // Immediate issuance. + // + // Credentials and TransactionID are mutually exclusive. + Credentials []CredentialResponseItem `json:"credentials,omitempty"` + + // Deferred issuance. + TransactionID string `json:"transaction_id,omitempty"` + + // Required for a deferred response. + Interval int `json:"interval,omitempty"` + + // Used with the Notification Endpoint. + // + // Only valid when Credentials is present. + NotificationID string `json:"notification_id,omitempty"` +} + +type CredentialResponseItem struct { + // Depending on the Credential Format, credential may either be + // a JSON string or a JSON object. + Credential json.RawMessage `json:"credential"` } type CredentialResponseError struct { Error string `json:"error"` - ErrorDescription string `json:"error_description"` + ErrorDescription string `json:"error_description,omitempty"` } diff --git a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/oauth/authorizationServer.go b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/oauth/authorizationServer.go index 9dafaf3..938ec31 100644 --- a/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/oauth/authorizationServer.go +++ b/vendor/github.com/eclipse-xfsc/oid4-vci-vp-library/model/oauth/authorizationServer.go @@ -3,10 +3,10 @@ package oauth import ( "encoding/json" "errors" + "fmt" "io" "net/url" "strings" - "time" "github.com/eclipse-xfsc/oid4-vci-vp-library/helper" ) @@ -18,98 +18,191 @@ const ( AuthorizationCodeGrant GrantType = "authorization_code" ) +const ( + AuthorizationDetailsTypeOpenIDCredential = "openid_credential" +) + type Token struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - ExpiresIn int64 `json:"expires_in"` - CNonce string `json:"c_nonce"` - CNonceExpiresIn int64 `json:"c_nonce_expires_in"` - AuthorizationDetails *AuthorizationDetails `json:"authorization_details,omitempty"` + AccessToken string `json:"access_token"` + TokenType string `json:"token_type"` + + ExpiresIn int64 `json:"expires_in,omitempty"` + + RefreshToken string `json:"refresh_token,omitempty"` + Scope string `json:"scope,omitempty"` + + AuthorizationDetails []AuthorizationDetails `json:"authorization_details,omitempty"` } type Claim struct { - Path string `json:"path"` - Mandatory bool `json:"mandatory"` + // Claims Path Pointer: + // ["name"] + // ["address", "street_address"] + // ["degrees", nil, "type"] + // ["nationalities", 1] + Path []any `json:"path"` + + Mandatory bool `json:"mandatory,omitempty"` } type AuthorizationDetails struct { - Type string `json:"type"` - CredentialConfigurationID string `json:"credential_configuration_id"` - CredentialIdentifiers []string `json:"credential_identifiers,omitempty"` - Claims []Claim `json:"claims,omitempty"` + Type string `json:"type"` + + Locations []string `json:"locations,omitempty"` + + CredentialConfigurationID string `json:"credential_configuration_id,omitempty"` + + // This field is returned in the Token Response. + CredentialIdentifiers []string `json:"credential_identifiers,omitempty"` + + Claims []Claim `json:"claims,omitempty"` } type OpenIdConfiguration struct { - Issuer string `json:"issuer"` - Authorization_Endpoint string `json:"authorization_endpoint"` - Token_Endpoint string `json:"token_endpoint"` - User_Endpoint string `json:"userinfo_endpoint"` - Jwks_Uri string `json:"jwks_uri"` - Scopes_Supported []string `json:"scopes_supported"` - Response_Types_Supported []string `json:"response_types_supported"` - Grant_Types_Supported []string `json:"grant_types_supported"` - Subject_Types_Supported []string `json:"subject_types_supported"` - Id_Token_Signing_Alg_Values_Supported []string `json:"id_token_signing_alg_values_supported"` - Id_Token_Encryption_Alg_Values_Supported []string `json:"id_token_encryption_alg_values_supported"` - Id_Token_Encryption_Enc_Values_Supported []string `json:"id_token_encryption_enc_values_supported"` - Token_Endpoint_Auth_Methods_Supported []string `json:"token_endpoint_auth_methods_supported"` - Token_Endpoint_Auth_Signing_Alg_Values_Supported []string `json:"token_endpoint_auth_signing_alg_values_supported"` - Claims_Parameter_Supported bool `json:"claims_parameter_supported"` - Request_Parameter_Supported bool `json:"request_parameter_supported"` - Request_Uri_Parameter_Supported bool `json:"request_uri_parameter_supported"` + Issuer string `json:"issuer"` + + AuthorizationEndpoint string `json:"authorization_endpoint,omitempty"` + TokenEndpoint string `json:"token_endpoint"` + + UserinfoEndpoint string `json:"userinfo_endpoint,omitempty"` + + JwksUri string `json:"jwks_uri,omitempty"` + + ScopesSupported []string `json:"scopes_supported,omitempty"` + ResponseTypesSupported []string `json:"response_types_supported,omitempty"` + GrantTypesSupported []string `json:"grant_types_supported,omitempty"` + SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` + + IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` + + IDTokenEncryptionAlgValuesSupported []string `json:"id_token_encryption_alg_values_supported,omitempty"` + IDTokenEncryptionEncValuesSupported []string `json:"id_token_encryption_enc_values_supported,omitempty"` + + TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"` + + TokenEndpointAuthSigningAlgValuesSupported []string `json:"token_endpoint_auth_signing_alg_values_supported,omitempty"` + + ClaimsParameterSupported bool `json:"claims_parameter_supported,omitempty"` + RequestParameterSupported bool `json:"request_parameter_supported,omitempty"` + RequestURIParameterSupported bool `json:"request_uri_parameter_supported,omitempty"` } -func (config *OpenIdConfiguration) GetToken(grantType GrantType, options map[string]interface{}) (*Token, error) { +type TokenRequestOptions struct { + PreAuthorizedCode string - if grantType == PreAuthorizedCodeGrant { + TxCode string - interval, ok := options["interval"].(int) + AuthorizationDetails []AuthorizationDetails +} - if ok { - if interval > 0 && interval < 10 { //be carefull with intervals from outside, can DDOS the system via link - time.Sleep(time.Second * time.Duration(interval)) - } else { - if interval > 10 { - interval = 5 - } - } - } +func (config *OpenIdConfiguration) GetToken( + grantType GrantType, + options TokenRequestOptions, +) (*Token, error) { - tx_code, ok := options["tx_code"].(string) + if config == nil { + return nil, errors.New("openid configuration is nil") + } - formData := url.Values{ - "grant_type": {string(grantType)}, - "pre-authorized_code": {options["code"].(string)}, - } + if config.TokenEndpoint == "" { + return nil, errors.New("token endpoint is missing") + } - if ok { - formData.Add("tx_code", tx_code) - } + switch grantType { - reader := strings.NewReader(formData.Encode()) + case PreAuthorizedCodeGrant: + return config.getPreAuthorizedCodeToken(options) - b, err := io.ReadAll(reader) + default: + return nil, fmt.Errorf( + "unsupported grant type: %s", + grantType, + ) + } +} - if err != nil { - return nil, err - } +func (config *OpenIdConfiguration) getPreAuthorizedCodeToken( + options TokenRequestOptions, +) (*Token, error) { - b, err = helper.Post(config.Token_Endpoint, b, helper.ApplicationUrlForm, nil) + if options.PreAuthorizedCode == "" { + return nil, errors.New( + "pre-authorized code is required", + ) + } + + formData := url.Values{ + "grant_type": { + string(PreAuthorizedCodeGrant), + }, + "pre-authorized_code": { + options.PreAuthorizedCode, + }, + } + + if options.TxCode != "" { + formData.Set( + "tx_code", + options.TxCode, + ) + } + if len(options.AuthorizationDetails) > 0 { + authorizationDetails, err := json.Marshal( + options.AuthorizationDetails, + ) if err != nil { - return nil, err + return nil, fmt.Errorf( + "could not marshal authorization_details: %w", + err, + ) } - var tokenReply Token + formData.Set( + "authorization_details", + string(authorizationDetails), + ) + } - err = json.Unmarshal(b, &tokenReply) + reader := strings.NewReader( + formData.Encode(), + ) - if err != nil { - return nil, err - } + body, err := io.ReadAll(reader) + if err != nil { + return nil, err + } + + body, err = helper.Post( + config.TokenEndpoint, + body, + helper.ApplicationUrlForm, + nil, + ) + if err != nil { + return nil, err + } + + var token Token + + if err := json.Unmarshal(body, &token); err != nil { + return nil, fmt.Errorf( + "could not unmarshal token response: %w", + err, + ) + } + + if token.AccessToken == "" { + return nil, errors.New( + "token response contains no access_token", + ) + } - return &tokenReply, nil + if token.TokenType == "" { + return nil, errors.New( + "token response contains no token_type", + ) } - return nil, errors.New("token request failed") + return &token, nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 7cf5dfc..93dec72 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -20,6 +20,9 @@ github.com/btcsuite/btcd/btcec # github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce ## explicit; go 1.14 github.com/btcsuite/btcutil/base58 +# github.com/bytedance/gopkg v0.1.4 +## explicit; go 1.18 +github.com/bytedance/gopkg/util/logger # github.com/cespare/xxhash/v2 v2.3.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 @@ -80,8 +83,6 @@ github.com/eclipse-xfsc/cloud-event-provider github.com/eclipse-xfsc/crypto-provider-core/v2 github.com/eclipse-xfsc/crypto-provider-core/v2/types github.com/eclipse-xfsc/crypto-provider-core/v2/types/proto -# github.com/eclipse-xfsc/crypto-provider-service v1.1.6 -## explicit; go 1.21.4 # github.com/eclipse-xfsc/did-core/v2 v2.1.0 ## explicit; go 1.24.0 github.com/eclipse-xfsc/did-core/v2 @@ -92,11 +93,11 @@ github.com/eclipse-xfsc/microservice-core-go/pkg/auth github.com/eclipse-xfsc/microservice-core-go/pkg/err github.com/eclipse-xfsc/microservice-core-go/pkg/graceful github.com/eclipse-xfsc/microservice-core-go/pkg/logr -# github.com/eclipse-xfsc/nats-message-library v1.4.3 +# github.com/eclipse-xfsc/nats-message-library v1.5.0 ## explicit; go 1.24.0 github.com/eclipse-xfsc/nats-message-library github.com/eclipse-xfsc/nats-message-library/common -# github.com/eclipse-xfsc/oid4-vci-vp-library v1.6.5 +# github.com/eclipse-xfsc/oid4-vci-vp-library v1.8.1 ## explicit; go 1.24.0 github.com/eclipse-xfsc/oid4-vci-vp-library/config github.com/eclipse-xfsc/oid4-vci-vp-library/helper @@ -117,8 +118,6 @@ github.com/eclipse/paho.golang/paho ## explicit; go 1.17 github.com/fsnotify/fsnotify github.com/fsnotify/fsnotify/internal -# github.com/getkin/kin-openapi v0.133.0 -## explicit; go 1.22.5 # github.com/go-chi/chi/v5 v5.3.0 ## explicit; go 1.23 github.com/go-chi/chi/v5 @@ -135,10 +134,6 @@ github.com/go-logr/logr/slogr # github.com/go-logr/zapr v1.3.0 ## explicit; go 1.18 github.com/go-logr/zapr -# github.com/go-openapi/jsonpointer v0.21.1 -## explicit; go 1.20 -# github.com/go-openapi/swag v0.23.1 -## explicit; go 1.20 # github.com/go-viper/mapstructure/v2 v2.4.0 ## explicit; go 1.18 github.com/go-viper/mapstructure/v2 @@ -164,8 +159,6 @@ github.com/golang/protobuf/ptypes/timestamp # github.com/golang/snappy v0.0.4 ## explicit github.com/golang/snappy -# github.com/google/go-cmp v0.7.0 -## explicit; go 1.21 # github.com/google/tink/go v1.7.0 ## explicit; go 1.17 github.com/google/tink/go/aead @@ -382,8 +375,6 @@ github.com/jcmturner/rpc/v2/ndr # github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a ## explicit github.com/jinzhu/copier -# github.com/josharian/intern v1.0.0 -## explicit; go 1.5 # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go @@ -404,10 +395,6 @@ github.com/klauspost/compress/internal/cpuinfo github.com/klauspost/compress/internal/snapref github.com/klauspost/compress/zstd github.com/klauspost/compress/zstd/internal/xxhash -# github.com/kr/pretty v0.3.1 -## explicit; go 1.12 -# github.com/kr/text v0.2.0 -## explicit # github.com/lestrrat-go/blackmagic v1.0.4 ## explicit; go 1.23 github.com/lestrrat-go/blackmagic @@ -448,8 +435,6 @@ github.com/lestrrat-go/jwx/v2/x25519 # github.com/lestrrat-go/option v1.0.1 ## explicit; go 1.16 github.com/lestrrat-go/option -# github.com/mailru/easyjson v0.9.0 -## explicit; go 1.20 # github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d ## explicit github.com/manveru/faker @@ -471,8 +456,6 @@ github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.2 ## explicit; go 1.12 github.com/modern-go/reflect2 -# github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 -## explicit # github.com/mr-tron/base58 v1.2.0 ## explicit; go 1.12 github.com/mr-tron/base58/base58 @@ -503,10 +486,6 @@ github.com/nats-io/nkeys # github.com/nats-io/nuid v1.0.1 ## explicit github.com/nats-io/nuid -# github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 -## explicit; go 1.22.5 -# github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 -## explicit; go 1.22.5 # github.com/pelletier/go-toml/v2 v2.2.4 ## explicit; go 1.21.0 github.com/pelletier/go-toml/v2 @@ -514,8 +493,6 @@ github.com/pelletier/go-toml/v2/internal/characters github.com/pelletier/go-toml/v2/internal/danger github.com/pelletier/go-toml/v2/internal/tracker github.com/pelletier/go-toml/v2/unstable -# github.com/perimeterx/marshmallow v1.1.5 -## explicit; go 1.17 # github.com/pierrec/lz4/v4 v4.1.21 ## explicit; go 1.14 github.com/pierrec/lz4/v4 @@ -611,10 +588,6 @@ github.com/subosito/gotenv ## explicit; go 1.13 github.com/teserakt-io/golang-ed25519/edwards25519 github.com/teserakt-io/golang-ed25519/extra25519 -# github.com/ugorji/go/codec v1.2.12 -## explicit; go 1.11 -# github.com/woodsbury/decimal128 v1.3.0 -## explicit; go 1.21 # github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb ## explicit github.com/xeipuuv/gojsonpointer @@ -847,8 +820,6 @@ google.golang.org/protobuf/types/gofeaturespb google.golang.org/protobuf/types/known/anypb google.golang.org/protobuf/types/known/durationpb google.golang.org/protobuf/types/known/timestamppb -# gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c -## explicit; go 1.11 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3