Skip to content

Commit

Permalink
Merge branch 'main' into update/main/zio-json-0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro authored Oct 12, 2023
2 parents 0f585d5 + 1e5acf6 commit 95b9f0f
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 104 deletions.
150 changes: 104 additions & 46 deletions Mediator-Error_Handling.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,121 @@
# Error Handling

https://identity.foundation/didcomm-messaging/spec/#problem-reports

On each step of all our protocols processing, when something wrong is happening, we need to:
Goals
When processing any step of any protocol, if something is wrong, the mediator tries to:
- Update the record to a documented error state
- Log the error in the service logs
- Send the problem report message when appropriate

Goal other: error recover/resilient
- [optional] Send event that record state changed to error
- Decide on the policy of re-trying sending errors (one of the proposals is just to send it once, and if a recipient did not get this, then it’s on its own requesting record ID state)

Note: most errors in Mediator will be synchronous

- Store messages when sending (1w)
- Catch Errors and send Problem Reports (1w):
- (sync) e.p.crypto - is message is tampering (any crypto error).
- [WIP]
- (sync) e.p.crypto.unsupported - is message is tampering (any crypto error).
- [WIP]
- (sync & async) e.p.crypto.replay - if the message is replay (possible he replay attack).
- (sync) e.p.req - pickup message before enroling.
- [DONE] StatusRequest - https://didcomm.org/messagepickup/3.0/status-request
- [DONE] DeliveryRequest - https://didcomm.org/messagepickup/3.0/delivery-request
- (sync) e.p.me.res.storage - connection MongoBD is not working.
- [DONE] catch all StorageCollection Error
- (sync) e.p.me.res.storage - business logic MongoBD is not working.
- [DONE] catch all StorageThrowable
- (sync) e.p.did - for any DID method that is not `did.peer`.
- (sync) e.p.did.malformed - for any DID method malformed.
- (sync) e.p.msg - for parsing error from the message.
- [DONE] All parsing errors from the decrypt function
- [TODO] parsing for a specific data model of each protocol
- (sync) e.p.msg.unsupported - for the message type LiveModeChange and all message that is not role of the mediator
- [DONE] MediateGrant
- [DONE] MediateDeny
- [DONE] KeylistResponse
- [DONE] Status - https://didcomm.org/messagepickup/3.0/status
- LiveModeChange Not Supported
- [DONE] "e.m.live-mode-not-supported" - https://didcomm.org/messagepickup/3.0/live-delivery-change
- (sync) e.p.msg.unsupported - for parsing error due to unsupported version or protocol.
- [DONE] MissingProtocolExecuter (unsupported protocol it also works fine for unsupported versions)
- (sync & async) e.p.req.not_enroll - Get a Forward message to a DID that is not enrolled.
- [DONE] Send a Problem Report if the next DID is not enrolled in the Mediator.
- (sync & async) e.p.me - catch all error at the end.
- [DONE]
https://identity.foundation/didcomm-messaging/spec/#problem-reports

## Custom behavior table

This table defines the expected behavior of the mediator in different scenarios not covered by the specifications.

| Mediators | Atala Mediator | Roadmap Atala Mediator | RootsId | Blocktrust |
|-------------|----------------|------------------------|---------|------------|
| Scenario G1 | G1C | - | ? | ? |
| Scenario G2 | G2A | [TODO ATL-5840] G2B | ? | ? |
| Scenario G3 | G3A | [TODO (next)] G3B | ? | ? |
| Scenario G4 | G4B | - | ? | ? |
| Scenario G5 | Fallback G4B | [TODO] G5B | ? | ? |
| Scenario G6 | Fallback G4B | [WIP] G6B | ? | ? |
| Scenario G7 | Fallback G4B | [TODO] G7B | ? | ? |
| Scenario G8 | G8C | - | ? | ? |
| | | | | |
| Scenario M1 | M1B | - | ? | ? |
| Scenario M2 | M2B | - | ? | ? |
| Scenario M3 | Fallback G4 | M3B | ? | ? |
| Scenario M4 | M4B | - | ? | ? |
| Scenario M5 | M5A | [TODO] M5B | ? | ? |

### Scenarios Description

#### General Scenarios:

