Skip to content

Commit

Permalink
[INJIMOB-2109] - create component and sequence diagram for Inji Wallet
Browse files Browse the repository at this point in the history
Signed-off-by: swatigoel <[email protected]>
  • Loading branch information
swatigoel committed Oct 7, 2024
1 parent 1b1affc commit 321d186
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,9 @@ fileignoreconfig:
- filename: components/FaceScanner/LivenessDetection.tsx
checksum: d4140a42ee9ca0f7c90e490f762d181a723fd9dd20db891cbbe53bfbd8f81632
- filename: machines/VerifiableCredential/VCItemMachine/VCItemActions.ts
checksum: 9b68ccc45681459d164197f73a1875e6f8bdf473acede18c811f4a784fca00e0
checksum: 9b68ccc45681459d164197f73a1875e6f8bdf473acede18c811f4a784fca00e0
- filename: docs/InjiWalletComponents.drawio
checksum: d295ba37678f892d6939fa51b7e936d942fb9fa9b29ca4b64f0acef28ffeffa1
- filename: docs/InjiWalletComponents.md
checksum: 2e1d6b147803bfcf93c1f83fcd01242c0d5d873817cc135491a24fecaae2b53e
version: ""
73 changes: 73 additions & 0 deletions docs/InjiWalletComponents.drawio

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions docs/InjiWalletComponents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# **Inji Wallet Components**

<!-- TOC -->

- [**Inji Wallet Components**](#inji-wallet-components)
_ [**Inji Wallet**](#inji-wallet)
_ [**Mimoto**](#mimoto)
_ [**Inji Verify**](#inji-verify)
_ [**Inji Certify**](#inji-certify)
_ [**Data Share**](#data-share)
_ [**ESignet**](#esignet) \* [\*\*Native Libraries](#native-libraries)
<!-- TOC -->

### **Inji Wallet**

- The Inji Wallet is a mobile application for Android and iOS developed in react native.
- It offers a secure, trustworthy, and dependable mobile Verifiable Credentials wallet designed to fulfil the following functions
- Download and store Verifiable Credentials
- Conduct offline face verification
- Share Verifiable Credentials
- Enable users to log in to relying parties with their credential
- Generate a QR code for the credential to be shared offline or with other application.

### **Mimoto**

- Mimoto is a BFF(Backend for Frontend) for Inji Wallet. It's being used to get default configuration, list of trusted issuers and few other services as mentioned below:
- Gives default properties needed by Inji Wallet
- Gives the List of Issuers Supported by the Inji Wallet through mimoto-issuers-config.json
- Gives access token based on authorization code to download credential
- Allows to wallet binding so that user can log in to relying party

### **Inji Verify**

- **Inji Verify** stands out as a robust verification tool specifically designed to validate the verifiable credentials encoded in QR codes through an intuitive web portal interface.
- Inji Verify can verify the Credential either via Scan or Upload Functionality
- Inji Verify supports the QR code generated in VC to verify

### **Inji Certify**

- Inji Certify lets organizations issue and manage verifiable credentials, empowering users with greater control over their data and access to services.
- Inji Certify Integrate with specific plugins to retrieve the data from the registry and convert the raw Data into verifiable Credential and Issues them to wallet to manage it.

### **eSignet**

- **eSignet** strives to provide a user-friendly and effective method for individuals to authenticate themselves and utilize online services while also having the option to share their profile information. Moreover, eSignet supports multiple modes of identity verification to ensure inclusivity and broaden access, thereby reducing potential digital barriers.
- eSignet Allows us to perform the authorization of the resident on the portal before downloading the credential

### **Native Libraries**

- **Secure-Keystore** is a module to create and store keys in android hardware keystore and helps to do encryption, decryption, and hmac calculation
- **Tuvali** is a module for the OpenID for Verifiable Presentations over BLE implementation to support sending vc/vp using Bluetooth Low Energy local channel
- **Pixelpass** is a module to generate QR code from VC data and decode from QR to get VC data
- **VCI client** is a module to support OpenId4VCI specification for downloading the credential
Binary file added docs/InjiWalletComponents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions docs/InjiWalletSequence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# **Understanding the workflow**

### **Inji Wallet**

- The use installs the application on Android or iOS device.
- Application link is available in our sandbox env https://collab.mosip.net/
- After installation, user will be asked to select unlock mehtod as passcode or biometric to add security to the applicaiton
- After selecting unlock method, user will be navigated to Home screen.
- There is plus icon on home screen, after tapping on that icon, it will display list of issuers supported by Inji wallet to downlaod credentials.
- List of Issuers supported and sourced from [mimoto-issuers-configuration](https://github.com/mosip/inji-config/blob/collab/mimoto-issuers-config.json)

### **Selection of Issuer and credential type:**

- The users can select an Issuer from the list of trusted issuers
- On Clicking the issuer, user will be redirected to credential Types, where user will be displayed with list of credentials supported by the selected issuer.
- Credential Types of the issuers are sourced from the issuers wellknown **"/.well-known/openid-credential-issuer"**
- The users can select a credential type from the available options provided by the issuers.

**Sequence Diagram for the Inji Wallet is mentioned here**

![inji-wallet-sequence.png](InjiWalletSequence.png)

### **Authorization**

- When the user selects any credential type, user is redirected to the authorization page for that specific issuer.
- Once authorization is successful, authorization server return the **"authorizationCode"**
- Inji Wallet sends the authorization code to authorization server through Mimoto to perform the client assertions.
- Once authorized, authorization server issues token response, which include **access_token**.
- The "access_token" will be used to download the credential through VCI.

### **VC Issuance**

- Inji wallet generates a keypair using secure-keystore module and signs the credential request.
- It invokes the issuer's VCI endpoint and send this credential request along with access token issued during authorization.
- Inji Wallet receives the credential back, displays it and stores in internal storage to support offline transfer.

### \*\*Display and Store Credential

- Inji Wallet uses the credential response and applies the issuers wellknown display properties to modify the template text and background colour.
- It also uses order field in wellknown to render the fields in the same order.

### **Supported QR Codes**

- Inji Wallet uses Pixelpass libary to generate the QR to emded complete VC within the QR.
- This library supports the VC without biometric/face

### **Offline BLE Sharing**

- Inji Wallet use Tuvali libary to support offline BLE sharing with relying parties or verifiers.
- The user can tap on kebab popup icon (three dots) and initiate the flow with share or share with selfie option.
Binary file added docs/InjiWalletSequence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions docs/InjiWalletSequenceMermaid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
sequenceDiagram
actor User
User->>+Inji Wallet: Launches Inji Wallet in mobile
Inji Wallet->>+Mimoto: Fetch trusted issuers
Mimoto->>+Inji Wallet: List of Issuers
User->>Inji Wallet: User chooses an issuer
Inji Wallet->>Inji Certify: Fetches issuers' well-known details
Inji Certify->>+Inji Wallet: Provide List of Credential types
User->>Inji Wallet: User chooses a credential type
Inji Wallet->>+eSignet: Authentication request
User->>eSignet: User provides details for authentication
eSignet->>+Inji Wallet: Authentication response with auth code
Inji Wallet->>+Mimoto: Initiate Token request
Mimoto->>+eSignet: Access Token request with client details
eSignet->>+Mimoto: Token response with access token
Mimoto->>+Inji Wallet: Access token
Inji Wallet->>+Inji Certify: Credential request with token
Inji Certify->>+Inji Wallet: VC sent in response
Inji Wallet->>Inji Wallet: Store the VC and generate the QR code

0 comments on commit 321d186

Please sign in to comment.