Skip to content

Commit

Permalink
feat: produce and serve did:web DID documents (#31)
Browse files Browse the repository at this point in the history
* WIP

* WIP

* feat: re-introduce generics

* WIP

* feat: introduce `AppState`

* style: rename `ApplicationState` and `AppState`

* feat: add `Domain` trait

* WIP

* WIP

* style: remove unused code

* fix: fix some `unwrap`s, clean code

* refactor: simplify agent_store

* feat: add `CommandHandlers` struct

* style: fix clippy warnings

* refactor: simplify Commands

* style: change name

* chore: add log messages

* fix: only update view when `CredentialOfferCreated`

* chore: add comments and logging

* refactor: separate queries

* fix: several fixes

* test: update postman collection

* fix: set `oid4vc` dependencies to specific `rev`

* chore: set `rust-version` and use `workspace.package` settings

* feat: add `GET` method for `credentials` endpoint

* test: add `GET` method for `credentials` endpoint in postman collection

This includes a test for the `POST` method for the `credentials`
endpoint that updates the `CREDENTIAL_LOCATION` environment variable

* chore: add `/v1/credentials/{credential_id}` to `openapi.yaml` file

* chore: bump `axum` dependency to `0.7`

* chore: update `axum` related code to version `0.7`

* feat: add `log_error_response` macro for cleaner logging of error responses

* chore: update POST request to a valid OBv3 `credentialSubject`

* feat: introduce secret manager (Stronghold)

* chore: use `TraceLayer` for proper tracing in `agent_api_rest`

* `on_request` makes sure that each request is traced
* `on_response` makes sure that each response is traced
* `on_body_chunk` makes sure that each response body is traced

`TraceLayer` only accepts `Request<axum::body::Body` which is not `Serialize`,
therefore, we still need to explicitly trace the request body in each route.

* feat: use `SecretManager` from external `producer`

* fix: remove obsolete `log_error_response` macro

The `log_error_response` macro is replaced by the `TraceLayer`.`

* refactor: use `if` + `is_err()` rather than `match` for `command_handler` useage

* feat: add `NOT_FOUND` response option

* feat: add DDD files for `secret_manager`

* fix: set tokio version to `1`

* fix: load stronghold into service

* refactor: remove unused test stronghold

* refactor: use `did_manager`

* chore: bump `did_manager` git rev

* test: use `futures` for async code

* refactor: revert changes to test subject

* feat: replace `did_key` with `did_manager` implementation

* test: use `tracing-test`

* chore: remove static secret `UNSAFE_ISSUER_KEY`

* refactor: reorganize imports

* chore: remove unused dependency `did-key`

* chore: update postman collection

* chore: use updated function from `secret_manager`

* style: fix clippy issues

* chore: remove `inspect()`

* ci: bump dependencies

* refactor: load `SecretManager` through `services.init()`

* refactor: use more generic naming for `SecretManager` commands and events

* WIP

* WIP

* feat: produce and serve `did:web` document

* chore: use method-specific parameters on `produce_document`

* chore: revert test code (not applicable)

* refactor: rename config parameter

* chore: update Postman collection

* chore: add example `AGENT_CONFIG_URL`

* chore: remove unused dependencies

* chore: bump `did_manager` version

* chore: update Postman collection

* chore: bump `did_manager` version

* chore: bump versions of `spruceid-ssi` (forked)
  • Loading branch information
daniel-mader authored Jun 11, 2024
1 parent 7ac769e commit db3c9e1
Show file tree
Hide file tree
Showing 9 changed files with 344 additions and 164 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AGENT_CONFIG_LOG_FORMAT=json
AGENT_CONFIG_EVENT_STORE=postgres
AGENT_APPLICATION_URL=https://my-domain.example.org
AGENT_CONFIG_URL=https://my-domain.example.org
AGENT_APPLICATION_ENABLE_CORS=false
AGENT_ISSUANCE_CREDENTIAL_NAME="Demo Credential"
AGENT_ISSUANCE_CREDENTIAL_LOGO_URL=https://my-domain.example.org/credential_logo.png
Expand All @@ -10,6 +11,7 @@ AGENT_SECRET_MANAGER_ISSUER_DID="did:key:z6Mkv5KkqNHuR6bPVT8fud3m9JaHBSEjEmiLp7H
AGENT_SECRET_MANAGER_ISSUER_FRAGMENT="key-0"
AGENT_SECRET_MANAGER_ISSUER_KEY_ID="9O66nzWqYYy1LmmiOudOlh2SMIaUWoTS"
AGENT_CONFIG_DEFAULT_DID_METHOD="did:key"
AGENT_CONFIG_DID_METHOD_WEB_ENABLED=false
AGENT_STORE_DB_CONNECTION_STRING=postgresql://demo_user:demo_pass@localhost:5432/demo
AGENT_CONFIG_DISPLAY_NAME="UniCore"
AGENT_CONFIG_DISPLAY_LOGO_URI="http://example.com/logo.png"
Expand Down
Loading

0 comments on commit db3c9e1

Please sign in to comment.