Skip to content

microservices-thm-ss21/user-service

Repository files navigation

User Service

Service responsible for managing users and login.

Structure

  • This is a closed community. You require an admin to create an account for you

  • This is the only entry-point into the microservice network via the /login routes. Everything else is hidden behind the authentication.

  • There are three different Global-Roles:

    • Admin: Every permission on everything including invites

    • Support: Soft-Permissions: adding a user to any project

    • User: Create project

  • We have three default users:

    • username: Peter_Zwegat, password: password, role: ADMIN

    • username: Kim-Jong-Dos, password: password, role: SUPPORT

    • username: Kim-Jong-On, password: password, role: USER

Tech-Stack

The user service is based on the Spring Framework with Webflux and Netty as its HTTP-server stack and ActiveMQ connections as message broker. The service is connected to dedicated PostgreSQL database, where data is persisted.

Database / PostgreSQL

The database holds all information of registered users.

HTTP API

The API is documented as OpenAPI Specification

To test the API please use the Postman collection.

Message-Broker / ActiveMQ

The service sends events when:

  1. microservices.dataEvents:

    • User: Created, Updated or deleted

  2. microservices.domainEvents:
    Extended events with additional information when:

    • The user changed its username

    • The user changed its lastname

    • The user changed its name

    • The user changed its email

    • The user changed its date of birth (lol)

    • The Global Role of a user got changed

The user service is not listening to any ActiveMQ topic.

Login

The login to the system is realized via HTTP-Basic auth to /login. After that a JWT is issued which contains all relevant information about the user. The JWT is valid for a limited period of time. A reissue mechanism or a blacklist is not (yet) implemented.

Further Reading

Please refer to the README of the Orga-Repository for more information. This service uses the service-lib as a dependency.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •