UI Patterns and Flows#
Architecture#
The architecture of the Inrupt Data Wallet consists of a Backend-for-Frontend web application pattern with the following key components:
Data Wallet mobile application: The Wallet user-facing mobile application that users interact with. It communicates exclusively with Inrupt’s Enterprise Solid Server (ESS) Wallet Service.
ESS Wallet Service: The Wallet Service acts as an intermediary between the Wallet mobile app and the underlying ESS microservices. The Wallet Service is responsible for:
Storing data in Pod Services.
All CRUD operations for the Wallet.
Provisioning the Wallet storage and the correct authorizations for containers like the inbox.
Invoking the ESS Access Grants microservice to initiate a consent flow (Access Requests and Access Grants).
Fetching the WebID from the WebID Service to obtain information about the Wallet user.
The architecture diagram also includes two business data consumer applications that request data from the Wallet Service using Access Requests. The Wallet Service simplifies the management of Access Requests and the generation of Access Grants by communicating with the Access Grants Service and managing the Wallet inbox.
The Wallet Service communicates with the microservices and other components using the Solid protocol.
The Identity Provider plays a key role in the authentication of both user and business data consumers.
At the core of the Wallet security architecture lies a robust set of measures designed to protect the user’s data and ensure the integrity of all interactions. See more at Security.
Authentication: All Wallet endpoints are authenticated, so only authenticated entities can interact with Wallet Service and the Wallet.
Authorization and Access Control: Only authorized applications are able to request access to data inside the Wallet. Access Requests and Grants are generated as tamper-proof Verifiable Credentials.
Encryption: All data transmitted to and from the Wallet is encrypted, ensuring user information remains confidential and protected from interception or unauthorized access during transit.
Wallet Storage Organization#
The Wallet uses a simple storage structure to manage resources, receive requests for access to data, and manage the lifecycle of Access Requests and Grants. The following containers are created at provision time.
/wallet
/inbox
/accessgrants
/accessrequests
Manage Access Requests and Grants#
The Wallet Service is responsible for managing the state of Access Requests and Grants within the Wallet storage. The Wallet’s role is limited to initiating request actions and invoking the Wallet Service. The Wallet Service is responsible for creating new Access Grants. Most interactions involving the /inbox
, /wallet
, /accessrequests
, and /accessgrants
containers are exclusively managed by the Wallet Service.
List Pending Requests#
Shows all pending Access Requests the user has not yet accepted or rejected.
It reads the /inbox
container, looks for active Access Requests that need to be addressed, and shows them to the user.
Approve Request#
The user is able to view an Access Request and approve or reject it. When the Access Request is approved, it moves from the /inbox
to the /accessrequests
container, and the Access Grant is stored in an /accessgrants
container.
List Active Access Grants and Access Requests#
The Wallet Service calls the ESS Access Grant Service /derive endpoint and brings back a list of all the active Access Grants. It fetches the revocation list and checks if any of the Access Grants returned have been revoked using the /verify endpoint.
When the user switches to the Request or Access tabs in the Wallet, the Access Grants and Access Requests views on those tabs are synchronized with the ESS Access Grant Service.
View Grant#
Viewing an Access Grant displays the following attributes:
Expiry date
Purpose
Resource Name
Data Requester WebID, and information based on the Data Requester WebID
Revoke Grant#
A user can revoke an Access Grant by invoking the /accessgrants/{id}
endpoint. Revoking a Grant will impact the /accessgrants
container. It removes the active Grant stored in the /accessgrants
container and calls the Access Grant service to revoke that Grant.
Download a Resource into the Wallet#
This pattern enables users to retrieve a resource from an external application and store it in their Wallet. When resources are available via QR codes, users can scan the QR code representing a resource and store it in their Wallet.
The business data consumer application generates a QR code for a particular resource, such as a verifiable credential. The user then scans the QR code from the Wallet. The Wallet retrieves the resource and sends a request to the Wallet Service to securely store it.