- **G1** - Received the exact same message (encrypted with the same ephemeral keys) (possible replay attack)
- S1A - (default) executes the protocol as normal
- S1B - ignore (no effect/output)
- S1C - Send a problem report "e.p.cryto.dejavu" ??? or "e.p.crypto.replay"
- S1D - Reply with the exact same message (encrypted with the same ephemeral keys)

- **G2** - Receive a message for an unsupported protocol
https://input-output.atlassian.net/browse/ATL-5840
- G2A - ignore (no effect/output)
- G2B - Send a problem report "e.p.msg.unsupported"

- **G3** - Receive a message for an unsupported unsupported version of the protocol.
- G2B - Fallback to G2
- G3B - Send `e.p.msg.unsupported` and say what version(s) its supported

- **G4** - When an internal error or any unexpected error happens.
- G4A - ignore (no effect/output)
- G4B - Send a problem report "e.p.error"

- **G5** - If the message is tampered (or it throws any crypto errors).
- G5A - ignore (no effect/output)
- G5B - (sync!) Send a problem report "e.p.crypto"

- **G6** - If the DID method is not supported (`did.peer` in this case)
- G6A - ignore (no effect/output)
- G6B - (sync!) e.p.did

- **G7** - If the DID method is malformed.
- G7A - ignore (no effect/output)
- G7B - (sync!) e.p.did.malformed

- **G8** - When a parsing error from the decrypted message.
- G8A - ignore (no effect/output)
- G8B - (sync!) Send an `e.p.msg` If the plaintext message is malformed
- G8C - Send an `e.p.msg.<PIURI>` If the plaintext message is malformed or if parsing into a specific protocol's data model fails.


- Receive a problem report (1w):
- in case of Warnings Reply `w.p` -> log warnings and escalate to an error `e.p` on the reply
- in case of Error `e.p` -> log error

- Traceability of the MsgID of the Problem Report to the original error (2d) -> ATL-4147
- [optional] Log - https://input-output.atlassian.net/browse/ATL-4147
- escalate_to must be configurable (1d)
- [optional] update the protocol with new tokens (2d)
#### Mediator especific Scenarios:

- **M1** - Receive a pickup message from a DID not enrolled.
- M1A - ignore (no effect/output)
- M1B - Send a problem report "e.p.req.not_enroll"

- **M2** - Connection to the BD is not working (at the moment of the call).
- G4
- M2A - ignore (no effect/output)
- M2B - Send a problem report "e.p.me.res.storage" (maybe mention the try again later)

- **M3** - Business logic in BD is failing (got some error from the query).
- G4
- M3A - ignore (no effect/output)
- M3B - Send a problem report "e.p.me.res.storage"

- **M4** - Get a Forward message to a DID that is not enrolled.
- M4A - ignore (no effect/output)
- M4B - Send a problem report "e.p.req.not_enroll" (the `next` DID is not enrolled)

