Skip to content

Commit

Permalink
Merge branch 'main' into ci/semantic-release-preset
Browse files Browse the repository at this point in the history
  • Loading branch information
yshyn-iohk authored Jan 20, 2025
2 parents c1edf0e + 73b0fb2 commit 60dac05
Show file tree
Hide file tree
Showing 251 changed files with 4,699 additions and 3,361 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Publish Cloud-Agent Open API Specification
id: upload-oas
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cloud-agent-openapi-spec-${{ env.OAS_CHECKSUM}}
path: ./cloud-agent-openapi-spec-${{ env.REVISION_VERSION}}.yaml
Expand Down
48 changes: 10 additions & 38 deletions .github/workflows/performance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ concurrency:

on:
pull_request:
types:
- opened
- edited
- synchronize
push:
branches:
- "main"
Expand Down Expand Up @@ -55,7 +59,7 @@ jobs:
sed -i.bak "s/AGENT_VERSION=.*/AGENT_VERSION=${AGENT_VERSION}/" "${ENV_FILE}" && rm -f "${ENV_FILE}.bak"
cat "${ENV_FILE}"
- name: Start services for issuer
- name: Start services for issuer holder and verifier
env:
PORT: 8080
ADMIN_TOKEN: admin
Expand All @@ -64,48 +68,16 @@ jobs:
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5432
ISSUER_PORT: 8080
HOLDER_PORT: 8090
VERIFIER_PORT: 8100
NODE_REFRESH_AND_SUBMIT_PERIOD: 1s
NODE_MOVE_SCHEDULED_TO_PENDING_PERIOD: 1s
NODE_WALLET_MAX_TPS: 1000
uses: hoverkraft-tech/compose-action@v2.0.0
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p issuer"
up-flags: "--wait"
down-flags: "--volumes"

- name: Start services for holder
env:
PORT: 8090
ADMIN_TOKEN: admin
DEFAULT_WALLET_ENABLED: true
DEFAULT_WALLET_AUTH_API_KEY: default
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5433
uses: isbang/compose-action@v1.4.1
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p holder"
up-flags: "--wait"
down-flags: "--volumes"

