From 67ff6162cb5acd9283b68775b4602870decbddc9 Mon Sep 17 00:00:00 2001 From: PaulWen <wenzel.pgb@googlemail.com> Date: Tue, 24 Jan 2023 15:49:58 +0100 Subject: [PATCH] chore(OOB): Remove out-of-band (OOB) placeholder code Signed-off-by: PaulWen <wenzel.pgb@googlemail.com> --- DEVELOPER_README.md | 4 - generator.iml | 118 +----------------- setup/.env.example | 4 - setup/load-generator/load-generator.env | 4 - .../agents/acapy/AcaPyAriesClient.kt | 16 --- .../testflows/CredentialIssuanceFlow.kt | 29 +---- .../application/testflows/FullFlow.kt | 62 ++------- .../application/testflows/IssuerFlow.kt | 21 ---- .../application/testflows/ProofRequestFlow.kt | 31 +---- .../domain/objects/OobCredentialOfferDo.kt | 7 -- .../domain/objects/OobProofRequestDo.kt | 8 -- .../generator/domain/services/IAriesClient.kt | 5 - src/main/resources/application.yml | 4 - 13 files changed, 12 insertions(+), 301 deletions(-) delete mode 100644 src/main/kotlin/com/bka/ssi/generator/domain/objects/OobCredentialOfferDo.kt delete mode 100644 src/main/kotlin/com/bka/ssi/generator/domain/objects/OobProofRequestDo.kt diff --git a/DEVELOPER_README.md b/DEVELOPER_README.md index c2021ab..160d657 100644 --- a/DEVELOPER_README.md +++ b/DEVELOPER_README.md @@ -43,23 +43,19 @@ test-flows: use-revocable-credentials: true revocation-registry-size: 500 check-non-revoked: true - use-oob-instead-of-connection: false issuer-flow: active: false use-revocable-credentials: true revocation-registry-size: 500 - use-oob-credential-issuance: false connection-request-flow: active: false credential-issuance-flow: active: false use-revocable-credentials: true revocation-registry-size: 500 - use-oob-credential-issuance: false proof-request-flow: active: false check-non-revoked: true - use-oob-proof-requests: false ``` Only one Test Runner and one Test Flow should be set to `active: true` at a time. The Test Flow will **automatically be diff --git a/generator.iml b/generator.iml index 9b0c558..484bbda 100644 --- a/generator.iml +++ b/generator.iml @@ -10,9 +10,6 @@ </sourceRoots> </configuration> </facet> - <facet type="Spring" name="Spring"> - <configuration /> - </facet> <facet type="kotlin-language" name="Kotlin"> <configuration version="4" platform="JVM 11" allPlatforms="JVM [11]" useProjectSettings="false"> <compilerSettings> @@ -44,123 +41,10 @@ </configuration> </facet> </component> - <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11"> - <output url="file://$MODULE_DIR$/target/classes" /> - <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <component name="NewModuleRootManager"> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> - <sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" /> <excludeFolder url="file://$MODULE_DIR$/target" /> </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.0" level="project" /> - <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.0" level="project" /> - <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.32" level="project" /> - <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" /> - <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.29" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.1" level="project" /> - <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.1" level="project" /> - <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.1" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.56" level="project" /> - <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.56" level="project" /> - <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.56" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.14" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.14" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.14" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.14" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.14" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.14" level="project" /> - <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1" level="project" /> - <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.1" level="project" /> - <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.1" level="project" /> - <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.1" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-reflect:1.6.10" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.6.10" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10" level="project" /> - <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.6.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.6.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.6.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.6.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.6.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.4.7" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:2.4.7" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:9.1" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.21.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.8.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.8.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.8.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.8.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.8.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.8.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:4.0.0" level="project" /> - <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.11.22" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.11.22" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.2" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:4.0.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.14" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.14" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.3.14" level="project" /> - <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.8.4" level="project" /> - <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" /> - <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" /> - <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" /> - <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" /> - <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" /> - <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" /> - <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" /> - <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" /> - <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" /> - <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" /> - <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" /> - <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" /> - <orderEntry type="library" name="Maven: network.idu.acapy:aries-client-python:0.7.19" level="project" /> - <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" /> - <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" /> - <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" /> - <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:4.9.0" level="project" /> - <orderEntry type="library" name="Maven: com.squareup.okio:okio:2.8.0" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.14" level="project" /> - <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.14" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: org.postgresql:postgresql:42.3.1" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: org.checkerframework:checker-qual:3.5.0" level="project" /> - <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.33" level="project" /> - <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" /> - <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.9" level="project" /> - <orderEntry type="library" name="Maven: com.github.loki4j:loki-logback-appender:1.3.1" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.6.2" level="project" /> - <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.8.1" level="project" /> - <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.12" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: io.micrometer:micrometer-registry-prometheus:1.8.1" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_common:0.12.0" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient:0.12.0" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_tracer_otel:0.12.0" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_tracer_common:0.12.0" level="project" /> - <orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_tracer_otel_agent:0.12.0" level="project" /> </component> </module> \ No newline at end of file diff --git a/setup/.env.example b/setup/.env.example index 9807ff0..ab5ce41 100644 --- a/setup/.env.example +++ b/setup/.env.example @@ -57,24 +57,20 @@ TEST_FLOWS_FULL_FLOW_REVOCATION_REGISTRY_SIZE=3000 TEST_FLOWS_FULL_FLOW_CHECK_NON_REVOKED=false TEST_FLOWS_FULL_FLOW_REVOKE_CREDENTIALS=false TEST_FLOWS_FULL_FLOW_CREDENTIAL_REVOCATION_BATCH_SIZE=5 -TEST_FLOWS_FULL_FLOW_USE_OOB_INSTEAD_OF_CONNECTION=false TEST_FLOWS_ISSUER_FLOW_ACTIVE=false TEST_FLOWS_ISSUER_FLOW_USE_REVOCABLE_CREDENTIALS=true TEST_FLOWS_ISSUER_FLOW_REVOCATION_REGISTRY_SIZE=3000 -TEST_FLOWS_ISSUER_FLOW_USE_OOB_CREDENTIAL_ISSUANCE=false TEST_FLOWS_CONNECTION_FLOW_ACTIVE=false TEST_FLOWS_CREDENTIAL_ISSUANCE_FLOW_ACTIVE=false TEST_FLOWS_CREDENTIAL_ISSUANCE_FLOW_USE_REVOCABLE_CREDENTIALS=true TEST_FLOWS_CREDENTIAL_ISSUANCE_FLOW_REVOCATION_REGISTRY_SIZE=3000 -TEST_FLOWS_CREDENTIAL_ISSUANCE_FLOW_USE_OOB_CREDENTIAL_ISSUANCE=false TEST_FLOWS_PROOF_REQUEST_FLOW_ACTIVE=false TEST_FLOWS_PROOF_REQUEST_FLOW_REVOCATION_REGISTRY_SIZE=3000 TEST_FLOWS_PROOF_REQUEST_FLOW_CHECK_NON_REVOKED=true -TEST_FLOWS_PROOF_REQUEST_FLOW_USE_OOB_PROOF_REQUESTS=false # AcaPy Wallet Type ("indy", "askar", or "basic") WALLET_TYPE=askar diff --git a/setup/load-generator/load-generator.env b/setup/load-generator/load-generator.env index f35eec8..68937e6 100644 --- a/setup/load-generator/load-generator.env +++ b/setup/load-generator/load-generator.env @@ -26,19 +26,15 @@ TESTFLOWS_FULLFLOW_REVOCATIONREGISTRYSIZE=${TEST_FLOWS_FULL_FLOW_REVOCATION_REGI TESTFLOWS_FULLFLOW_CHECKNONREVOKED=${TEST_FLOWS_FULL_FLOW_CHECK_NON_REVOKED} TESTFLOWS_FULLFLOW_REVOKECREDENTIALS=${TEST_FLOWS_FULL_FLOW_REVOKE_CREDENTIALS} TESTFLOWS_FULLFLOW_CREDENTIALREVOCATIONBATCHSIZE=${TEST_FLOWS_FULL_FLOW_CREDENTIAL_REVOCATION_BATCH_SIZE} -TESTFLOWS_FULLFLOW_USEOOBINSTEADOFCONNECTION=${TEST_FLOWS_FULL_FLOW_USE_OOB_INSTEAD_OF_CONNECTION} TESTFLOWS_ISSUERFLOW_ACTIVE=${TEST_FLOWS_ISSUER_FLOW_ACTIVE} TESTFLOWS_ISSUERFLOW_USEREVOCABLECREDENTIALS=${TEST_FLOWS_ISSUER_FLOW_USE_REVOCABLE_CREDENTIALS} TESTFLOWS_ISSUERFLOW_REVOCATIONREGISTRYSIZE=${TEST_FLOWS_ISSUER_FLOW_REVOCATION_REGISTRY_SIZE} -TESTFLOWS_ISSUERFLOW_USEOOBCREDENTIALISSUANCE=${TEST_FLOWS_ISSUER_FLOW_USE_OOB_CREDENTIAL_ISSUANCE} TESTFLOWS_CONNECTIONFLOW_ACTIVE=${TEST_FLOWS_CONNECTION_FLOW_ACTIVE} TESTFLOWS_CREDENTIALISSUANCEFLOW_ACTIVE=${TEST_FLOWS_CREDENTIAL_ISSUANCE_FLOW_ACTIVE} TESTFLOWS_CREDENTIALISSUANCEFLOW_USEREVOCABLECREDENTIALS=${TEST_FLOWS_CREDENTIAL_ISSUANCE_FLOW_USE_REVOCABLE_CREDENTIALS} TESTFLOWS_CREDENTIALISSUANCEFLOW_REVOCATIONREGISTRYSIZE=${TEST_FLOWS_CREDENTIAL_ISSUANCE_FLOW_REVOCATION_REGISTRY_SIZE} -TESTFLOWS_CREDENTIALISSUANCEFLOW_USEOOBCREDENTIALISSUANCE=${TEST_FLOWS_CREDENTIAL_ISSUANCE_FLOW_USE_OOB_CREDENTIAL_ISSUANCE} TESTFLOWS_PROOFREQUESTFLOW_ACTIVE=${TEST_FLOWS_PROOF_REQUEST_FLOW_ACTIVE} TESTFLOWS_PROOFREQUESTFLOW_REVOCATIONREGISTRYSIZE=${TEST_FLOWS_PROOF_REQUEST_FLOW_REVOCATION_REGISTRY_SIZE} TESTFLOWS_PROOFREQUESTFLOW_CHECKNONREVOKED=${TEST_FLOWS_PROOF_REQUEST_FLOW_CHECK_NON_REVOKED} -TESTFLOWS_PROOFREQUESTFLOW_USEOOBPROOFREQUESTS=${TEST_FLOWS_PROOF_REQUEST_FLOW_USE_OOB_PROOF_REQUESTS} SERVER_TOMCAT_THREADS_MAX=${SERVER_TOMCAT_THREADS_MAX} SERVER_TOMCAT_MAXCONNECTIONS=${SERVER_TOMCAT_MAX_CONNECTIONS} diff --git a/src/main/kotlin/com/bka/ssi/generator/agents/acapy/AcaPyAriesClient.kt b/src/main/kotlin/com/bka/ssi/generator/agents/acapy/AcaPyAriesClient.kt index 81fe5db..cede62c 100644 --- a/src/main/kotlin/com/bka/ssi/generator/agents/acapy/AcaPyAriesClient.kt +++ b/src/main/kotlin/com/bka/ssi/generator/agents/acapy/AcaPyAriesClient.kt @@ -136,14 +136,6 @@ class AcaPyAriesClient( ariesClientLogger.stopPublishRevokedCredentials(trackingId) } - override fun createOobCredentialOffer(credentialDo: CredentialDo): OobCredentialOfferDo { - throw NotImplementedError("Creating an OOB Credential Offer is not implemented yet.") - } - - override fun receiveOobCredentialOffer(oobCredentialOfferDo: OobCredentialOfferDo) { - throw NotImplementedError("Receiving an OOB Credential Offer is not implemented yet.") - } - override fun sendProofRequestToConnection( connectionId: String, proofRequestDo: ProofRequestDo, @@ -193,12 +185,4 @@ class AcaPyAriesClient( ) ) } - - override fun createOobProofRequest(proofRequestDo: ProofRequestDo, checkNonRevoked: Boolean): OobProofRequestDo { - throw NotImplementedError("Creating an OOB Proof Request is not implemented yet.") - } - - override fun receiveOobProofRequest(oobProofRequestDo: OobProofRequestDo) { - throw NotImplementedError("Receiving an OOB Proof Request is not implemented yet.") - } } diff --git a/src/main/kotlin/com/bka/ssi/generator/application/testflows/CredentialIssuanceFlow.kt b/src/main/kotlin/com/bka/ssi/generator/application/testflows/CredentialIssuanceFlow.kt index f4acf43..c817315 100644 --- a/src/main/kotlin/com/bka/ssi/generator/application/testflows/CredentialIssuanceFlow.kt +++ b/src/main/kotlin/com/bka/ssi/generator/application/testflows/CredentialIssuanceFlow.kt @@ -19,7 +19,6 @@ class CredentialIssuanceFlow( @Qualifier("Holder") holderAriesClients: List<IAriesClient>, @Value("\${test-flows.credential-issuance-flow.use-revocable-credentials}") private val useRevocableCredentials: Boolean, @Value("\${test-flows.credential-issuance-flow.revocation-registry-size}") private val revocationRegistrySize: Int, - @Value("\${test-flows.credential-issuance-flow.use-oob-credential-issuance}") private val useOobCredentialIssuance: Boolean, ) : TestFlow(holderAriesClients) { protected companion object { @@ -32,7 +31,6 @@ class CredentialIssuanceFlow( logger.info("Initializing CredentialIssuanceFlow...") logger.info("use-revocable-credentials: $useRevocableCredentials") logger.info("revocation-registry-size: $revocationRegistrySize") - logger.info("use-oob-credential-issuance: $useOobCredentialIssuance") Companion.testRunner = testRunner @@ -47,20 +45,11 @@ class CredentialIssuanceFlow( ) credentialDefinitionId = credentialDefinition.id - if (useOobCredentialIssuance) { - testRunner.finishedInitialization() - } else { - initiateConnection() - } + initiateConnection() } override fun startIteration() { - if (useOobCredentialIssuance) { - issueCredentialOob() - } else { - issueCredentialToConnection() - } - + issueCredentialToConnection() logger.info("Sent Credential Offer") } @@ -77,20 +66,6 @@ class CredentialIssuanceFlow( ) } - private fun issueCredentialOob() { - val oobCredentialOffer = issuerVerifierAriesClient.createOobCredentialOffer( - CredentialDo( - credentialDefinitionId, - mapOf( - "first name" to "Holder", - "last name" to "Mustermann" - ) - ) - ) - - nextHolderClient().receiveOobCredentialOffer(oobCredentialOffer) - } - private fun initiateConnection() { val connectionInvitation = issuerVerifierAriesClient.createConnectionInvitation("holder-acapy") diff --git a/src/main/kotlin/com/bka/ssi/generator/application/testflows/FullFlow.kt b/src/main/kotlin/com/bka/ssi/generator/application/testflows/FullFlow.kt index dff1d0a..e1cc01d 100644 --- a/src/main/kotlin/com/bka/ssi/generator/application/testflows/FullFlow.kt +++ b/src/main/kotlin/com/bka/ssi/generator/application/testflows/FullFlow.kt @@ -25,7 +25,6 @@ class FullFlow( @Value("\${test-flows.full-flow.check-non-revoked}") private val checkNonRevoked: Boolean, @Value("\${test-flows.full-flow.revoke-credentials}") private val revokeCredentials: Boolean, @Value("\${test-flows.full-flow.credential-revocation-batch-size}") private val credentialRevocationBatchSize: Int, - @Value("\${test-flows.full-flow.use-oob-instead-of-connection}") private val useOobInsteadOfConnection: Boolean, private val errorLogger: ErrorLogger, ) : TestFlow( holderAriesClients @@ -46,7 +45,6 @@ class FullFlow( logger.info("check-non-revoked: $checkNonRevoked") logger.info("revoke-credentials: $revokeCredentials") logger.info("credential-revocation-batch-size: $credentialRevocationBatchSize") - logger.info("use-oob-instead-of-connection: $useOobInsteadOfConnection") Companion.testRunner = testRunner @@ -65,27 +63,9 @@ class FullFlow( } override fun startIteration() { - if (useOobInsteadOfConnection) { - issueCredentialOob() - return - } - initiateConnection() } - private fun issueCredentialOob() { - val oobCredentialOffer = issuerVerifierAriesClient.createOobCredentialOffer( - CredentialDo( - credentialDefinitionId, - mapOf( - SESSION_ID_CREDENTIAL_ATTRIBUTE_NAME to UUID.randomUUID().toString() - ) - ) - ) - - nextHolderClient().receiveOobCredentialOffer(oobCredentialOffer) - } - private fun initiateConnection() { val connectionInvitation = issuerVerifierAriesClient.createConnectionInvitation("holder-acapy") @@ -115,20 +95,16 @@ class FullFlow( return } - if (useOobInsteadOfConnection) { - sendProofRequestOob(credentialExchangeRecord.sessionId) - } else { - sendProofRequestToConnection( + sendProofRequestToConnection( + credentialExchangeRecord.sessionId, + credentialExchangeRecord.connectionId, + ProofExchangeCommentDo( + true, credentialExchangeRecord.sessionId, - credentialExchangeRecord.connectionId, - ProofExchangeCommentDo( - true, - credentialExchangeRecord.sessionId, - credentialExchangeRecord.revocationRegistryId, - credentialExchangeRecord.revocationRegistryIndex - ) + credentialExchangeRecord.revocationRegistryId, + credentialExchangeRecord.revocationRegistryIndex ) - } + ) logger.info("Sent proof request") } @@ -155,28 +131,6 @@ class FullFlow( ) } - private fun sendProofRequestOob(sessionId: String) { - val oobProofRequest = issuerVerifierAriesClient.createOobProofRequest( - ProofRequestDo( - Instant.now().toEpochMilli(), - Instant.now().toEpochMilli(), - listOf( - CredentialRequestDo( - listOf(SESSION_ID_CREDENTIAL_ATTRIBUTE_NAME), - credentialDefinitionId, - AttributeValueRestrictionDo( - SESSION_ID_CREDENTIAL_ATTRIBUTE_NAME, - sessionId - ) - ) - ) - ), - checkNonRevoked - ) - - nextHolderClient().receiveOobProofRequest(oobProofRequest) - } - override fun handleProofRequestRecord(proofExchangeRecord: ProofExchangeRecordDo) { if (!proofExchangeRecord.isVerified) { return diff --git a/src/main/kotlin/com/bka/ssi/generator/application/testflows/IssuerFlow.kt b/src/main/kotlin/com/bka/ssi/generator/application/testflows/IssuerFlow.kt index dd96911..bc05902 100644 --- a/src/main/kotlin/com/bka/ssi/generator/application/testflows/IssuerFlow.kt +++ b/src/main/kotlin/com/bka/ssi/generator/application/testflows/IssuerFlow.kt @@ -19,7 +19,6 @@ class IssuerFlow( @Qualifier("Holder") holderAriesClients: List<IAriesClient>, @Value("\${test-flows.issuer-flow.use-revocable-credentials}") private val useRevocableCredentials: Boolean, @Value("\${test-flows.issuer-flow.revocation-registry-size}") private val revocationRegistrySize: Int, - @Value("\${test-flows.issuer-flow.use-oob-credential-issuance}") private val useOobCredentialIssuance: Boolean, ) : TestFlow(holderAriesClients) { protected companion object { @@ -31,7 +30,6 @@ class IssuerFlow( logger.info("Initializing IssuerFlow...") logger.info("use-revocable-credentials: $useRevocableCredentials") logger.info("revocation-registry-size: $revocationRegistrySize") - logger.info("use-oob-credential-issuance: $useOobCredentialIssuance") Companion.testRunner = testRunner @@ -50,28 +48,9 @@ class IssuerFlow( } override fun startIteration() { - if (useOobCredentialIssuance) { - issueCredentialOob() - return - } - initiateConnection() } - private fun issueCredentialOob() { - val oobCredentialOffer = issuerVerifierAriesClient.createOobCredentialOffer( - CredentialDo( - credentialDefinitionId, - mapOf( - "first name" to "Holder", - "last name" to "Mustermann" - ) - ) - ) - - nextHolderClient().receiveOobCredentialOffer(oobCredentialOffer) - } - private fun initiateConnection() { val connectionInvitation = issuerVerifierAriesClient.createConnectionInvitation("holder-acapy") diff --git a/src/main/kotlin/com/bka/ssi/generator/application/testflows/ProofRequestFlow.kt b/src/main/kotlin/com/bka/ssi/generator/application/testflows/ProofRequestFlow.kt index afb650c..ad8a9d1 100644 --- a/src/main/kotlin/com/bka/ssi/generator/application/testflows/ProofRequestFlow.kt +++ b/src/main/kotlin/com/bka/ssi/generator/application/testflows/ProofRequestFlow.kt @@ -20,7 +20,6 @@ class ProofRequestFlow( @Qualifier("Holder") holderAriesClients: List<IAriesClient>, @Value("\${test-flows.proof-request-flow.revocation-registry-size}") private val revocationRegistrySize: Int, @Value("\${test-flows.proof-request-flow.check-non-revoked}") private val checkNonRevoked: Boolean, - @Value("\${test-flows.proof-request-flow.use-oob-proof-requests}") private val useOobProofRequests: Boolean, ) : TestFlow(holderAriesClients) { protected companion object { @@ -33,7 +32,6 @@ class ProofRequestFlow( logger.info("Initializing ProofRequestFlow...") logger.info("revocation-registry-size: $revocationRegistrySize") logger.info("check-non-revoked: $checkNonRevoked") - logger.info("use-oob-proof-requests: $useOobProofRequests") Companion.testRunner = testRunner @@ -52,12 +50,7 @@ class ProofRequestFlow( } override fun startIteration() { - if (useOobProofRequests) { - sendProofRequestOob() - } else { - sendProofRequestToConnection() - } - + sendProofRequestToConnection() logger.info("Sent proof request") } @@ -83,28 +76,6 @@ class ProofRequestFlow( ) } - private fun sendProofRequestOob() { - val oobProofRequest = issuerVerifierAriesClient.createOobProofRequest( - ProofRequestDo( - Instant.now().toEpochMilli(), - Instant.now().toEpochMilli(), - listOf( - CredentialRequestDo( - listOf("first name", "last name"), - credentialDefinitionId, - AttributeValueRestrictionDo( - "first name", - "bob" - ) - ) - ) - ), - checkNonRevoked - ) - - nextHolderClient().receiveOobProofRequest(oobProofRequest) - } - private fun initiateConnection() { val connectionInvitation = issuerVerifierAriesClient.createConnectionInvitation("holder-acapy") diff --git a/src/main/kotlin/com/bka/ssi/generator/domain/objects/OobCredentialOfferDo.kt b/src/main/kotlin/com/bka/ssi/generator/domain/objects/OobCredentialOfferDo.kt deleted file mode 100644 index d8be46a..0000000 --- a/src/main/kotlin/com/bka/ssi/generator/domain/objects/OobCredentialOfferDo.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.bka.ssi.generator.domain.objects - -class OobCredentialOfferDo( - val credentialDefinitionId: String, - val claims: Map<String, String> -) { -} diff --git a/src/main/kotlin/com/bka/ssi/generator/domain/objects/OobProofRequestDo.kt b/src/main/kotlin/com/bka/ssi/generator/domain/objects/OobProofRequestDo.kt deleted file mode 100644 index aade32d..0000000 --- a/src/main/kotlin/com/bka/ssi/generator/domain/objects/OobProofRequestDo.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.bka.ssi.generator.domain.objects - -class OobProofRequestDo( - val nonRevokedFrom: Long, - val nonRevokedTo: Long, - val requestedCredentials: List<CredentialRequestDo> -) { -} diff --git a/src/main/kotlin/com/bka/ssi/generator/domain/services/IAriesClient.kt b/src/main/kotlin/com/bka/ssi/generator/domain/services/IAriesClient.kt index 17c066d..f8d5bf4 100644 --- a/src/main/kotlin/com/bka/ssi/generator/domain/services/IAriesClient.kt +++ b/src/main/kotlin/com/bka/ssi/generator/domain/services/IAriesClient.kt @@ -21,15 +21,10 @@ interface IAriesClient { credentialRevocationRegistryRecord: CredentialRevocationRegistryRecordDo ) - fun createOobCredentialOffer(credentialDo: CredentialDo): OobCredentialOfferDo - fun receiveOobCredentialOffer(oobCredentialOfferDo: OobCredentialOfferDo) fun sendProofRequestToConnection( connectionId: String, proofRequestDo: ProofRequestDo, checkNonRevoked: Boolean, comment: ProofExchangeCommentDo ) - - fun createOobProofRequest(proofRequestDo: ProofRequestDo, checkNonRevoked: Boolean): OobProofRequestDo - fun receiveOobProofRequest(oobProofRequestDo: OobProofRequestDo) } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index a6b4998..6052d52 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -72,21 +72,17 @@ test-flows: check-non-revoked: true revoke-credentials: true credential-revocation-batch-size: 5 - use-oob-instead-of-connection: false issuer-flow: active: false use-revocable-credentials: true revocation-registry-size: 500 - use-oob-credential-issuance: false connection-flow: active: false credential-issuance-flow: active: false use-revocable-credentials: true revocation-registry-size: 500 - use-oob-credential-issuance: false proof-request-flow: active: false check-non-revoked: true revocation-registry-size: 500 - use-oob-proof-requests: false