Users Service

The Centralized Users Service is a fundamental component of our platform, responsible for managing user authentication and authorization across various use cases, including users accessing external Ocelot gateway, users using our DSquares platform, and generating tokens for inter-service communication with specified permissions. This document provides an overview of the architecture and functionality of the Centralized Users Service.

Architecture

The Centralized Users Service follows a centralized and scalable architecture, comprising the following key components:

  1. User Management: The service provides functionality for managing user accounts, including user registration, authentication, and authorization. It serves as the central repository for user-related data.

  2. Token Generation: Within the Centralized Users Service, token generation is a crucial functionality. The service generates tokens for multiple types of users and purposes:

    • Tokens for users accessing the external Ocelot gateway.

    • Tokens for users using our DSquares platform.

    • Tokens for inter-service communication within our microservices architecture, with specified permissions and scopes.

  3. Authentication and Authorization: The Centralized Users Service handles user authentication and authorization requests, verifying user credentials and determining access rights based on predefined permissions and roles.

Functionality

The Centralized Users Service offers the following core functionality:

  1. User Authentication and Authorization:

    • Authentication: Users authenticate themselves through the Centralized Users Service by providing their credentials (e.g., username and password).

    • Authorization: Upon successful authentication, the service determines the user's access rights based on predefined roles and permissions.

  2. Token Generation:

    • External Ocelot Gateway Tokens: The service generates tokens for users accessing the external Ocelot gateway, allowing them to authenticate and access protected resources.

    • DSquares Platform Tokens: Tokens are generated for users using our DSquares platform, providing them with access to platform features and functionalities.

    • Inter-Service Communication Tokens: The service generates tokens for inter-service communication within our microservices architecture, enabling secure communication between services with specified permissions and scopes.

Usage Example

To illustrate the usage of the Centralized Users Service, consider the following example:

  1. User Authentication: A user attempts to log in to the DSquares platform by providing their credentials.

  2. Authentication Process: The Centralized Users Service verifies the user's credentials and authenticates the user.

  3. Token Generation: Upon successful authentication, the service generates a token for the user, allowing them to access platform features and functionalities.

  4. Inter-Service Communication: In another scenario, a microservice needs to communicate with another microservice within our architecture.

  5. Token Generation for Inter-Service Communication: The Centralized Users Service generates a token with the necessary permissions and scopes for the requesting microservice, enabling secure communication between the services.

Last updated