- name: Start services for verifier
env:
PORT: 8100
ADMIN_TOKEN: admin
DEFAULT_WALLET_ENABLED: true
DEFAULT_WALLET_AUTH_API_KEY: default
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5434
uses: isbang/compose-action@v1.4.1
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p verifier"
compose-file: "./infrastructure/shared/docker-compose-combined.yml"
compose-flags: "--env-file ./infrastructure/local/.env"
up-flags: "--wait"
down-flags: "--volumes"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-clients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Download OpenAPI specification
if: ${{ !inputs.releaseTag }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: cloud-agent-openapi-spec-${{ inputs.check_sum }}
path: ./cloud-agent/service/api/http
Expand Down
3 changes: 2 additions & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DISABLE_LINTERS:
- PYTHON_MYPY
- PYTHON_PYRIGHT
- PYTHON_RUFF
- TYPESCRIPT_STANDARD

DISABLE_ERRORS_LINTERS:
- KOTLIN_KTLINT
Expand Down Expand Up @@ -65,5 +66,5 @@ YAML_PRETTIER_FILTER_REGEX_EXCLUDE: "infrastructure/charts/agent/*|cloud-agent/s
YAML_V8R_FILTER_REGEX_EXCLUDE: "infrastructure/charts/agent/*"
JAVASCRIPT_STANDARD_FILTER_REGEX_EXCLUDE:
"tests/performance-tests/agent-performance-tests-k6/src/k6chaijs.js\
|tests/didcomm-tests/docker/initdb.js"
|tests/performance-tests/agent-performance-tests-k6/src/common/ProofsService.ts|tests/didcomm-tests/docker/initdb.js"
BASH_SHELLCHECK_FILTER_REGEX_EXCLUDE: "infrastructure/*"
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://www.hyperledger.org/projects/identus">
<a href="https://www.lfdecentralizedtrust.org/projects/identus">
<img src="docs/images/logos/identus-logo.svg" alt="identus-logo" width="513px" height="99px" />
</a>
<br>
Expand All @@ -10,7 +10,7 @@
<a href="https://github.com/hyperledger/identus-cloud-agent/actions/workflows/unit-tests.yml"> <img src="https://github.com/hyperledger/identus-cloud-agent/actions/workflows/unit-tests.yml/badge.svg" alt="Unit tests" /> </a>
<a href="https://github.com/hyperledger/identus-cloud-agent/actions/workflows/integration-tests.yml"> <img src="https://github.com/hyperledger/identus-cloud-agent/actions/workflows/integration-tests.yml/badge.svg" alt="End-to-end tests" /> </a>
<a href="https://github.com/hyperledger/identus-cloud-agent/actions/workflows/performance-tests.yml"> <img src="https://github.com/hyperledger/identus-cloud-agent/actions/workflows/performance-tests.yml/badge.svg" alt="Performance tests" /> </a>
<a href="https://scala-steward.org">
<a href="https://index.scala-lang.org/scala-steward-org/scala-steward">
<img src="https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=" alt="Scala Steward badge">
</a>

Expand Down Expand Up @@ -58,7 +58,7 @@ All documentation, tutorials and API references for the Identus ecosystem can be

Before starting to use the Cloud Agent, it is important to understand the basic concepts of self-sovereign identity (SSI). The following resources provide a good introduction to SSI:

* [Identus SSI introduction](https://docs.atalaprism.io/docs/category/concepts/)
* [Identus SSI introduction](https://hyperledger.github.io/identus-docs/docs/category/concepts)
* [Linux Foundation Course: Getting Started with SSI](https://www.edx.org/learn/computer-programming/the-linux-foundation-getting-started-with-self-sovereign-identity)

### Architecture
Expand Down Expand Up @@ -109,7 +109,7 @@ The Cloud Agent can be configured to use different types of ledger, secret stora

To start playing with Cloud Agent, we recommend using the Dev configuration. Pre-production and production configurations are intended for real-world use cases and require additional more complex configurations of the Distributed Ledger stack setup.

> If you're interested in a hosted version of Cloud Agent, please, contact us via the [Identus site](https://www.hyperledger.org/projects/identus).
> If you're interested in a hosted version of Cloud Agent, please, contact us via the [Identus site](https://www.lfdecentralizedtrust.org/projects/identus).
#### System requirements

Expand All @@ -128,12 +128,21 @@ If the Cloud Agent is started successfully, all the running containers should ac
* `http://localhost:8080/cloud-agent` for the `issuer` instance
* `http://localhost:8090/cloud-agent` for the `holder` instance

You can check the status of the running containers using the [health endpoint](https://docs.atalaprism.io/agent-api/#tag/System/operation/systemHealth):
You can check the status of the running containers using the [health endpoint](https://hyperledger.github.io/identus-docs/agent-api/#tag/System/operation/systemHealth):
```bash
$ curl http://localhost:8080/cloud-agent/_system/health
{"version":"1.19.1"}
```

#### Simple docker compose for running the Identus Platform

The Identus Platform is a set of services that work together to provide a complete SSI solution.
The following services are included in the Identus Platform:
- Cloud Agent
- Mediator

The docker compose file and documentation for running the full stack with the simplest configuration (single tenant without authentication) is available [here](https://github.com/hyperledger/identus/blob/main/identus-docker/dockerize-identus.md)

#### Compatibility between Cloud Agent and PRISM Node

There could be some incompatibilities between the most latest versions of Cloud Agent and PRISM Node. Please, use the following table to check the compatibility between the versions:
Expand All @@ -149,10 +158,10 @@ There could be some incompatibilities between the most latest versions of Cloud

The following tutorials will help you get started with the Cloud Agent and issue your first credentials:

* [Creating, updating and deactivating Decentralized Identifiers (DIDs)](https://docs.atalaprism.io/tutorials/category/dids/)
* [Setting up connections between agents using out-of-band (OOB) protocol](https://docs.atalaprism.io/tutorials/connections/connection)
* [Issuing verifiable credentials (VCs)](https://docs.atalaprism.io/tutorials/credentials/issue)
* [Presenting VC proofs](https://docs.atalaprism.io/tutorials/credentials/present-proof)
* [Creating, updating and deactivating Decentralized Identifiers (DIDs)](https://hyperledger.github.io/identus-docs/tutorials/category/dids/)
* [Setting up connections between agents using out-of-band (OOB) protocol](https://hyperledger.github.io/identus-docs/tutorials/connections/connection)
* [Issuing verifiable credentials (VCs)](https://hyperledger.github.io/identus-docs/tutorials/credentials/didcomm/issue)
* [Presenting VC proofs](https://hyperledger.github.io/identus-docs/tutorials/credentials/didcomm/present-proof)

## Contributing

Expand Down
55 changes: 14 additions & 41 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inThisBuild(
// scalacOptions += "-Ysafe-init",
// scalacOptions += "-Werror", // <=> "-Xfatal-warnings"
scalacOptions += "-Dquill.macro.log=false", // disable quill macro logs // TODO https://github.com/zio/zio-protoquill/issues/470,
scalacOptions ++= Seq("-Xmax-inlines", "50") // manually increase max-inlines above 32 (https://github.com/circe/circe/issues/2162)
scalacOptions ++= Seq("-Xmax-inlines", "50") // increase above 32 (https://github.com/circe/circe/issues/2162)
)
)

Expand All @@ -58,9 +58,6 @@ lazy val V = new {
val mockito = "3.2.18.0"
val monocle = "3.2.0"

// https://mvnrepository.com/artifact/io.circe/circe-core
val circe = "0.14.7"

val tapir = "1.11.7" // scala-steward:off // TODO "1.10.5"
val http4sBlaze = "0.23.15" // scala-steward:off // TODO "0.23.16"

Expand All @@ -80,7 +77,7 @@ lazy val V = new {

val scalaUri = "4.0.3"

val jwtCirceVersion = "9.4.6"
val jwtZioVersion = "9.4.6"
val zioPreludeVersion = "1.0.0-RC31"

val apollo = "1.3.5"
Expand All @@ -107,28 +104,28 @@ lazy val D = new {
val zioConcurrent: ModuleID = "dev.zio" %% "zio-concurrent" % V.zio
val zioHttp: ModuleID = "dev.zio" %% "zio-http" % V.zioHttp
val zioKafka: ModuleID = "dev.zio" %% "zio-kafka" % V.zioKafka excludeAll (
ExclusionRule("dev.zio", "zio_3"), ExclusionRule("dev.zio", "zio-streams_3")
ExclusionRule("dev.zio", "zio_3"),
ExclusionRule("dev.zio", "zio-streams_3")
)
val zioCatsInterop: ModuleID = "dev.zio" %% "zio-interop-cats" % V.zioCatsInterop
val zioMetricsConnectorMicrometer: ModuleID = "dev.zio" %% "zio-metrics-connectors-micrometer" % V.zioMetricsConnector
val tapirPrometheusMetrics: ModuleID = "com.softwaremill.sttp.tapir" %% "tapir-prometheus-metrics" % V.tapir
val micrometer: ModuleID = "io.micrometer" % "micrometer-registry-prometheus" % V.micrometer
val micrometerPrometheusRegistry = "io.micrometer" % "micrometer-core" % V.micrometer
val scalaUri = Seq(
"io.lemonlabs" %% "scala-uri" % V.scalaUri exclude ("org.typelevel", "cats-parse_3"), // Exclude cats-parse to avoid deps conflict
"io.lemonlabs" %% "scala-uri" % V.scalaUri exclude (
"org.typelevel",
"cats-parse_3"
), // Exclude cats-parse to avoid deps conflict
"org.typelevel" % "cats-parse_3" % "1.0.0", // Replace with version 1.0.0
)

val zioConfig: ModuleID = "dev.zio" %% "zio-config" % V.zioConfig
val zioConfigMagnolia: ModuleID = "dev.zio" %% "zio-config-magnolia" % V.zioConfig
val zioConfigTypesafe: ModuleID = "dev.zio" %% "zio-config-typesafe" % V.zioConfig

val circeCore: ModuleID = "io.circe" %% "circe-core" % V.circe
val circeGeneric: ModuleID = "io.circe" %% "circe-generic" % V.circe
val circeParser: ModuleID = "io.circe" %% "circe-parser" % V.circe

val networkntJsonSchemaValidator = "com.networknt" % "json-schema-validator" % V.jsonSchemaValidator
val jwtCirce = "com.github.jwt-scala" %% "jwt-circe" % V.jwtCirceVersion
val jwtZio = "com.github.jwt-scala" %% "jwt-zio-json" % V.jwtZioVersion
val jsonCanonicalization: ModuleID = "io.github.erdtman" % "java-json-canonicalization" % "1.1"
val titaniumJsonLd: ModuleID = "com.apicatalog" % "titanium-json-ld" % "1.4.0"
val jakartaJson: ModuleID = "org.glassfish" % "jakarta.json" % "2.0.1"
Expand Down Expand Up @@ -156,7 +153,6 @@ lazy val D = new {
"com.github.dasniko" % "testcontainers-keycloak" % V.testContainersJavaKeycloak % Test

val doobiePostgres: ModuleID = "org.tpolecat" %% "doobie-postgres" % V.doobie
val doobiePostgresCirce: ModuleID = "org.tpolecat" %% "doobie-postgres-circe" % V.doobie
val doobieHikari: ModuleID = "org.tpolecat" %% "doobie-hikari" % V.doobie
val flyway: ModuleID = "org.flywaydb" % "flyway-core" % V.flyway

Expand Down Expand Up @@ -185,7 +181,7 @@ lazy val D = new {

// LIST of Dependencies
val doobieDependencies: Seq[ModuleID] =
Seq(doobiePostgres, doobiePostgresCirce, doobieHikari, flyway)
Seq(doobiePostgres, doobieHikari, flyway)
}

lazy val D_Shared = new {
Expand All @@ -210,9 +206,6 @@ lazy val D_SharedJson = new {
Seq(
D.zio,
D.zioJson,
D.circeCore,
D.circeGeneric,
D.circeParser,
D.jsonCanonicalization,
D.titaniumJsonLd,
D.jakartaJson,
Expand Down Expand Up @@ -274,9 +267,6 @@ lazy val D_Castor = new {
D.zioMock,
D.zioTestSbt,
D.zioTestMagnolia,
D.circeCore,
D.circeGeneric,
D.circeParser
)

// Project Dependencies
Expand Down Expand Up @@ -343,7 +333,7 @@ lazy val D_Pollux_VC_JWT = new {
// Dependency Modules
val zioDependencies: Seq[ModuleID] = Seq(zio, zioPrelude, zioTest, zioTestSbt, zioTestMagnolia)
val baseDependencies: Seq[ModuleID] =
zioDependencies :+ D.jwtCirce :+ D.networkntJsonSchemaValidator :+ D.nimbusJwt :+ D.scalaTest
zioDependencies :+ D.jwtZio :+ D.networkntJsonSchemaValidator :+ D.nimbusJwt :+ D.scalaTest

// Project Dependencies
lazy val polluxVcJwtDependencies: Seq[ModuleID] = baseDependencies
Expand Down Expand Up @@ -426,7 +416,7 @@ lazy val D_CloudAgent = new {
lazy val keyManagementDependencies: Seq[ModuleID] =
baseDependencies ++ D.doobieDependencies ++ Seq(D.zioCatsInterop, D.zioMock, vaultDriver)

lazy val iamDependencies: Seq[ModuleID] = Seq(keycloakAuthz, D.jwtCirce)
lazy val iamDependencies: Seq[ModuleID] = Seq(keycloakAuthz, D.jwtZio)

lazy val serverDependencies: Seq[ModuleID] =
baseDependencies ++ tapirDependencies ++ postgresDependencies ++ Seq(
Expand Down Expand Up @@ -533,13 +523,7 @@ lazy val models = project
.configure(commonConfigure)
.settings(name := "mercury-data-models")
.settings(
libraryDependencies ++= Seq(D.zio),
libraryDependencies ++= Seq(
D.circeCore,
D.circeGeneric,
D.circeParser
), // TODO try to remove this from this module
// libraryDependencies += D.didScala
libraryDependencies ++= Seq(D.zio)
)
.settings(libraryDependencies += D.nimbusJwt) // FIXME just for the DidAgent
.dependsOn(shared)
Expand All @@ -561,7 +545,6 @@ lazy val protocolConnection = project
.configure(commonConfigure)
.settings(name := "mercury-protocol-connection")
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser))
.settings(libraryDependencies += D.munitZio)
.dependsOn(models, protocolInvitation)

Expand All @@ -570,7 +553,6 @@ lazy val protocolCoordinateMediation = project
.configure(commonConfigure)
.settings(name := "mercury-protocol-coordinate-mediation")
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser))
.settings(libraryDependencies += D.munitZio)
.dependsOn(models)

Expand All @@ -579,7 +561,6 @@ lazy val protocolDidExchange = project
.configure(commonConfigure)
.settings(name := "mercury-protocol-did-exchange")
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser))
.dependsOn(models, protocolInvitation)

lazy val protocolInvitation = project
Expand All @@ -589,9 +570,6 @@ lazy val protocolInvitation = project
.settings(libraryDependencies += D.zio)
.settings(
libraryDependencies ++= Seq(
D.circeCore,
D.circeGeneric,
D.circeParser,
D.munit,
D.munitZio
)
Expand All @@ -611,7 +589,6 @@ lazy val protocolLogin = project
.settings(name := "mercury-protocol-outofband-login")
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser))
.settings(libraryDependencies += D.munitZio)
.dependsOn(models)

Expand All @@ -634,7 +611,6 @@ lazy val protocolIssueCredential = project
.configure(commonConfigure)
.settings(name := "mercury-protocol-issue-credential")
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser))
.settings(libraryDependencies += D.munitZio)
.dependsOn(models, protocolInvitation)

Expand All @@ -643,7 +619,6 @@ lazy val protocolRevocationNotification = project
.configure(commonConfigure)
.settings(name := "mercury-protocol-revocation-notification")
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser))
.settings(libraryDependencies += D.munitZio)
.dependsOn(models)

Expand All @@ -652,7 +627,6 @@ lazy val protocolPresentProof = project
.configure(commonConfigure)
.settings(name := "mercury-protocol-present-proof")
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser))
.settings(libraryDependencies += D.munitZio)
.dependsOn(models, protocolInvitation)

Expand All @@ -667,7 +641,6 @@ lazy val protocolTrustPing = project
.configure(commonConfigure)
.settings(name := "mercury-protocol-trust-ping")
.settings(libraryDependencies += D.zio)
.settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser))
.settings(libraryDependencies += D.munitZio)
.dependsOn(models)

Expand Down Expand Up @@ -936,7 +909,7 @@ lazy val cloudAgentServer = project
Docker / maintainer := "atala-coredid@iohk.io",
Docker / dockerUsername := Some("hyperledger"), // https://github.com/hyperledger
Docker / dockerRepository := Some("ghcr.io"),
dockerExposedPorts := Seq(8080, 8085, 8090),
dockerExposedPorts := Seq(8085, 8090),
// Official docker image for openjdk 21 with curl and bash
dockerBaseImage := "openjdk:21-jdk",
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
Expand Down
Loading

0 comments on commit 60dac05

Please sign in to comment.