-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-docs-make-consistence
Signed-off-by: Yurii Shynbuiev - IOHK <yurii.shynbuiev@iohk.io>
- Loading branch information
Showing
5 changed files
with
88 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 23 additions & 21 deletions
44
tests/integration-tests/src/test/resources/features/proofs/present_proof.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
@proof @jwt | ||
Feature: Present Proof Protocol | ||
|
||
Scenario: Holder presents credential proof to verifier | ||
Given Verifier and Holder have an existing connection | ||
And Holder has an issued credential from Issuer | ||
When Verifier sends a request for proof presentation to Holder | ||
And Holder receives the request | ||
And Holder makes the presentation of the proof to Verifier | ||
# Then Verifier has the proof verified | ||
@flaky | ||
Scenario: Holder presents credential proof to verifier | ||
Given Verifier and Holder have an existing connection | ||
And Holder has an issued credential from Issuer | ||
When Verifier sends a request for proof presentation to Holder | ||
And Holder receives the request | ||
And Holder makes the presentation of the proof to Verifier | ||
Then Verifier has the proof verified | ||
|
||
Scenario: Verifier rejects holder proof | ||
Given Verifier and Holder have an existing connection | ||
And Holder has an issued credential from Issuer | ||
When Verifier sends a request for proof presentation to Holder | ||
And Holder receives the request | ||
And Holder rejects the proof | ||
Then Holder sees the proof is rejected | ||
Scenario: Verifier rejects holder proof | ||
Given Verifier and Holder have an existing connection | ||
And Holder has an issued credential from Issuer | ||
When Verifier sends a request for proof presentation to Holder | ||
And Holder receives the request | ||
And Holder rejects the proof | ||
Then Holder sees the proof is rejected | ||
|
||
Scenario: Holder presents proof to verifier which is the issuer itself | ||
Given Issuer and Holder have an existing connection | ||
And Holder has an issued credential from Issuer | ||
When Issuer sends a request for proof presentation to Holder | ||
And Holder receives the request | ||
And Holder makes the presentation of the proof to Issuer | ||
Then Issuer has the proof verified | ||
@flaky | ||
Scenario: Holder presents proof to verifier which is the issuer itself | ||
Given Issuer and Holder have an existing connection | ||
And Holder has an issued credential from Issuer | ||
When Issuer sends a request for proof presentation to Holder | ||
And Holder receives the request | ||
And Holder makes the presentation of the proof to Issuer | ||
Then Issuer has the proof verified |
2 changes: 1 addition & 1 deletion
2
tests/integration-tests/src/test/resources/features/revocation/revoke_jwt_credential.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@revocation @jwt | ||
@revocation @jwt @flaky | ||
Feature: Credential revocation - JWT | ||
|
||
Background: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
AGENT_VERSION=1.33.0-SNAPSHOT | ||
AGENT_VERSION=1.36.1-SNAPSHOT | ||
PRISM_NODE_VERSION=2.3.0 | ||
VAULT_DEV_ROOT_TOKEN_ID=root |
123 changes: 62 additions & 61 deletions
123
...s/performance-tests/agent-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,86 @@ | ||
import { Options } from "k6/options"; | ||
import { Issuer, Holder, Verifier } from "../../actors"; | ||
import { CredentialSchemaResponse } from "@input-output-hk/prism-typescript-client"; | ||
import { defaultOptions } from "../../scenarios/default"; | ||
import merge from "ts-deepmerge"; | ||
import { describe } from "../../k6chaijs.js"; | ||
import { Options } from 'k6/options' | ||
import { Issuer, Holder, Verifier } from '../../actors' | ||
import { CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client' | ||
import { defaultOptions } from '../../scenarios/default' | ||
import merge from 'ts-deepmerge' | ||
import { describe } from '../../k6chaijs.js' | ||
|
||
export const localOptions: Options = { | ||
thresholds: { | ||
"group_duration{group:::Holder connects with Issuer}": ["avg < 10000"], | ||
"group_duration{group:::Issuer creates credential offer for Holder}": [ | ||
"avg < 10000", | ||
'group_duration{group:::Holder connects with Issuer}': ['avg < 10000'], | ||
'group_duration{group:::Issuer creates credential offer for Holder}': [ | ||
'avg < 10000' | ||
], | ||
"group_duration{group:::Holder connects with Verifier}": ["avg < 10000"], | ||
"group_duration{group:::Verifier requests proof from Holder}": [ | ||
"avg < 10000", | ||
], | ||
}, | ||
}; | ||
export let options: Options = merge(localOptions, defaultOptions); | ||
'group_duration{group:::Holder connects with Verifier}': ['avg < 10000'], | ||
'group_duration{group:::Verifier requests proof from Holder}': [ | ||
'avg < 10000' | ||
] | ||
} | ||
} | ||
export const options: Options = merge(localOptions, defaultOptions) | ||
|
||
const issuer = new Issuer(); | ||
const holder = new Holder(); | ||
const verifier = new Verifier(); | ||
const issuer = new Issuer() | ||
const holder = new Holder() | ||
const verifier = new Verifier() | ||
|
||
export function setup() { | ||
describe("Issuer publishes DID", function () { | ||
issuer.createUnpublishedDid(); | ||
issuer.publishDid(); | ||
}); | ||
export function setup () { | ||
describe('Issuer publishes DID', function () { | ||
issuer.createUnpublishedDid() | ||
issuer.publishDid() | ||
}) | ||
|
||
describe("Issuer creates credential schema", function () { | ||
issuer.createCredentialSchema(); | ||
}); | ||
describe('Issuer creates credential schema', function () { | ||
issuer.createCredentialSchema() | ||
}) | ||
|
||
describe("Holder creates unpublished DID", function () { | ||
holder.createUnpublishedDid(); | ||
}); | ||
describe('Holder creates unpublished DID', function () { | ||
holder.createUnpublishedDid() | ||
}) | ||
|
||
return { | ||
issuerDid: issuer.did, | ||
holderDid: holder.did, | ||
issuerSchema: issuer.schema, | ||
}; | ||
issuerSchema: issuer.schema | ||
} | ||
} | ||
|
||
export default (data: { | ||
issuerDid: string; | ||
holderDid: string; | ||
issuerSchema: CredentialSchemaResponse; | ||
}) => { | ||
issuer.did = data.issuerDid; | ||
issuer.schema = data.issuerSchema; | ||
holder.did = data.holderDid; | ||
issuer.did = data.issuerDid | ||
issuer.schema = data.issuerSchema | ||
holder.did = data.holderDid | ||
|
||
describe("Holder connects with Issuer", function () { | ||
issuer.createHolderConnection(); | ||
holder.acceptIssuerConnection(issuer.connectionWithHolder!.invitation); | ||
issuer.finalizeConnectionWithHolder(); | ||
holder.finalizeConnectionWithIssuer(); | ||
describe('Holder connects with Issuer', function () { | ||
issuer.createHolderConnection() | ||
holder.acceptIssuerConnection(issuer.connectionWithHolder!.invitation) | ||
issuer.finalizeConnectionWithHolder() | ||
holder.finalizeConnectionWithIssuer() | ||
}) && | ||
|
||
describe("Issuer creates credential offer for Holder", function () { | ||
issuer.createCredentialOffer(); | ||
issuer.waitForCredentialOfferToBeSent(); | ||
holder.waitAndAcceptCredentialOffer(issuer.credential!.thid); | ||
issuer.receiveCredentialRequest(); | ||
issuer.issueCredential(); | ||
issuer.waitForCredentialToBeSent(); | ||
holder.receiveCredential(); | ||
describe('Issuer creates credential offer for Holder', function () { | ||
issuer.createCredentialOffer() | ||
issuer.waitForCredentialOfferToBeSent() | ||
holder.waitAndAcceptCredentialOffer(issuer.credential!.thid) | ||
issuer.receiveCredentialRequest() | ||
issuer.issueCredential() | ||
issuer.waitForCredentialToBeSent() | ||
holder.receiveCredential() | ||
}) && | ||
|
||
describe("Holder connects with Verifier", function () { | ||
verifier.createHolderConnection(); | ||
holder.acceptVerifierConnection(verifier.connectionWithHolder!.invitation); | ||
verifier.finalizeConnectionWithHolder(); | ||
holder.finalizeConnectionWithVerifier(); | ||
}) && | ||
|
||
describe("Verifier requests proof from Holder", function () { | ||
verifier.requestProof(); | ||
holder.waitAndAcceptProofRequest(verifier.presentation!.thid); | ||
verifier.acknowledgeProof(); | ||
}); | ||
}; | ||
describe('Holder connects with Verifier', function () { | ||
verifier.createHolderConnection() | ||
holder.acceptVerifierConnection(verifier.connectionWithHolder!.invitation) | ||
verifier.finalizeConnectionWithHolder() | ||
holder.finalizeConnectionWithVerifier() | ||
}) | ||
// && | ||
// | ||
// describe("Verifier requests proof from Holder", function () { | ||
// verifier.requestProof(); | ||
// holder.waitAndAcceptProofRequest(verifier.presentation!.thid); | ||
// verifier.acknowledgeProof(); | ||
// }); | ||
} |