Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for VPs for both selfDescriptions and service-offerings #6

Open
wants to merge 182 commits into
base: sphereon-2206-unreleased
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
a914416
build: update branches in gitlab-ci
oceanByte Oct 26, 2022
9db2465
build: update branches and routes
oceanByte Oct 26, 2022
d86c3ba
build: update branches and routes
oceanByte Oct 26, 2022
36d5cc6
refactor: use config module facade
ruslanguns Oct 29, 2022
6d8f217
feat: support validation schema
ruslanguns Oct 29, 2022
81fe372
fix: env e2e fixture to mock environments
ruslanguns Oct 29, 2022
cc9cd98
test: skip outdated test
oceanByte Nov 2, 2022
51f5d44
build: npm audit fix
oceanByte Nov 2, 2022
ee9ce1d
[docs] Update links to latest release
Nov 2, 2022
a07d919
Merge branch 'doc_update' into 'development'
oceanByte Nov 2, 2022
a28181c
Update k8s development file
3xz1 Nov 2, 2022
bf4b4cd
Update deployment file
3xz1 Nov 2, 2022
9b90e89
Update deployment files
3xz1 Nov 2, 2022
db89525
Update GlobalPrefix path
3xz1 Nov 2, 2022
7b4fc36
Update SWAGGER_UI_PATH
3xz1 Nov 2, 2022
146b313
refactor: change version to 'latest'
oceanByte Nov 2, 2022
88e8bd5
Merge branch 'development' into 'main'
oceanByte Nov 2, 2022
df54278
Merge branch 'development'
oceanByte Nov 2, 2022
ecd5e21
refactor: update openapi
oceanByte Nov 2, 2022
1f9be39
ci: disabled testing
ruslanguns Nov 4, 2022
5b5adf7
Merge branch 'feat/24-add-env-validations' into 'development'
oceanByte Nov 4, 2022
4d5287e
Feature/cross platform
aru-bartoccioni Nov 7, 2022
2dc874b
Merge branch 'feature/cross-platform' into 'development'
oceanByte Nov 7, 2022
69bacc7
Feat/local self signed certificates
Abrom8 Nov 9, 2022
f9d845b
Merge branch 'feat/local-self-signed-certificates' into 'development'
oceanByte Nov 9, 2022
9ad2822
Update README.md
Abrom8 Nov 9, 2022
f71db3b
Merge branch 'docs/update-readme-signer-tool-env' into 'development'
oceanByte Nov 9, 2022
071be72
docs: update readme for self-issued certificates
Abrom8 Nov 22, 2022
902ed76
Merge branch 'feat/update-readme-self-issued-certificates' into 'deve…
oceanByte Nov 22, 2022
fdb29da
refactor: make X509_CERTIFICATE optional
oceanByte Dec 10, 2022
5603c79
feat: added two main functions for onboarding participant and service…
ksadjad Dec 16, 2022
d159856
Update default config for dev setup
Jan 10, 2023
2f3ecb0
Merge branch 'local_env_update' into 'development'
ticapix Jan 10, 2023
7e2daab
feat: added two main functions for validating participant and service…
sksadjad Jan 14, 2023
d7dd671
feat: (WIP) added a signature suite for creating and validating proof…
sksadjad Jan 17, 2023
257c8ec
feat: added a test class for new signature suite
sksadjad Jan 17, 2023
00a0038
chore(Alg): update alg to be RS256
nklomp Jan 19, 2023
ad3985e
Refactoring, performance test, validation modification
hfaure-geors Jan 19, 2023
284b759
chore(suite): remove temp Signature Suite
nklomp Jan 19, 2023
eb0549a
add tests
Jan 19, 2023
b4bf353
VCverif + CSR10
hfaure-geors Jan 19, 2023
8de725b
VCverif + CSR10
hfaure-geors Jan 19, 2023
1ae7c28
chore(suite): remove temp Signature Suite
nklomp Jan 20, 2023
e4b84a5
CheckDID
hfaure-geors Jan 20, 2023
0125310
Fix axios http call
hfaure-geors Jan 20, 2023
b7878d4
change dockerFile and fix bug axios
Jan 20, 2023
8a0d922
Fix CPR08 issue
hfaure-geors Jan 20, 2023
87069ac
fix: fixed build failure
sksadjad Jan 20, 2023
95a047b
FMA-35 Deploy the compliance service with VP verification
Jan 20, 2023
f17c850
FMA-35 Deploy the compliance service with VP verification
Jan 20, 2023
8e10c38
clean
Jan 20, 2023
0b71f6c
HTTPCheck DidCheck service-offering
hfaure-geors Jan 20, 2023
83e84cb
HTTPCheck DidCheck service-offering
hfaure-geors Jan 20, 2023
6d0bf06
Merge pull request #8 from Sphereon/feature/FMA-35/x509CertificateChain
zoemaas Jan 20, 2023
f9ba11e
update:CSR-10
hfaure-geors Jan 20, 2023
2c9d212
update:CSR-10
hfaure-geors Jan 20, 2023
61246cf
fix http-code and checkDid
Jan 20, 2023
67c7a42
Merge branch '2210-Henry' of https://gitlab.com/gaia-x/lab/compliance…
Jan 20, 2023
f753564
[docs] Add contributor guide
Jan 23, 2023
4f4609d
Merge branch 'docs/add_contributor_guide' into 'development'
ticapix Jan 23, 2023
a3ceff4
fix: added support for creating ComplianceCredential for service-offe…
sksadjad Jan 23, 2023
7752d73
fix: fixed the verification method for complianceCredential
sksadjad Jan 23, 2023
3fb8506
Last-branch-commit - Verification optimization
hfaure-geors Jan 23, 2023
80f71c0
feat: wip added schema to complianceCredential
sksadjad Jan 25, 2023
59c6795
fix: changed the schema to point to github
sksadjad Jan 25, 2023
88c998e
FMA-35 Deploy the compliance service with VP verification
Jan 25, 2023
df54dbc
Merge branch 'feature/FMA-7' of github.com:Sphereon/gx-compliance int…
Jan 25, 2023
585114b
FMA-35 Deploy the compliance service with VP verification
Jan 25, 2023
d11d1c5
Merge pull request #10 from Sphereon/feature/FMA-35/x509CertificateChain
zoemaas Jan 25, 2023
6c282b2
fix: reverted the schema change in creating complianceCredential
sksadjad Jan 26, 2023
3afbc87
fix: misc fixes, making the conformance working
nklomp Jan 26, 2023
f9106c5
feat: added issuance of complianceCredential for fma ecosystem
sksadjad Jan 26, 2023
bc409c6
feat: add singapore iso3166-2 codes
Abrom8 Jan 26, 2023
582dd81
Merge branch 'feat/add-singapore-iso-codes' into 'development'
oceanByte Jan 27, 2023
87948ac
Add info on the online service
Jan 27, 2023
3d8c786
Merge branch 'docs/add_service_info' into 'development'
Jan 27, 2023
9f60186
feat: added onboard api for participants and some fixes for vp transf…
sksadjad Jan 27, 2023
80074b8
chore: renamed the method, removed usused query param
sksadjad Jan 27, 2023
583ae09
Merge pull request #11 from Sphereon/feature/FMA-37
sksadjad Jan 27, 2023
6f792ce
Code cleaning
hfaure-geors Jan 30, 2023
6d7dd85
Code cleaning
hfaure-geors Jan 30, 2023
9c7c6e9
Add example.env to brannch
hfaure-geors Jan 30, 2023
bfd1b96
Add unit tests participant and serviceOffering
Feb 2, 2023
d8d6804
chore: renamed changes with 2210VP postfix, reverted the original gx …
sksadjad Feb 2, 2023
69e0102
chore: reverted the change in gx-compliance-server-ingress
sksadjad Feb 2, 2023
679ec19
chore: reverted the change in gx-compliance-server-ingress
sksadjad Feb 2, 2023
707c6c5
chore: reverted the change in docs/package.json
sksadjad Feb 2, 2023
0055a3a
chore: reverted change in @types/index
sksadjad Feb 2, 2023
515b9c4
chore: reverted the common controlller changes
sksadjad Feb 2, 2023
44ad367
chore: reverted the common controlller changes
sksadjad Feb 2, 2023
7a57573
chore: fixed the path in common-2210vp controller
sksadjad Feb 2, 2023
e2cf151
chore: reverted small unimportant changes
sksadjad Feb 2, 2023
3995ad9
chore: (WIP) separated vp logic from existing compliance code
sksadjad Feb 2, 2023
73de972
chore: (WIP) added ssi schema and used that, reverted the changes in …
sksadjad Feb 2, 2023
ed47045
chore: (WIP) reverted the changes in did util
sksadjad Feb 2, 2023
c525c63
chore: (WIP) reverted the changes in so content validation service
sksadjad Feb 2, 2023
ef5950d
chore: reverted self-description util
sksadjad Feb 2, 2023
0291d07
chore: reverted content-validation
sksadjad Feb 2, 2023
d2fbd35
Merge remote-tracking branch 'upstream/2210-Henry' into feature/FMA-40
sksadjad Feb 2, 2023
47204b6
fix: fixed problems after merge with remote branch, fixed compliance api
sksadjad Feb 5, 2023
419dc06
fix: onboard api for participant fixed
sksadjad Feb 5, 2023
ea2d290
Fix: Resolve merge conflict between branch 2210-Henry and dev
hfaure-geors Feb 6, 2023
a1c18a8
Merge branch 'Fix/Add-2210-Features' into 'development'
ticapix Feb 6, 2023
38df84c
Fix: Integration registry lab
hfaure-geors Feb 7, 2023
09f0d6d
Merge branch 'Fix/integration-issue' into 'development'
ticapix Feb 7, 2023
d212166
Update development-deployment.yaml to add imagePullPolicy: Always
ympondaven Feb 7, 2023
c73dcb6
Merge branch 'yves-marie-development-patch-51639' into 'development'
ympondaven Feb 7, 2023
e58c2a6
Fix(for now)-Remove signature check
hfaure-geors Feb 7, 2023
58a8960
Merge branch 'Fix/remove-signature' into 'development'
ympondaven Feb 7, 2023
a2c4531
fix to add pollpolicy a always
ympondaven Feb 8, 2023
6b38bc5
add tests
oriana13 Feb 8, 2023
a756d52
Merge branch 'dev' into 'development'
hfaure-geors Feb 8, 2023
fe613ac
fix yaml file
ympondaven Feb 8, 2023
7a9fba5
Fix/Re enable signature verification
hfaure-geors Feb 8, 2023
176b8b4
Merge branch 'Fix/Enable-Signature' into 'development'
ympondaven Feb 8, 2023
9b40cb2
feat: getting participant and service offering compliance credential …
sksadjad Feb 10, 2023
eff75d3
chore: removed sphereon k8s files
sksadjad Feb 10, 2023
946a11b
chore: reverted the unused change
sksadjad Feb 10, 2023
b37f46e
fix: hosting static files dir wrong
nklomp Feb 14, 2023
c41b98a
fix: we were not using the 2210vp did utils
nklomp Feb 14, 2023
df33041
feat: using the new context for compliance credentials
sksadjad Feb 14, 2023
d642b95
fix: missing deps
nklomp Feb 14, 2023
def54d9
fix: missing properties in DID VM
nklomp Feb 14, 2023
6396899
feat: update DID doc generation
nklomp Feb 14, 2023
6a7724b
Description: Fix shape retrieval route (to match registry exposed rou…
hfaure-geors Feb 15, 2023
a6d1c8e
Merge branch 'feat/integration-latest-route-change-registry' into 'de…
ympondaven Feb 15, 2023
9ec7bc7
add dynamic routes
oriana13 Feb 15, 2023
a524793
Merge branch 'dev' into 'development'
ympondaven Feb 15, 2023
1a2ef39
Merge pull request #13 from Sphereon/feature/FMA-40
nklomp Feb 15, 2023
03938b3
feat: made some changes to enable verification in /verify/raw partici…
sksadjad Feb 16, 2023
6682f4f
fix: updated the example for verify/raw in v2210vp participant api
sksadjad Feb 16, 2023
eb46141
feat: added and modified verify/raw api for service-offerings
sksadjad Feb 16, 2023
756f399
Feat: Add a new /api/verify route - TAG-41
hfaure-geors Feb 17, 2023
e3af423
Merge branch 'feat/unify-verify' into 'development'
ympondaven Feb 17, 2023
bf4ff42
Update src/methods/common/selfDescription.2210vp.service.ts
sksadjad Feb 17, 2023
b903888
chore: deleted unwanted file
sksadjad Feb 17, 2023
a832c6d
chore: renamed a variable to make the code more readable
sksadjad Feb 17, 2023
ab1ea44
Feat Add content verification for compliance credential issuance + Fi…
hfaure-geors Feb 17, 2023
19edf74
Merge branch 'feat/implement-content-validation-issuance-compliance-c…
ympondaven Feb 17, 2023
53aec11
Feat/integration-test + Fix: test data / /api/verify method
hfaure-geors Feb 20, 2023
1900ad5
Merge branch 'feat/integration-testing-new-routes' into 'development'
hfaure-geors Feb 20, 2023
79fadad
feat: added verify method to 2210vp apis (participant and SO)
sksadjad Feb 23, 2023
e705210
Merge pull request #17 from Sphereon/feature/FMA-52
sksadjad Feb 23, 2023
7d6a6c8
feat: added a wrapper for old version of gx participant and SOs handl…
sksadjad Feb 28, 2023
a15f312
chore: add helm charts to deploy application
Mar 1, 2023
e125629
Merge branch 'chore/deploy-branches-on-new-cluster' into 'development'
Mar 1, 2023
93dc60b
Feat: unit test fixing + Data export fixing
hfaure-geors Mar 1, 2023
9c0d2a2
Merge branch 'feat/extend-shape-verif' into 'development'
ympondaven Mar 1, 2023
5084901
Merge pull request #18 from Sphereon/feature/FMA-63
sksadjad Mar 1, 2023
0a5fca8
Merge pull request #16 from Sphereon/feature/FMA-47
sksadjad Mar 1, 2023
079034e
fix: after merge
sksadjad Mar 1, 2023
cf4b77e
feat: added dcat dataset to types
sksadjad Mar 2, 2023
916cbf7
feat: added logic for recognizing dcat dataset
sksadjad Mar 2, 2023
fa6869b
feat: modified the fallback url for registry to sphereon's registry
sksadjad Mar 2, 2023
f0430a7
fix: serve static files from app_path and not only root
Mar 2, 2023
b036029
chore: force container to be redeployed even on same image name
Mar 2, 2023
b129633
chore: allows root to display infos from development version
Mar 2, 2023
80b3b04
chore: env variables key and x509 cert from secrets
Mar 2, 2023
08e83b3
chore: use dev registry for the moment
Mar 2, 2023
f11c3d9
chore: pass cert and keys from CI
Mar 2, 2023
5296ede
chore: pass cert and keys from CI
Mar 2, 2023
64a7979
Fix/Swagger verify function
hfaure-geors Mar 2, 2023
21bc45b
Merge branch 'fix/swagger-verify' into 'development'
hfaure-geors Mar 2, 2023
68f48a5
feat: detect dcat DataService. Update detection of datasat and matchi…
nklomp Mar 5, 2023
9a60240
fix: added did doc check alongside the url check
sksadjad Mar 6, 2023
41506bb
Convert privateKey to PKCS8
oriana13 Mar 6, 2023
e87774d
Merge branch 'dev' into 'development'
hfaure-geors Mar 6, 2023
f2b89e5
fix: changed the logic of hasGxComplianceCredential to check for the …
sksadjad Mar 6, 2023
4a668f6
Fix: did doc / import valid certificate chain
hfaure-geors Mar 6, 2023
f0fe2d2
Merge branch 'Use-valid-certificate' into 'development'
oriana13 Mar 6, 2023
155e0d3
add variable TLS and rename x509_CERTIFICATE into publicKey
ympondaven Mar 6, 2023
38bb770
Update deployment.yaml
ympondaven Mar 6, 2023
ebad844
Merge branch 'development' into feature/FMA-66
sksadjad Mar 6, 2023
04f7be8
feat: fixed code after merge
sksadjad Mar 8, 2023
bb82199
fix: remvoed replacing new lines in certificate
sksadjad Mar 8, 2023
722ec52
fix: fixed problems after merge with develop
sksadjad Mar 9, 2023
f6d3906
Merge pull request #21 from Sphereon/feat/FMA-68
sksadjad Mar 9, 2023
bcb8bc0
chore: prettier
sksadjad Mar 9, 2023
1f6d730
feat: changed the algorithm from RS256 to PS256
sksadjad Mar 9, 2023
a84240c
Merge pull request #22 from Sphereon/feature/FMA-70
sksadjad Mar 10, 2023
b342d53
Revert "feat: changed the algorithm from RS256 to PS256"
nklomp May 24, 2023
46ac45a
Revert "chore: prettier"
nklomp May 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Code cleaning
Description: Removal of performance metrics to prepare merge with dev branch

Signed-off-by: hfaure-geors <henry.faure-geors@atos.net>
  • Loading branch information
hfaure-geors committed Jan 30, 2023
commit 6f792ce717bf998e1747566f585901f7cda2d0b6
4 changes: 0 additions & 4 deletions src/controller/participant/participant.controller.ts
Original file line number Diff line number Diff line change
@@ -63,11 +63,7 @@ export class ParticipantController {
participantSelfDescription: SignedSelfDescriptionDto<ParticipantSelfDescriptionDto>,
@Query('store', new BooleanQueryValidationPipe()) storeSD: boolean
): Promise<ValidationResultDto> {
console.log('Participant verification has started')
var startTime = performance.now()
const validationResult: ValidationResultDto = await this.verifyAndStoreSignedParticipantSD(participantSelfDescription, storeSD)
var endTime = performance.now()
console.log(`Participant verification took ${endTime - startTime} milliseconds`)
return validationResult
}

Original file line number Diff line number Diff line change
@@ -46,14 +46,12 @@ export class ServiceOfferingController {
@Query('store', new BooleanQueryValidationPipe()) storeSD: boolean,
@Query('verifyParticipant', new BooleanQueryValidationPipe(true)) verifyParticipant: boolean
): Promise<ValidationResultDto> {
var startTime = performance.now()
const validationResult: ValidationResultDto = await this.verifyAndStoreSignedServiceOfferingSD(
serviceOfferingSelfDescription,
storeSD,
verifyParticipant
)
var endTime = performance.now()
console.log(`Call to the method took ${endTime - startTime} milliseconds`)

return validationResult
}

@@ -84,14 +82,11 @@ export class ServiceOfferingController {
@Query('store', new BooleanQueryValidationPipe()) storeSD: boolean,
@Query('verifyParticipant', new BooleanQueryValidationPipe(true)) verifyParticipant: boolean
): Promise<ValidationResultDto> {
var startTime = performance.now()
const validationResult: ValidationResultDto = await this.verifyAndStoreSignedServiceOfferingSD(
serviceOfferingSelfDescription,
storeSD,
verifyParticipant
)
var endTime = performance.now()
console.log(`Verification of service offering self-description took ${endTime - startTime} milliseconds`)
return validationResult
}

@@ -101,7 +96,6 @@ export class ServiceOfferingController {
): Promise<ValidationResultDto> {
if (verifyParticipant) {
try {
console.log("Service-offering validation has started")
const validationResult: ValidationResultDto = await this.selfDescriptionService.validate(serviceOfferingSelfDescription)
if (!validationResult.conforms)
throw new ConflictException({
11 changes: 0 additions & 11 deletions src/methods/common/proof.service.ts
Original file line number Diff line number Diff line change
@@ -25,24 +25,13 @@ export class ProofService {
isValidityCheck?: boolean,
jws?: string
): Promise<boolean> {
var start = performance.now()
const { x5u, publicKeyJwk } = await this.getPublicKeys(selfDescriptionCredential)
var ppk = performance.now()
console.log(`Call to retrieve public key ${ppk - start} milliseconds`)
const certificatesRaw: string = await this.loadCertificatesRaw(x5u)
var load = performance.now()
console.log(`Call to load certificate ${load - ppk} milliseconds`)
const isValidChain: boolean = await this.registryService.isValidCertificateChain(certificatesRaw)
var checkvalid = performance.now()
console.log(`Call to verify certificate ${checkvalid - load} milliseconds`)
if (!isValidChain) throw new ConflictException(`X509 certificate chain could not be resolved against registry trust anchors.`)

if (!this.publicKeyMatchesCertificate(publicKeyJwk, certificatesRaw)) throw new ConflictException(`Public Key does not match certificate chain.`)

const input = (selfDescriptionCredential as any).selfDescription ? (selfDescriptionCredential as any)?.selfDescription : selfDescriptionCredential
const isValidSignature: boolean = await this.checkSignature(input, isValidityCheck, jws, selfDescriptionCredential.proof, publicKeyJwk)
var sig = performance.now()
console.log(`Signature took ${sig - checkvalid} milliseconds`)
if (!isValidSignature) throw new ConflictException(`Provided signature does not match Self Description.`)

return true
1 change: 0 additions & 1 deletion src/methods/common/registry.service.ts
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ export class RegistryService {

return response.data
} catch (error) {
console.log(error)
this.logger.error(error)
}
}
4 changes: 0 additions & 4 deletions src/methods/common/selfDescription.service.ts
Original file line number Diff line number Diff line change
@@ -164,7 +164,6 @@ export class SelfDescriptionService {
return {conforms, isValidSignature, content, shape}
},
[SelfDescriptionTypes.SERVICE_OFFERING]: async () => {
console.log("Provided by verification has started")
const get_SD:SignedSelfDescriptionDto<ParticipantSelfDescriptionDto> = await new Promise(async(resolve, reject) =>
{
try {
@@ -182,7 +181,6 @@ export class SelfDescriptionService {
return {conforms, isValidSignature, content, shape}
}
}

return (await validationFns[type]()) || undefined

} catch(e) {
@@ -219,7 +217,6 @@ export class SelfDescriptionService {
}
const selfDescriptionDataset: DatasetExt = await this.shaclService.loadFromJsonLD(JSON.stringify(rawPrepared))
if(this.Cache_check(type) == true) {
console.log("Cache items detected")
const shape: ValidationResult = await this.shaclService.validate(cache[type].shape, selfDescriptionDataset)
return shape
} else {
@@ -232,7 +229,6 @@ export class SelfDescriptionService {
}
})
let schema = await this.getShaclShape(shapePath)
console.log("saving schema to cache")
cache[type].shape = schema
const shape: ValidationResult = await this.shaclService.validate(schema, selfDescriptionDataset)
return shape
1 change: 0 additions & 1 deletion src/methods/common/shacl.service.ts
Original file line number Diff line number Diff line change
@@ -63,7 +63,6 @@ export class ShaclService {
transformResponse: r => r
})
.toPromise()

return this.isJsonString(response.data) ? this.loadFromJsonLD(response.data) : this.loadFromTurtle(response.data)
} catch (error) {
console.error(error)
1 change: 0 additions & 1 deletion src/methods/participant/content-validation.service.ts
Original file line number Diff line number Diff line change
@@ -268,7 +268,6 @@ export class ParticipantContentValidationService {
tab.push(values[i])
}
}
console.log("did ",tab.filter((item, index) => tab.indexOf(item) === index))
return tab.filter((item, index) => tab.indexOf(item) === index);
}