User Service
Overview
User service is responsible for user data management and providing functionality to login and logout into Digit system
Pre-requisites
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
Encryption and MDMS services are running
PSQL server is running and database
Redis is running
Key Functionalities
Store, update and search user data
Provide authentication
Provide login,logout functionality into DIGIT platform
Store user data PIIs in encrypted form
Interaction Diagram
Deployment Details
Setup latest version of egov-enc-service and egov-mdms- service
Deploy latest version of egov-user service
Add Role-Action mapping for API’s
Configuration Details
Following are the properties in application.properties file in user service which are configurable.
Property | Value | Remarks |
---|---|---|
| 10 | default search record number limit |
| true | whether citizen login otp based |
| false | whether employee login otp based |
| 123456 | fixed otp for citizen |
| false | allow fixed otp for citizen |
| true | whether otp compulsory for registration |
| 10080 | validity time of access token |
| 20160 | validity time of refresh token |
| 90 | expiry date of a password |
| 60 | unlock time |
| 30 | window size for counting attempts for lock |
| 5 | max failed login attempts before account is locked |
| pb |
|
Integration
Integration Scope
User data management and functionality to login and logout into Digit system using otp and password.
Integration Benefits
Providing following functionality to citizen and employee type users
Employee:
User registration
Search user
Update user details
Forgot password
Change password
User role mapping(Single ulb to multiple role)
Enable employee to login into DIGIT system based on password.
Citizen:
Create user
Update user
Search user
User registration using OTP
OTP based login
Steps to Integration
To integrate, host of egov-user should be overwritten in helm chart.
Use
/citizen/_create
endpoint for creating users into the system. This endpoint requires the user to validate his mobile Number using otp. First otp will be send to his mobile number and then that otp will be send asotpReference
in the request bodyUse
/v1/_search
and/_search
endpoints to search users in the system depending on various search parametersUse
/profile/_update
for updating the user profile. The user will be validated (either by otp based validation or password validation) when this API is called/users/_createnovalidate
and/users/_updatenovalidate
are endpoints to create user data into the system without any validations (no otp or password required). They should be strictly used only for creating/updating user’s internally and should not be exposed outsideForgot password: In case the user forgets password it can be reset by first calling
/user-otp/v1/_send
which will generate and send otp on employee’s mobile number, the pa