Skip to content

Commit

Permalink
ES-692 Write technical document for signup service
Browse files Browse the repository at this point in the history
Signed-off-by: pr <[email protected]>
  • Loading branch information
panharith-0118 committed Jan 18, 2024
1 parent 8e28fcc commit e1c93f1
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,56 @@
# esignet-signup

signup-service is part of the esignet modules, but has a separate Helm chart so as to install and manage it in a completely independent namespace.
Signup-service is part of the esignet modules, but has a separate Helm chart so as to install and manage it in a completely independent namespace.

Signup-service is a spring boot application with endpoints to

1. Generate Challenge (Only OTP supported)
2. Verify Challenge
3. Register user with verified transaction
4. Check registration status
5. Reset the password of the registered user

Signup service connects to MOSIP IDRepo Identity service to register the verified user as an identity record.
ID Repo identity service publishes the registered identity to MOSIP IDA. This enables authentication with the registered
username and password with eSignet.

Publishing registered/updated identity to MOSIP IDA is an async process. Hence, status endpoint is configured to check
the latest status from server after every configured interval from signup UI.

### Signup service uses spring cache to store the transaction details.

Registration flow:

| Endpoint | Cache | Evict |
|-------------------|----------------------------------------------------------------------|-----------------------------------------------------|
| generateChallenge | challenge-generated (k: transactionId, v: SignupTransaction) | |
| verifyChallenge | challenge-verified (k: verified-transactionId, v: SignupTransaction) | challenge-generated (k: transactionId, v: SignupTransaction) |
| register | status-check (k: verified-transactionId, v: SignupTransaction) | challenge-verified (k: verified-transactionId, v: SignupTransaction) |
| status | status-check (k: verified-transactionId, v: SignupTransaction) | |

Reset Password flow:

| Endpoint | Cache | Evict |
|-------------------|----------------------------------------------------------------------------|-----------------------------------------------------|
| generateChallenge | challenge-generated (k: transactionId, v: SignupTransaction) | |
| verifyChallenge | challenge-verified (k: verified-transactionId, v: SignupTransaction) | challenge-generated (k: transactionId, v: SignupTransaction) |
| resetPassword | status-check (k: verified-transactionId, v: SignupTransaction) | challenge-verified (k: verified-transactionId, v: SignupTransaction) |
| status | status-check (k: verified-transactionId, v: SignupTransaction) | |

## Build & run (for developers)
The project requires JDK 11.
1. Build and install:
```
$ mvn clean install -Dgpg.skip=true
```
1. Build Docker for a service:
2. Run with IntelliJ IDEA
2.1 Right click on parent POM file (pom.xml) and click on button "Add as Maven Project".
2.2 Download kernel-auth-adapter-1.2.1-es-SNAPSHOT.jar file from https://oss.sonatype.org/#nexus-search;gav~io.mosip.kernel~kernel-auth-adapter~~~~kw,versionexpand
2.3 Add that file to "signup-service" in Project Structure settings of IntelliJ, and Apply.
2.4 right click on file signup-service/src/main/java/io/mosip/signup/SignUpServiceApplication.java and click on Run
3. Build Docker for a service:
```
$ docker build -f Dockerfile
```
Expand Down

0 comments on commit e1c93f1

Please sign in to comment.