- **M5** - LiveModeChange https://didcomm.org/messagepickup/3.0/live-delivery-change
- Follow the protocol -> Upon receiving the `live_delivery_change` message with `live_delivery` set to `true``:
- M5A - If the connection supports live delivery respond with a [`status`](https://didcomm.org/messagepickup/3.0/status) message.
- M5B - If the connection is incapable of live delivery send a problem report `e.m.live-mode-not-supported`



### Considerations

In the Atala PRISM Mediator, when an issue arises, we undertake the following steps:
* Log the error.
* Dispatch a problem report as outlined in the aforementioned table.
* Record the problem report and error information in the database.
Every one of these steps should be traceable back to the initial call via a XRequestID,
and by the MsgID (which is the SHA-251 hash of the encrypted message).
This procedure will enhance Level 3 support and debugging capabilities. (For [ATL-4147](https://input-output.atlassian.net/browse/ATL-4147))

[TODO optional] Would be nice to propose a list/table of new tokens to the protocol specs:
- `e.p.me.res.storage`
- `e.p.me.res.not_enroll`

# Problem Reports in Mediator flow
## Problem Reports in Mediator flow

https://didcomm.org/coordinate-mediation/2.0/mediate-request

Expand Down
50 changes: 41 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Atala Prism Mediator (DIDCOMM v2)
| Live Demo | Discord | Atala PRISM Website |
| ------------------------------ | ------------------------------ | -----------------------------|
|[![Atala-Symbol]][Link-LiveDemo]|[![Badge-Discord]][Link-Discord]|[![Atala-Favicon]][Link-Atala]|

| CI | Project Stage | Commits since latest release |
| ------------- | -------------- | -------------------------------- |
|![CI][Badge-CI]| ![Badge-Stage] |![Badge-CommitsSinceLatestRelease]|

# Atala Mediator

A DID Comm v2 mediator
A service that receives messages for many agents at a single endpoint and stores them with privacy.
Expand All @@ -13,6 +21,12 @@ graph LR
- **CI** automate builds and tests all push to the main branch also as all PRs created.
- **Scala Steward** automates the creation of pull requests for libraries with updated dependencies, saving maintainers time and effort. It can also help ensure that libraries are kept up-to-date, improving their reliability and performance.

---

**#atala-mediator on Discord:**

For the fastest answers, join the [#atala-mediator][Link-Discord-Mediator] channel in the official Atala Discord and ask your questions, or just chat with other Atala developers and pioneers!


# Table of contents:
- [Mediator Purpose](#Description)
Expand Down Expand Up @@ -69,13 +83,13 @@ The mediator is especially useful when the edge entities are not always online,
- [DONE] `Report Problem 2.0` https://didcomm.org/report-problem/2.0/


# Pre-reqs
### Pre-reqs

To build and run this mediator, locally you will need a few things:
- Install [Docker](https://docs.docker.com/get-docker/)
- Install [SBT](https://www.scala-sbt.org/download.html)

# Getting started
## Getting started
This DIDComm Mediator comprises two elements: a backend service and a database.
The backend service is a JVM application, and the database used is MongoDB.
The backend service is also a web service with a single-page application that will give the final user an invitation page
Expand All @@ -98,7 +112,7 @@ By default mediator will start on port 8080
You can open the `http://localhost:8080/` URL in a web browser, and it will show a QR code that serves as an out-of-band invitation for the Mediator.

