User management
Feature Branch name: user-mangement_feature
API Contract: here
UMS is the initial Anuvaad module that facilitates user login and other account-related functionalities. It features admin level login and user level login. Only super Admin has the authority to create new organizations or add new users to the system (if not for sign-up). Admin can assign roles to the new users as well.
Modules
User Modules
CreateUsers
Whitelisted bulk API to create/register users in the system.
Mandatory params: userName
, email
, password
, roles
Actions:
Validating input params as per the policies
Storing user entry in the database and assigning a unique id (
userID
)Triggering verification email
VerifyUsers
Whitelisted API to verify and complete the registration process on Anuvaad.
Mandatory params: userName
, userID
Actions:
Validating input params as per the policies
Activating the user
Triggering registration successful email
UserLogin
Whitelisted API for login.
Mandatory params: userName
, password
Actions:
Validating input params as per the policies
Issuing auth token (JWT token)
Activating user session
UserLogout
Whitelisted API for logging out.
Mandatory params: userName
Actions:
Validating input params as per the policies
Turning off user session
AuthTokenSearch
API to validate auth tokens and fetch back user details.
Mandatory params: token
Actions:
Validating the token
Returning user records matching the token only when the token is active
Same API is used for verifying a token generated on forgot-password as well.
UpdateUsers
Bulk API to update user details, RBAC enabled.
Mandatory params: userID
Updatable fields: orgID
, roles
, models
, email
Actions:
Validating input params as per the policies
Updating DB records
ForgotPassword
API for forgot password.
Mandatory params: userName
Actions:
Validating input params as per the policies
Generating reset password link and sending it via email
ResetPassword
API to update password, RBAC enabled.
Mandatory params: userName
, password
Actions:
Validating input params as per the policies
Generating reset password link and sending it via email
Admin Modules
(Only Admin has access)
OnboardUsers
Bulk API to onboard users to the Anuvaad system.
Mandatory params: userName
, email
, password
, roles
Actions:
Validating input params as per the policies
Storing user entry in the database and assigning a unique
userID
User account is verified and activated by default
SearchUsers
API for bulk search with pagination property.
Actions:
Validating input params as per the policies
All user records are returned if
skip_pagination
is set to TrueWhen no offset and limit are provided, default values are set as per configs
Only the records matching the search values are returned if
skip_pagination
is False
ActivateDeactivateUser
API to update the activation status of a user.
Mandatory params: userName
, is_active
Actions:
Validating input params as per the policies
Updating the user activation status
SearchRoles
API to fetch active roles in Anuvaad.
Actions:
Returning active role codes
Organization Modules (Currently only ADMIN has access)
CreateOrganization: Bulk API to upsert organizations.
Mandatory params: code
, active
Actions:
Validating input params as per the policies
Creating or deactivating orgs as per
active
status on request
SearchOrganization: API to get organization details.
Actions:
If
org_code
is given, searches for that organization alone; otherwise, all organizations are returned.
Extension (for Anuvaad web extension)
GenerateIdToken: Generating token for web extension user.
Mandatory params: id_token
Actions:
Decrypting and validating the token
If the token is valid, register the user and return auth token
Notes
Add APIs with Zuul if they need external access.
Rebuild and deploy UMS whenever a new role is added with Zuul.
Email ID used for system notifications:
[email protected]
Email templates are available here.
Setup Tips
Run the docker container.
Initialize the DB by creating a Super-Admin account directly in the DB.
Additional users can be added from the UI by logging into the super admin account.
How to Initialize UMS without UI?
Create an account (Admin is preferred) using the API
anuvaad/user-mgmt/v1/users/create
.Get the verification token from the email (2nd last ID on the ‘verify now’ link) or the
userID
from the user table.Complete the registration process by calling the
anuvaad/user-mgmt/v1/users/verify-user
API.
Last updated