diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f8401ac2ef5d179ad9d42123c26e0618e2941e4..de2705db92c21b7a18992f77480bd7198aeb5467 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ lint: before_script: [] unit tests: - image: golang:1.20.3 + image: golang:1.20.4 extends: .gotest stage: test tags: @@ -39,7 +39,7 @@ unit tests: coverage: '/total:\s+\(statements\)\s+(\d+.\d+\%)/' govulncheck: - image: golang:1.20.3 + image: golang:1.20.4 stage: test tags: - amd64-docker diff --git a/deployment/ci/Dockerfile b/deployment/ci/Dockerfile index a3c8284bd95c0a1a0dba923591684f1be04fd4e2..0056026699e38f15e4eca2e7e9eae34b5450873c 100644 --- a/deployment/ci/Dockerfile +++ b/deployment/ci/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.3-alpine3.17 as builder +FROM golang:1.20.4-alpine3.17 as builder RUN apk add git diff --git a/deployment/compose/Dockerfile b/deployment/compose/Dockerfile index 0b2fba5fd0ffa964261da31d4b4a10a7eb6bbff5..6d5a293fd170e706f62ad3399c878996a7b535d9 100644 --- a/deployment/compose/Dockerfile +++ b/deployment/compose/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.3 +FROM golang:1.20.4 RUN go install github.com/ysmood/kit/cmd/guard@v0.25.11 diff --git a/go.mod b/go.mod index 36de566f3502a3530b6aa0f088a078cbc2b4ced9..f5baa095cbb15eaf5dd4538761735b834e8b5409 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-policy-agent/opa v0.44.0 github.com/prometheus/client_golang v1.13.0 github.com/stretchr/testify v1.8.0 - gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib v1.1.2-0.20230405150435-e1958486a0d7 + gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib v1.3.0 go.mongodb.org/mongo-driver v1.10.2 go.uber.org/zap v1.23.0 goa.design/goa/v3 v3.8.5 diff --git a/go.sum b/go.sum index a1156da832c03468ac929d37c2ae5c8f777960d3..a8352092abec042aee4eaf6994919a7894b71e14 100644 --- a/go.sum +++ b/go.sum @@ -313,8 +313,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea h1:CyhwejzVGvZ3Q2PSbQ4NRRYn+ZWv5eS1vlaEusT+bAI= github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea/go.mod h1:eNr558nEUjP8acGw8FFjTeWvSgU1stO7FAO6eknhHe4= -gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib v1.1.2-0.20230405150435-e1958486a0d7 h1:yH8W7ob/yP4P3Q+TSIFdpkVc9Oa52DQkYqXW/Ih0JdY= -gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib v1.1.2-0.20230405150435-e1958486a0d7/go.mod h1:0y0nhsIVlNFwyIopCi4FLZZuJK+aTP80p4KFRS4MlHA= +gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib v1.3.0 h1:bs8twt57vzwsCOxCRFj9zPC8x++IGpF22eGIFJoXyG8= +gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib v1.3.0/go.mod h1:0y0nhsIVlNFwyIopCi4FLZZuJK+aTP80p4KFRS4MlHA= go.mongodb.org/mongo-driver v1.10.2 h1:4Wk3cnqOrQCn0P92L3/mmurMxzdvWWs5J9jinAVKD+k= go.mongodb.org/mongo-driver v1.10.2/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= diff --git a/internal/regofunc/ocm.go b/internal/regofunc/ocm.go index 519a9d5cdc7f55374c677ba0ea91e33736af403d..b649d032b3d7dae4b7cf8d4e3f913de474656446 100644 --- a/internal/regofunc/ocm.go +++ b/internal/regofunc/ocm.go @@ -71,7 +71,7 @@ func (of *OcmFuncs) GetLoginProofInvitation() (*rego.Function, rego.Builtin2) { var val ast.Value val, err = ast.InterfaceToValue(result{ Link: res.Data.PresentationMessage, - RequestID: res.Data.PresentationID, + RequestID: res.Data.ProofRecordID, }) if err != nil { return nil, err @@ -109,7 +109,7 @@ func (of *OcmFuncs) SendPresentationRequest() (*rego.Function, rego.Builtin1) { var val ast.Value val, err = ast.InterfaceToValue(result{ Link: res.Data.PresentationMessage, - RequestID: res.Data.PresentationID, + RequestID: res.Data.ProofRecordID, }) if err != nil { return nil, err @@ -142,8 +142,8 @@ func (of *OcmFuncs) GetLoginProofResult() (*rego.Function, rego.Builtin1) { } claims := map[string]interface{}{} - for _, cred := range res.Data.Data { - for cName, cValue := range cred.Claims { + for _, pres := range res.Data.Presentations { + for cName, cValue := range pres.Claims { claims[cName] = cValue } } diff --git a/internal/regofunc/ocm_test.go b/internal/regofunc/ocm_test.go index 7d6ffbea35ea59d1d0c7574c00e63aa5e941c57a..4dd7904f9c8bb5f78b9280001b705f279e5bf946 100644 --- a/internal/regofunc/ocm_test.go +++ b/internal/regofunc/ocm_test.go @@ -20,7 +20,7 @@ func TestGetLoginProofInvitationSuccess(t *testing.T) { "statusCode": 201, "message": "Presentation request send successfully", "data": { - "presentationId": "2cf01406-b15f-4960-a6a7-7bc62cd37a3c", + "proofRecordId": "2cf01406-b15f-4960-a6a7-7bc62cd37a3c", "presentationMessage": "https://ocm:443/ocm/didcomm/?d_m=eyJAdHlwZSI" } }` @@ -112,7 +112,7 @@ func TestSendPresentationRequestSuccess(t *testing.T) { "statusCode": 201, "message": "Presentation request send successfully", "data": { - "presentationId": "2cf01406-b15f-4960-a6a7-7bc62cd37a3c", + "proofRecordId": "2cf01406-b15f-4960-a6a7-7bc62cd37a3c", "presentationMessage": "https://ocm:443/ocm/didcomm/?d_m=eyJAdHlwZSI" } }` diff --git a/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/errors/errors.go b/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/errors/errors.go index 2f1c0906a3da5f9b860c2587f9c5fdf9b18798b1..ffa1f25018d04aad8a8e7d1aee8c1585edda98e1 100644 Binary files a/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/errors/errors.go and b/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/errors/errors.go differ diff --git a/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/ocm/client.go b/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/ocm/client.go index 4d1b2fa5ba4f04a1cc49a8e6a443960ba927688a..4d8674af1f01dc844711c0cf0bec3539f9b82ab8 100644 Binary files a/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/ocm/client.go and b/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/ocm/client.go differ diff --git a/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/ocm/types.go b/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/ocm/types.go index 4cda32299bd08399fc4b8d2047b90032a6f1c1b8..9a26a0e047077513f95ca7918e72f21a25945f1f 100644 Binary files a/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/ocm/types.go and b/vendor/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/ocm/types.go differ diff --git a/vendor/modules.txt b/vendor/modules.txt index 901ac4eeb5d1afaeec565e93725e74ec7063d38e..dc2d5fe59a53cb0176921db2ec06de888dee58d7 100644 Binary files a/vendor/modules.txt and b/vendor/modules.txt differ