diff --git a/test/integration/cli/go.mod b/test/integration/cli/go.mod index e8630075..ec9904ad 100644 --- a/test/integration/cli/go.mod +++ b/test/integration/cli/go.mod @@ -20,7 +20,7 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.23.0 // indirect - golang.org/x/net v0.31.0 // indirect + golang.org/x/net v0.32.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/test/integration/cli/go.sum b/test/integration/cli/go.sum index aba39f35..27dc15a5 100644 --- a/test/integration/cli/go.sum +++ b/test/integration/cli/go.sum @@ -45,13 +45,13 @@ go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/test/integration/fixtures/.env b/test/integration/fixtures/.env index ac55f355..2249ee52 100644 --- a/test/integration/fixtures/.env +++ b/test/integration/fixtures/.env @@ -6,7 +6,7 @@ # vc services VC_REST_IMAGE=ghcr.io/trustbloc-cicd/vc-server -VC_REST_IMAGE_TAG=v1.11.1-snapshot-ef7a658 +VC_REST_IMAGE_TAG=v1.11.1-snapshot-4106ae8 # Remote JSON-LD context provider CONTEXT_PROVIDER_URL=https://file-server.trustbloc.local:10096/ld-contexts.json diff --git a/test/integration/fixtures/profile/profiles.json b/test/integration/fixtures/profile/profiles.json index b2bb2c0f..92cf9e5f 100644 --- a/test/integration/fixtures/profile/profiles.json +++ b/test/integration/fixtures/profile/profiles.json @@ -873,6 +873,138 @@ }, "createDID": true }, + { + "issuer": { + "id": "university_degree_issuer_jwt", + "version": "v1.0", + "groupID": "group_university_degree_issuer", + "name": "University Degree Issuer", + "organizationID": "f13d1va9lp403pb9lyj89vk55", + "url": "http://localhost:8075", + "active": true, + "vcConfig": { + "signingAlgorithm": "JsonWebSignature2020", + "signatureRepresentation": 0, + "keyType": "ED25519", + "format": "jwt", + "didMethod": "ion", + "status": { + "type": "StatusList2021Entry" + } + }, + "oidcConfig": { + "client_id": "7d4u50e7w6nfq8tfayhzplgjf", + "client_secret_handle": "282ks4fkuqfosus5k0x30abnv", + "issuer_well_known": "http://cognito-mock.trustbloc.local:9229/local_5a9GzRvB/.well-known/openid-configuration", + "scopes_supported": [ + "openid", + "profile" + ], + "grant_types_supported": [ + "urn:ietf:params:oauth:grant-type:pre-authorized_code" + ], + "response_types_supported": [ + "code" + ], + "token_endpoint_auth_methods_supported": [ + "none" + ], + "pre-authorized_grant_anonymous_access_supported": true + }, + "credentialTemplates": [ + { + "contexts": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1" + ], + "type": "UniversityDegreeCredential", + "id": "templateID", + "issuer": "did:ion:university_degree_issuer_jwt", + "checks": { + "strict": false + } + } + ], + "credentialMetadata": { + "credential_configurations_supported": { + "UniversityDegreeCredential_jwt_vc": { + "format": "jwt_vc_json", + "credential_definition": { + "type": [ + "VerifiableCredential", + "UniversityDegreeCredential" + ], + "credentialSubject": { + "familyName": { + "display": [ + { + "name": "Family Name", + "locale": "en-US" + } + ], + "value_type": "string" + }, + "givenName": { + "display": [ + { + "name": "Given Name", + "locale": "en-US" + } + ], + "value_type": "string" + }, + "degree": { + "display": [ + { + "name": "Degree", + "locale": "en-US" + } + ], + "value_type": "string" + }, + "photo": { + "display": [ + { + "name": "Photo" + } + ], + "value_type": "image" + }, + "degreeSchool": { + "display": [ + { + "name": "Degree School", + "locale": "en-US" + } + ], + "value_type": "string" + } + } + }, + "cryptographic_binding_methods_supported": [ + "did" + ], + "credential_signing_alg_values_supported": [ + "JsonWebSignature2020" + ], + "display": [ + { + "name": "University Degree Credential", + "locale": "en-US", + "logo": { + "uri": "https://example.com/public/logo.png", + "alt_text": "a square logo of a degree verification" + }, + "background_color": "#12107c", + "text_color": "#FFFFFF" + } + ] + } + } + } + }, + "createDID": true + }, { "issuer": { "id": "university_degree_issuer_bbs", @@ -1439,6 +1571,105 @@ }, "createDID": true }, + { + "verifier": { + "id": "v_ldp_university_degree_v2", + "version": "v1.0", + "name": "v_ldp_university_degree_v2", + "organizationID": "f13d1va9lp403pb9lyj89vk55", + "url": "https://test-verifier.com", + "active": true, + "webHook": "http://vcs.webhook.example.com:8180", + "checks": { + "credential": { + "format": [ + "ldp" + ], + "proof": true + }, + "presentation": { + "format": [ + "ldp", + "jwt" + ], + "vcSubject": true, + "proof": true + } + }, + "oidcConfig": { + "roSigningAlgorithm": "JsonWebSignature2020", + "keyType": "ED25519", + "didMethod": "ion" + }, + "presentationDefinitions": [ + { + "id": "32f54163-7166-48f1-93d8-ff217bdb0653", + "format": { + "ldp_vc": { + "proof_type": [ + "JsonWebSignature2020" + ] + }, + "ldp_vp": { + "proof_type": [ + "JsonWebSignature2020" + ] + } + }, + "input_descriptors": [ + { + "id": "degree", + "name": "Degree", + "purpose": "We can only hire with university degree.", + "constraints": { + "fields": [ + { + "path": [ + "$['@context']" + ], + "filter": { + "type": "array", + "allOf": [ + { + "contains": { + "type": "string", + "const": "https://www.w3.org/ns/credentials/v2" + } + }, + { + "contains": { + "type": "string", + "const": "https://www.w3.org/ns/credentials/examples/v2" + } + } + ] + } + }, + { + "path": [ + "$['type']" + ], + "filter": { + "type": "array", + "allOf": [ + { + "contains": { + "type": "string", + "const": "UniversityDegreeCredential" + } + } + ] + } + } + ] + } + } + ] + } + ] + }, + "createDID": true + }, { "verifier": { "id": "v_ldp_university_degree_sd_bbs", @@ -1523,6 +1754,95 @@ }, "createDID": true }, + { + "verifier": { + "id": "v_jwt_university_degree", + "version": "v1.0", + "name": "v_jwt_university_degree", + "organizationID": "f13d1va9lp403pb9lyj89vk55", + "url": "https://test-verifier.com", + "active": true, + "webHook": "http://vcs.webhook.example.com:8180", + "checks": { + "credential": { + "format": [ + "jwt" + ], + "proof": true, + "status": true + }, + "presentation": { + "format": [ + "jwt" + ], + "vcSubject": true, + "proof": true + } + }, + "oidcConfig": { + "roSigningAlgorithm": "JsonWebSignature2020", + "keyType": "ED25519", + "didMethod": "ion" + }, + "presentationDefinitions": [ + { + "id": "6eca10b3-7e68-4ce5-bc19-4bd8aa464fc3", + "input_descriptors": [ + { + "id": "e17655ff-e769-43fb-8e20-e72e7501aedd", + "name": "Degree", + "purpose": "We can only hire with university degree.", + "constraints": { + "fields": [ + { + "path": [ + "$.issuer", + "$.iss" + ], + "filter": { + "type": "string", + "pattern": "^did:ion:[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+$" + } + }, + { + "path": [ + "$.credentialStatus", + "$.vc.credentialStatus" + ] + }, + { + "path": [ + "$.expirationDate", + "$.exp" + ], + "filter": { + "type": "number", + "minimum": 1733839361 + } + }, + { + "path": [ + "$.vc.credentialSubject.degreeSchool" + ], + "filter": { + "type": "string", + "const": "MIT school" + } + } + ] + }, + "schema": [ + { + "uri": "VerifiableCredential" + } + ] + } + ] + } + ] + }, + "createDID": true + }, { "verifier": { "id": "v_myprofile_ldp", diff --git a/test/integration/go.mod b/test/integration/go.mod index b74e11de..21e33983 100644 --- a/test/integration/go.mod +++ b/test/integration/go.mod @@ -80,11 +80,11 @@ require ( go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.29.0 // indirect + golang.org/x/crypto v0.30.0 // indirect golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect - golang.org/x/net v0.31.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/text v0.20.0 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/test/integration/go.sum b/test/integration/go.sum index 47dd2c48..ec54bd3b 100644 --- a/test/integration/go.sum +++ b/test/integration/go.sum @@ -199,15 +199,15 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -215,12 +215,12 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= diff --git a/test/integration/openid4vp_test.go b/test/integration/openid4vp_test.go index cda12f9a..5b36e1e6 100644 --- a/test/integration/openid4vp_test.go +++ b/test/integration/openid4vp_test.go @@ -111,6 +111,12 @@ func TestOpenID4VPFullFlow(t *testing.T) { walletDIDMethod: "ion", verifierProfileID: "v_ldp_university_degree", }, + { + issuerProfileIDs: []string{"university_degree_issuer_jwt"}, + claimData: []claimData{universityDegreeClaims}, + walletDIDMethod: "ion", + verifierProfileID: "v_jwt_university_degree", + }, { issuerProfileIDs: []string{"bank_issuer"}, claimData: []claimData{verifiableEmployeeClaims}, @@ -183,6 +189,12 @@ func TestOpenID4VPFullFlow(t *testing.T) { walletDIDMethod: "ion", verifierProfileID: "v_ldp_university_degree", }, + { + issuerProfileIDs: []string{"university_degree_issuer_v2"}, + claimData: []claimData{universityDegreeClaims}, + walletDIDMethod: "jwk", + verifierProfileID: "v_ldp_university_degree_v2", + }, } var traceIDs []string