You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo/a2a-oid4vp/README.md
+23-20Lines changed: 23 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,20 @@ Heka Identity Platform is used as a decentralized identity wallet / agent provid
8
8
9
9
This is a demo code not intended for production-quality usage.
10
10
11
-
## Scenario
11
+
## Scenario and Demo Flow
12
12
13
13
This demo showcases how an AI agent can request additional authentication from a user using the **OID4VP** protocol and how Heka Identity Platform enables such capabilities.
14
14
15
15
The **Demo Agent** acts as an AI-powered assistant capable of processing user queries and generating responses using Genkit and the OpenAI API.
16
16
The agent is configured to require the user to present a verifiable credential via OID4VP before fulfilling any requests.
17
17
18
-
The following mapping applies for roles/parties described in extension spec:
18
+
The following mapping applies for roles/parties described in [OID4VP In-Task Authentication extension spec](https://github.com/DSRCorporation/a2a-oid4vp-in-task-auth-extension/blob/main/v1/spec.md):
19
19
- A2A Client → [CLI client](src/cli.ts)
20
20
- A2A Server → [Demo Agent Server](src/agent/index.ts)
21
21
- OID4VP Wallet → [Heka Mobile Wallet](../../heka-wallet)
HIS->>Agent: (5.2) Notify on verification status (Webhook/WebSocket)
45
+
Agent->>Agent: (6) Check verification status
46
+
Agent->>LLM: (7.1) Proceed with the Task (with verified context)
47
+
LLM-->>Agent: (7.2) LLM Response
48
+
Agent->>CLI: (7.3) Status Update (state: completed + result)
49
+
CLI->>User: (7.4) Display Task Result
47
50
```
48
51
49
52
1.**Task Initiation**: A user sends a message to the Demo Agent via the A2A CLI.
50
53
2.**In-Task Authentication Request**: The Demo Agent determines that the context/task requires authentication. It invokes Heka Identity Service API to generate OID4VP authorization request, then sends CLI Client a `status-update` with the `auth-required` state that also includes OID4VP authorization request metadata.
51
-
3.**OID4VP Flow Initiation**: The CLI client detects the OID4VP request and invokes Heka Wallet to present the requested credentials.
54
+
3.**OID4VP Flow Initiation**: The CLI client receives a status update, detects the OID4VP request, and invokes Heka Wallet to present the requested credentials.
52
55
4.**Sharing Verifiable Presentation**: Heka Wallet receives OID4VP authorization request, displays requested credentials / claims to a user. After receiving a confirmation, the wallet sends authorization response (containing Verifiable Presentation) to Heka Identity Service verifier endpoint (OID4VP `direct_post.jwt` response mode).
53
56
5.**Verification**: Heka Identity Service receives and validates the presentation, then sends an out-of-band notification with verification status to the Demo Agent.
54
57
6.**In-Task Authentication Completion**: The Demo Agent receives notification and makes a decision on proceeding with a task based on verification status.
@@ -81,7 +84,7 @@ However, there are values that need to be manually set up:
81
84
Other supported values:
82
85
-`DEMO_AGENT_PORT` - Port to be used by the Demo Agent server, defaults to `10003`
83
86
-`CLI_CLIENT_PORT` - Port to be used by CLI Client inbound transport (DidComm inbound transport, used for Mobile Wallet invocation), defaults to `3010`
84
-
-`IDENTITY_SERVICE_URL` - URL of local instance of Heka Identity Service, defaults to `http://localhost:3000`. Must be changed if host, port or API prefix configuration of the instance differs from default values
87
+
-`IDENTITY_SERVICE_URL` - URL of local instance of Heka Identity Service, defaults to `http://localhost:3000`. Must be changed if host, port, or API prefix configuration of the instance differs from default values
85
88
-`IDENTITY_SERVICE_ACCESS_TOKEN` - Heka Identity Service API token, default value is a demo token with extremely long validity period. Must be changed if JWT configuration for Heka Identity Service instance was changed
86
89
87
90
### 3. Setup Heka Identity Platform
@@ -95,7 +98,7 @@ This can be done using the following command:
To run the service instance itself, go to [Heka Identity Service folder](../../heka-identity-service), install dependencies, set up the DB migrations and run the app:
101
+
To run the service instance itself, go to [Heka Identity Service folder](../../heka-identity-service), install dependencies, set up the DB migrations, and run the app:
99
102
100
103
```bash
101
104
yarn install && yarn migration:up
@@ -135,7 +138,7 @@ yarn run:android
135
138
yarn run:ios
136
139
```
137
140
138
-
Keep Heka Wallet logs open, complete wallet onboarding process and find a log in the following format: `Public DID: did:peer:...`.
141
+
Keep Heka Wallet logs open, complete wallet onboarding process, and find a log in the following format: `Public DID: did:peer:...`.
139
142
Copy `<public-did-peer>` value and put it into the demo `.env` file as `HOLDER_PUBLIC_DID` value.
140
143
The public DID value is persistent and will be relevant until you fully reset your Heka Wallet app (by removing application data or reinstalling it completely).
Copy file name to clipboardExpand all lines: heka-identity-service/docs/setup.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,19 +38,14 @@ You can modify JWT verification options by setting the following environment var
38
38
39
39
While integration with external auth providers is supported, it's recommended to use [Heka Auth Service](https://github.com/hiero-ledger/heka-identity-platform/tree/main/heka-auth-service) for basic deployments.
40
40
41
-
## Mediator
42
-
43
-
Heka Identity Service can also function as a Credo Mediator. To enable this functionality
44
-
set `AGENT_AUTO_ACCEPT_MEDIATION_REQUESTS` environment variable to `true`
45
-
46
41
## Persistence
47
42
48
43
For persistence this backend uses `MikroORM` with `Postgres` and requires access to pre-configured `Postgres` instance.
49
44
To start `postgres` compatible with default settings in docker use the following command:
0 commit comments