Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for IOTA DID Method #54

Merged
merged 127 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
28a0b87
WIP
daniel-mader Jan 18, 2024
5b2477f
WIP
daniel-mader Jan 19, 2024
f877d6c
feat: re-introduce generics
daniel-mader Jan 20, 2024
6e25803
WIP
daniel-mader Jan 22, 2024
e93922b
feat: introduce `AppState`
nanderstabel Jan 23, 2024
724dc0a
style: rename `ApplicationState` and `AppState`
nanderstabel Jan 23, 2024
cceb007
feat: add `Domain` trait
nanderstabel Jan 23, 2024
35a937c
WIP
nanderstabel Feb 12, 2024
667af89
WIP
nanderstabel Feb 13, 2024
80512c5
style: remove unused code
nanderstabel Feb 13, 2024
ffb01aa
Merge branch 'dev' into refactor/aggregates
nanderstabel Feb 13, 2024
ed25069
fix: fix some `unwrap`s, clean code
nanderstabel Feb 13, 2024
ca4a9cc
refactor: simplify agent_store
nanderstabel Feb 14, 2024
9916ac3
feat: add `CommandHandlers` struct
nanderstabel Feb 14, 2024
01f5e45
style: fix clippy warnings
nanderstabel Feb 14, 2024
e372194
refactor: simplify Commands
nanderstabel Feb 14, 2024
bb18041
style: change name
nanderstabel Feb 15, 2024
4025f91
chore: add log messages
nanderstabel Feb 19, 2024
da407da
fix: only update view when `CredentialOfferCreated`
nanderstabel Feb 19, 2024
6966405
chore: add comments and logging
nanderstabel Feb 19, 2024
0254af3
refactor: separate queries
nanderstabel Feb 20, 2024
9e22cdc
fix: several fixes
nanderstabel Feb 20, 2024
3d8a34d
test: update postman collection
nanderstabel Feb 20, 2024
c0a2e12
fix: set `oid4vc` dependencies to specific `rev`
nanderstabel Feb 26, 2024
88467a9
chore: set `rust-version` and use `workspace.package` settings
nanderstabel Feb 26, 2024
5e62ffb
feat: add `GET` method for `credentials` endpoint
nanderstabel Feb 27, 2024
84824a0
test: add `GET` method for `credentials` endpoint in postman collection
nanderstabel Feb 27, 2024
4ed0275
chore: add `/v1/credentials/{credential_id}` to `openapi.yaml` file
nanderstabel Feb 27, 2024
224b924
chore: bump `axum` dependency to `0.7`
nanderstabel Feb 28, 2024
ca32971
chore: update `axum` related code to version `0.7`
nanderstabel Feb 28, 2024
d23a4b0
feat: add `log_error_response` macro for cleaner logging of error res…
nanderstabel Feb 28, 2024
c0a488d
chore: update POST request to a valid OBv3 `credentialSubject`
nanderstabel Mar 4, 2024
41f9a60
chore: use `TraceLayer` for proper tracing in `agent_api_rest`
nanderstabel Mar 6, 2024
882631c
fix: remove obsolete `log_error_response` macro
nanderstabel Mar 6, 2024
45569d0
refactor: use `if` + `is_err()` rather than `match` for `command_hand…
nanderstabel Mar 6, 2024
7aae22a
feat: add `NOT_FOUND` response option
nanderstabel Mar 6, 2024
aa0491a
fix: set tokio version to `1`
nanderstabel Mar 7, 2024
5074e0c
feat: initialize module
daniel-mader Mar 8, 2024
036dd44
WIP
daniel-mader Mar 8, 2024
0914830
Merge remote-tracking branch 'origin/dev' into feat/event-publisher-http
daniel-mader Mar 11, 2024
92910be
refactor: move `ApplicationState` to `agent_shared`
nanderstabel Mar 18, 2024
bf0a17f
feat: add `agent_verification`
nanderstabel Mar 19, 2024
739b3d9
style: rename `AuthorizationRequestTestFramework` to `ConnectionTestF…
nanderstabel Mar 19, 2024
dd906da
feat: add `VerificationState` to `ApplicationState`
nanderstabel Mar 19, 2024
8019606
chore: add `Cargo.lock` file
nanderstabel Mar 19, 2024
f532142
feat: add verification endpoints
nanderstabel Mar 19, 2024
308cbfd
refactor: remove `ApplicationState` struct and replace it for a tuple
nanderstabel Mar 19, 2024
d06b3e2
Merge branch 'refactor/shared-application-state' into feat/add-agent-…
nanderstabel Mar 19, 2024
73c01a4
fix: remove `ConnectionNotificationSent`
nanderstabel Mar 19, 2024
ddb4bdb
feat: add `VerificationState` to `ApplicationState`
nanderstabel Mar 19, 2024
88cab68
feat: add `authorization_request` and `connection` tables to `init.sql`
nanderstabel Mar 20, 2024
45c2c30
Merge branch 'feat/add-verification-to-state' into feat/event-publish…
nanderstabel Mar 20, 2024
7699bd3
feat: add `EventPublisherHttp`
nanderstabel Mar 20, 2024
48f24ba
Merge branch 'dev' into feat/event-publisher-http
nanderstabel Mar 22, 2024
8a64bf4
feat: add `OutboundAdapter` trait
nanderstabel Mar 25, 2024
b73e237
test: add default parameters to tests in `agent_api_rest`
nanderstabel Mar 25, 2024
91ec8a2
feat: make `EventPublisherHttp` support all different aggregates
nanderstabel Mar 25, 2024
9be53bf
test: adjust test for `EventPublisherHttp`
nanderstabel Mar 25, 2024
b35a948
feat: add `EventPublisherHttp` to `agent_application`
nanderstabel Mar 25, 2024
64a7fda
test: fix `Mutex`
nanderstabel Mar 25, 2024
85c52a1
chore: remove unused environment variables from `.env.example`
nanderstabel Mar 25, 2024
e083bfd
Merge branch 'feat/event-publisher-http' into feat/verification-api
nanderstabel Mar 25, 2024
d298326
fix: rename aggregate event publishers
nanderstabel Mar 25, 2024
6decc5d
Merge branch 'feat/event-publisher-http' into feat/verification-api
nanderstabel Mar 25, 2024
74f27ee
test: improve tests for Verification in `agent_api_rest`
nanderstabel Mar 25, 2024
3c3e9ba
fix: rename siopv2 endpoints, add `path`
nanderstabel Mar 25, 2024
60ace7e
feat: move `client_metadata` to `VerificationServices`
nanderstabel Mar 25, 2024
47bc8a6
docs: add `README.md` file for `agent_event_publisher`, remove `confi…
nanderstabel Mar 25, 2024
b14b195
Merge branch 'feat/event-publisher-http' into feat/verification-api
nanderstabel Mar 25, 2024
8ddea31
fix: default to empty `EventPublisherHttp` when `config.yml` does not…
nanderstabel Mar 26, 2024
5fb13a9
Merge branch 'feat/event-publisher-http' into feat/verification-api
nanderstabel Mar 26, 2024
f0bbe3e
fix: use `client_id` for the `connection_id`
nanderstabel Mar 26, 2024
4d1ab4b
fix: return `text/plain` instead of `application/json`
nanderstabel Mar 26, 2024
ed2cf4f
fix: add `InvalidSIOPv2AuthorizationResponse` error
nanderstabel Mar 26, 2024
1825233
docs: add comments to Verification endpoints
nanderstabel Mar 26, 2024
4f1806b
fix: fix the path to the `config.yml` file
nanderstabel Mar 26, 2024
cfef783
test: fix test
nanderstabel Mar 26, 2024
1cda540
feat: enable `agent_event_publisher_http` in docker environment
nanderstabel Mar 27, 2024
7a346d2
docs: add documentation for `SecretManager` and `EventPublisherHttp`
nanderstabel Mar 27, 2024
e20ae8f
style: use `pub type`s for adapters
nanderstabel Mar 27, 2024
c30683d
Merge branch 'feat/event-publisher-http' into feat/verification-api
nanderstabel Mar 27, 2024
2ff41cb
feat: change content-type to application/json
nanderstabel Mar 27, 2024
d090626
style: replace closure for enum variant
nanderstabel Mar 27, 2024
5dcdd05
fix: change `authorization_requests` endpoints response content-type …
nanderstabel Mar 27, 2024
e1cf09d
docs: add verification related endpoints to `openapi.yml`
nanderstabel Mar 27, 2024
ad76815
style: rename `OutboundAdapter` to `EventPublisher`
nanderstabel Mar 27, 2024
f53a9de
Merge branch 'feat/event-publisher-http' into feat/verification-api
nanderstabel Mar 27, 2024
2fd8a60
docs: specify that the default Stronghold option is temporary
nanderstabel Mar 27, 2024
fc79cd5
refactor: move `secret_manager` function to `agent_secret_manager`
nanderstabel Mar 27, 2024
2f02857
feat: add `get_authorization_requests` endpoint
nanderstabel Mar 27, 2024
ef6682b
docs: fix example link
nanderstabel Mar 27, 2024
ed9ba0c
Merge branch 'dev' into feat/verification-api
nanderstabel Apr 2, 2024
da5831a
fix: fix `SecretManager` import
nanderstabel Apr 3, 2024
d5328a5
chore: update `did-manager` and `oid4vc` dependencies
nanderstabel Apr 8, 2024
fdeb07b
fix: reset `format-lint-test` workflow
nanderstabel Apr 9, 2024
7c7faee
test: add verification endpoints to Postman collection
nanderstabel Apr 10, 2024
c3aef9e
WIP
nanderstabel Apr 9, 2024
6a79666
Merge branch 'dev' into chore/bump-oid4vc
nanderstabel Apr 17, 2024
f190ada
feat: add `default_did_method`
nanderstabel Apr 19, 2024
f1c5c6e
style: remove unnecessary `let` binding
nanderstabel Apr 19, 2024
3a9949c
feat: support just-in-time external credential signing
nanderstabel Apr 22, 2024
ca0258d
Merge branch 'dev' into feat/oid4vci-events
nanderstabel Apr 24, 2024
93c14fe
style: fix clippy
nanderstabel Apr 24, 2024
dcb45f9
WIP
nanderstabel Apr 27, 2024
699cdc4
feat: add `did:iota`
nanderstabel Apr 29, 2024
af50e98
WIP
nanderstabel May 8, 2024
835a785
feat: implement `Subject` responsible for singing and verifying data
nanderstabel May 8, 2024
b24e404
feat: add `oid4vp` support
nanderstabel May 9, 2024
3e6c088
docs: update `/v1/authorization_request` in `openapi` file
nanderstabel May 9, 2024
b477a75
Merge branch 'dev' into feat/oid4vp
nanderstabel May 9, 2024
a7972a4
chore: update postman collection
nanderstabel May 9, 2024
f750c75
fix: set `presentation_definition` to contain `VerifiableCredential`
nanderstabel May 9, 2024
63c6ab9
fix: use slice directly
nanderstabel May 9, 2024
2321126
Merge branch 'feat/oid4vp' into feat/did-manager-iota
nanderstabel May 9, 2024
791d3ac
fix: use `did:iota:rms`
nanderstabel May 9, 2024
8593f9a
style: several cleanups
nanderstabel May 9, 2024
996e6ab
docs: add documentation for using the IOTA DID Method
nanderstabel May 9, 2024
045f130
feat: update docker-compose
nanderstabel May 9, 2024
bec2356
chore: update `oid4vc` dependencies
nanderstabel May 9, 2024
a32e0bd
fix: remove `test_definition.json`
nanderstabel May 9, 2024
f2e097d
style: rename endpoint deserialization helpers
nanderstabel May 13, 2024
f86a4b4
style: rename endpoint deserialization helpers
nanderstabel May 13, 2024
3ca4abe
docs: add comment for `GenericAuthorizationResponse`
nanderstabel May 13, 2024
d5a0a45
docs: improve the IOTA DID Method related documentation
nanderstabel May 13, 2024
f164ada
style: add newline
nanderstabel May 13, 2024
8950954
Merge branch 'feat/oid4vp' into feat/did-manager-iota
nanderstabel May 13, 2024
b0ddfdc
Merge branch 'dev' into feat/did-manager-iota
nanderstabel May 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ rust-version = "1.76.0"

[workspace.dependencies]
did_manager = { git = "https://[email protected]/impierce/did-manager.git", rev = "c70c0f1" }
siopv2 = { git = "https://[email protected]/impierce/openid4vc.git", rev = "ce4e3fd" }
oid4vci = { git = "https://[email protected]/impierce/openid4vc.git", rev = "ce4e3fd" }
oid4vc-core = { git = "https://[email protected]/impierce/openid4vc.git", rev = "ce4e3fd" }
oid4vc-manager = { git = "https://[email protected]/impierce/openid4vc.git", rev = "ce4e3fd" }
oid4vp = { git = "https://[email protected]/impierce/openid4vc.git", rev = "ce4e3fd" }
siopv2 = { git = "https://[email protected]/impierce/openid4vc.git", rev = "7fdd207" }
oid4vci = { git = "https://[email protected]/impierce/openid4vc.git", rev = "7fdd207" }
oid4vc-core = { git = "https://[email protected]/impierce/openid4vc.git", rev = "7fdd207" }
oid4vc-manager = { git = "https://[email protected]/impierce/openid4vc.git", rev = "7fdd207" }
oid4vp = { git = "https://[email protected]/impierce/openid4vc.git", rev = "7fdd207" }

async-trait = "0.1"
axum = { version = "0.7", features = ["tracing"] }
Expand Down
40 changes: 21 additions & 19 deletions agent_api_rest/src/issuance/credential_issuer/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,25 @@ mod tests {
Mock, MockServer, ResponseTemplate,
};

const CREDENTIAL_JWT: &str = "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa2dF\
ODROQ01wTWVBeDlqSzljZjVXNEc4Z2NaOXh1d0p2RzFlN3dOazhLQ2d0I3o2TWtn\
RTg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are_credential_event_trigger(&self, app: Arc<Mutex<Option<Router>>>, is_self_signed: bool);
}
Expand Down Expand Up @@ -174,7 +193,7 @@ mod tests {
let credentials_endpoint_request = if is_self_signed {
CredentialsEndpointRequest {
offer_id: offer_id.clone(),
credential: json!("eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa2lpZXlvTE1TVnNKQVp2N0pqZTV3V1NrREV5bVVna3lGOGtiY3JqWnBYM3FkI3o2TWtpaWV5b0xNU1ZzSkFadjdKamU1d1dTa0RFeW1VZ2t5RjhrYmNyalpwWDNxZCJ9.eyJpc3MiOiJkaWQ6a2V5Ono2TWtpaWV5b0xNU1ZzSkFadjdKamU1d1dTa0RFeW1VZ2t5RjhrYmNyalpwWDNxZCIsInN1YiI6ImRpZDprZXk6ejZNa2lpZXlvTE1TVnNKQVp2N0pqZTV3V1NrREV5bVVna3lGOGtiY3JqWnBYM3FkIiwiZXhwIjo5OTk5OTk5OTk5LCJpYXQiOjAsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIiwiaHR0cHM6Ly9wdXJsLmltc2dsb2JhbC5vcmcvc3BlYy9vYi92M3AwL2NvbnRleHQtMy4wLjIuanNvbiJdLCJpZCI6Imh0dHA6Ly9leGFtcGxlLmNvbS9jcmVkZW50aWFscy8zNTI3IiwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIk9wZW5CYWRnZUNyZWRlbnRpYWwiXSwiaXNzdWVyIjoiZGlkOmtleTp6Nk1raWlleW9MTVNWc0pBWnY3SmplNXdXU2tERXltVWdreUY4a2JjcmpacFgzcWQiLCJpc3N1YW5jZURhdGUiOiIyMDEwLTAxLTAxVDAwOjAwOjAwWiIsIm5hbWUiOiJUZWFtd29yayBCYWRnZSIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImZpcnN0X25hbWUiOiJGZXJyaXMiLC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BWnY3SmplNXdXU2tERXltVWdreUY4a2Jjcmp\
acFgzcWQiLCJpc3N1YW5jZURhdGUiOiIyMDEwLTAxLTAxVDAwOjAwOjAwWiIsIm5\
hbWUiOiJUZWFtd29yayBCYWRnZSIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImZpcnN\
0X25hbWUiOiJGZXJyaXMiLCJsYXN0X25hbWUiOiJSdXN0YWNlYW4iLCJpZCI6ImR\
pZDprZXk6ejZNa2lpZXlvTE1TVnNKQVp2N0pqZTV3V1NrREV5bVVna3lGOGtiY3J\
qWnBYM3FkIn19fQ.r7T_zOXP7E2k7eAPq5EF20shwrnPKK0mOCfNaB0phPEXVkYS\
G_sf6QygUDuJ8-P0yU4EEajgE0dxJuRfdMVDAQ"
"credential": CREDENTIAL_JWT
}
)
);
Expand Down
2 changes: 1 addition & 1 deletion agent_api_rest/src/verification/authorization_requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub mod tests {

let body = axum::body::to_bytes(response.into_body(), usize::MAX).await.unwrap();
let form_url_encoded_authorization_request: String = String::from_utf8(body.to_vec()).unwrap();
assert_eq!(form_url_encoded_authorization_request, format!("openid://?client_id=did%3Akey%3Az6MkiieyoLMSVsJAZv7Jje5wWSkDEymUgkyF8kbcrjZpX3qd&request_uri=https%3A%2F%2Fmy-domain.example.org%2Frequest%2F{state}"));
assert_eq!(form_url_encoded_authorization_request, format!("openid://?client_id=did%3Akey%3Az6MkgE84NCMpMeAx9jK9cf5W4G8gcZ9xuwJvG1e7wNk8KCgt&request_uri=https%3A%2F%2Fmy-domain.example.org%2Frequest%2F{state}"));

let response = app
.call(
Expand Down
1 change: 1 addition & 0 deletions agent_api_rest/src/verification/relying_party/redirect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ pub mod tests {
.unwrap();
let authorization_response = provider_manager
.generate_response(&authorization_request, Default::default())
.await
.unwrap();

let response = app
Expand Down
2 changes: 1 addition & 1 deletion agent_api_rest/src/verification/relying_party/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub mod tests {
let body: String = String::from_utf8(body.to_vec()).unwrap();

let header = body.split_once('.').unwrap().0;
assert_eq!(header, "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa2lpZXlvTE1TVnNKQVp2N0pqZTV3V1NrREV5bVVna3lGOGtiY3JqWnBYM3FkI3o2TWtpaWV5b0xNU1ZzSkFadjdKamU1d1dTa0RFeW1VZ2t5RjhrYmNyalpwWDNxZCJ9");
assert_eq!(header, "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa2dFODROQ01wTWVBeDlqSzljZjVXNEc4Z2NaOXh1d0p2RzFlN3dOazhLQ2d0I3o2TWtnRTg0TkNNcE1lQXg5aks5Y2Y1VzRHOGdjWjl4dXdKdkcxZTd3Tms4S0NndCJ9");
}

#[tokio::test]
Expand Down
18 changes: 18 additions & 0 deletions agent_application/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ docker compose up
> [!NOTE]
> If you don't have rewrite rules enabled on your reverse proxy, you can set the `AGENT_CONFIG_BASE_PATH` to a value such as `ssi-agent`.

## Utilizing the IOTA DID Method
By default, UniCore uses the JWK DID Method to generate and manage DIDs. However, UniCore also supports the IOTA DID
Method, which leverages the IOTA Tangle to store your DID document. To enable the IOTA DID Method, set these environment
variables:
```yaml
AGENT_CONFIG_ISSUER_DID: <your-pre-existing-IOTA-DID>
AGENT_CONFIG_ISSUER_FRAGMENT: <your-pre-existing-IOTA-DID-fragment>
AGENT_CONFIG_DEFAULT_DID_METHOD: "did:iota"
```

UniCore supports any of the IOTA networks (Testnet, Shimmer, Mainnet). For example, if you want to enable the development network for Shimmer, the
aforementioned environment variables would look like this:
```yaml
AGENT_CONFIG_ISSUER_DID: "did:iota:rms:0x42ad588322e58b3c07aa39e4948d021ee17ecb5747915e9e1f35f028d7ecaf90"
AGENT_CONFIG_ISSUER_FRAGMENT: "bQKQRzaop7CgEvqVq8UlgLGsdF-R-hnLFkKFZqW2VN0"
AGENT_CONFIG_DEFAULT_DID_METHOD: "did:iota:rms"
```

## Leveraging Just-in-Time Data Request Events

UniCore facilitates dynamic integration with external systems through just-in-time data request events, dispatched seamlessly via an HTTP Event Publisher. This enables real-time data retrieval and on-demand generation, enhancing flexibility and efficiency in your SSI ecosystem.
Expand Down
12 changes: 9 additions & 3 deletions agent_application/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ services:
AGENT_APPLICATION_URL: ${AGENT_APPLICATION_URL}
AGENT_STORE_DB_CONNECTION_STRING: postgresql://demo_user:demo_pass@cqrs-postgres-db:5432/demo
AGENT_SECRET_MANAGER_STRONGHOLD_PATH: /app/res/stronghold
AGENT_SECRET_MANAGER_STRONGHOLD_PASSWORD: "secure_password"
AGENT_SECRET_MANAGER_ISSUER_KEY_ID: "9O66nzWqYYy1LmmiOudOlh2SMIaUWoTS"

AGENT_CONFIG_STRONGHOLD_PASSWORD: "VNvRtH4tKyWwvJDpL6Vuc2aoLiKAecGQ"
AGENT_CONFIG_ISSUER_KEY_ID: "UVDxWhG2rB39FkaR7I27mHeUNrGtUgcr"

# Uncomment the following lines to use the DID method `did:iota:rms`
# AGENT_CONFIG_ISSUER_DID: "did:iota:rms:0x42ad588322e58b3c07aa39e4948d021ee17ecb5747915e9e1f35f028d7ecaf90"
# AGENT_CONFIG_ISSUER_FRAGMENT: "bQKQRzaop7CgEvqVq8UlgLGsdF-R-hnLFkKFZqW2VN0"
# AGENT_CONFIG_DEFAULT_DID_METHOD: "did:iota:rms"
volumes:
- ../../agent_secret_manager/tests/res/test.stronghold:/app/res/stronghold
- ../../agent_secret_manager/tests/res/selv.stronghold:/app/res/stronghold
- ../../agent_event_publisher_http/config.yml:/app/agent_event_publisher_http/config.yml
- ../../agent_verification/presentation_definitions:/app/agent_verification/presentation_definitions
# TODO: Remove this. This is a workaround that ensures that the `agent_verification/presentation_definitions`
Expand Down
9 changes: 3 additions & 6 deletions agent_application/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use std::{str::FromStr, sync::Arc};

use agent_api_rest::app;
use agent_event_publisher_http::EventPublisherHttp;
use agent_issuance::{startup_commands::startup_commands, state::initialize};
use agent_secret_manager::{secret_manager, subject::Subject};
use agent_shared::config;
use agent_store::{in_memory, postgres, EventPublisher};
use agent_verification::services::VerificationServices;
use oid4vc_core::{client_metadata::ClientMetadataResource, DidMethod, SubjectSyntaxType};
use oid4vc_core::{client_metadata::ClientMetadataResource, SubjectSyntaxType};
use serde_json::json;
use std::{str::FromStr, sync::Arc};
use tracing::info;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

Expand All @@ -35,9 +34,7 @@ async fn main() {
client_name: None,
logo_uri: None,
extension: siopv2::authorization_request::ClientMetadataParameters {
subject_syntax_types_supported: vec![SubjectSyntaxType::Did(
DidMethod::from_str(&default_did_method).unwrap(),
)],
subject_syntax_types_supported: vec![SubjectSyntaxType::from_str(&default_did_method).unwrap()],
},
},
ClientMetadataResource::ClientMetadata {
Expand Down
2 changes: 2 additions & 0 deletions agent_issuance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ lazy_static.workspace = true
serial_test = "3.0"
tokio.workspace = true
tracing-test.workspace = true
async-std = { version = "1.5", features = ["attributes", "tokio1"] }
rstest.workspace = true
Loading