## How to run mediator as docker image
# Docker only
### Docker only
It is possible to run everything with a single command with Docker compose docker-compose.yml
The latest stable image version is available in the IOHK repositories.
To build a docker image locally, run NODE_OPTIONS=--openssl-legacy-provider sbt docker:publishLocal.
Expand All @@ -114,15 +128,15 @@ The default configuration is set up [application.conf](/mediator/src/main/resour
So in order to configure the mediator for your needs.
You can either change the default configuration or you can set up environment variables that overrides the defaults:

# identity
#### identity
To set up the mediator identity:
- `KEY_AGREEMENT_D` - is the key agreement private key (MUST be a X25519 OKP key type).
- `KEY_AGREEMENT_X` - is the key agreement public key (MUST be a X25519 OKP key type).
- `KEY_AUTHENTICATION_D` - is the key authentication private key (MUST be an Ed25519 OKP key type).
- `KEY_AUTHENTICATION_X` - is the key authentication public key (MUST be an Ed25519 OKP key type).
- `SERVICE_ENDPOINT` - is the endpoint of the mediator. Where the mediator will be listening to incoming DID Comm messages.

# mediator-storage
#### mediator-storage
To set up the mediator storage (MongoDB):
- `MONGODB_PROTOCOL` - is the protocol type used by mongo.
- `MONGODB_HOST` - is the endpoint where the MongoDB will be listening.
Expand All @@ -147,12 +161,30 @@ For a specific version you can setup with `MEDIATOR_VERSION` like `MEDIATOR_VERS
Using the mongodb from cloud like MongoDB Atlas.
You will need to create the table and indexes before starting the backend service. See the file `initdb.js`.

### Deploy
## Deploy

You can easily deploy the image everywhere. We recommend a minimum of 250 mb ram to run the mediator backend service.

# mediator-tests
## mediator-tests
https://github.com/input-output-hk/didcomm-v2-mediator-test-suite
https://input-output-hk.github.io/didcomm-v2-mediator-test-suite/Reports.html

- [LICENSE](LICENSE) - Apache License, Version 2.0

---
[LICENSE](LICENSE) - Apache License, Version 2.0


[Link-LiveDemo]:https://beta-mediator.atalaprism.io/
[Link-Atala]:https://atalaprism.io/
[Link-Discord]:https://discord.gg/UpxKYK2s
[Link-Discord-Mediator]:https://discord.gg/S7FZEwqe

[Badge-Stage]: https://img.shields.io/badge/0.9.2-Production%20Ready-brightgreen.svg
[Badge-Discord]: https://img.shields.io/discord/1146426895114702858?logo=discord "chat on discord"
[Badge-CI]: https://github.com/input-output-hk/atala-prism-mediator/workflows/CI/badge.svg
[Badge-CommitsSinceLatestRelease]: https://img.shields.io/github/commits-since/input-output-hk/atala-prism-mediator/prism-mediator-v0.9.2/main?logo=github


[Atala-Symbol]:https://img.shields.io/badge/Mediator-Instance-blue.svg?logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8yIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMTguMjEgMzI1LjE4Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzU1NTlmMjtmaWxsLXJ1bGU6ZXZlbm9kZDt9PC9zdHlsZT48L2RlZnM+PGcgaWQ9IkxheWVyXzEtMiI+PGc+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTU5LjkxLDIxLjU4TDc0LjIzLDE2OC45MmMtMy4wOSw1LjMxLTEwLjc3LDUuMy0xMy44NC0uMDJsLTUuNS05LjU0Yy0xLjQzLTIuNDgtMS40My01LjU0LC4wMS04LjAyTDE0MC42LDMuOThjMy4wOS01LjMyLDEwLjc5LTUuMywxMy44NSwuMDRsNS40OSw5LjU2YzEuNDIsMi40OCwxLjQyLDUuNTMtLjAyLDhaIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNNjAuMywxOTIuODhsLTM0LjM1LDU5LjA3Yy0xLjQ0LDIuNDctNC4wOSwzLjk5LTYuOTUsMy45OGwtMTEuMDItL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WwtMTEtLjA4Yy0yLjg3LS4wMi01LjUzLDEuNS02Ljk3LDMuOThsLTU2LjA5LDk2LjQ2Yy0zLjA5LDUuMzIsLjczLDEyLDYuODgsMTIuMDJsMTEuMDIsLjA0YzIuODYsLjAxLDUuNTEtMS41MSw2Ljk0LTMuOThsNTYuMDctOTYuNDJjMy4wOS01LjMxLS43MS0xMS45Ny02Ljg2LTEyLjAyWiIvPjwvZz48L2c+PC9nPjwvc3ZnPg==
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ lazy val V = new {
// For WEBAPP
val laminar = "16.0.0"
val waypoint = "7.0.0"
val upickle = "3.1.0"
val upickle = "3.1.3"
// https://www.npmjs.com/package/material-components-web
val materialComponents = "12.0.0"
}
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/charts/mediator/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
namespace: "{{ .Release.Namespace }}"
labels:
{{ template "labels.common" . }}
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
secretName: "prism-mediator-base-path-secret"
duration: 2160h0m0s # 90d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ object EmbeddedMongoDBInstance {
val port = 27777
val hostIp = "localhost"
val connectionString = s"mongodb://$hostIp:$port/messages"
val index = Index(
key = Seq("alias" -> IndexType.Ascending),
name = Some("alias_did"),
unique = true,
background = true,
partialFilter = Some(BSONDocument("alias.0" -> BSONDocument("$exists" -> true)))
)

def layer(
port: Int = 27077,
hostIp: String = "localhost"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import zio.json.*
import zio.test.*
import zio.test.Assertion.*
import io.iohk.atala.mediator.db.EmbeddedMongoDBInstance.*
import io.iohk.atala.mediator.protocols.MessageSetup

import scala.concurrent.ExecutionContext.Implicits.global
object UserAccountRepoSpec extends ZIOSpecDefault with DidAccountStubSetup {
object UserAccountRepoSpec extends ZIOSpecDefault with DidAccountStubSetup with MessageSetup {

override def spec = suite("UserAccountRepoSpec")(
test("insert new Did Account") {
Expand Down
Loading

0 comments on commit 95b9f0f

Please sign in to comment.