All projectsGET /projects/auth-and-security

Auth and security

Login, registration and role-based access across services.

Type
Work
Role
Backend developer, Auth Service
Status
Shipped
When
2023 to present
  • Java 17
  • Spring Boot
  • Spring Security
  • JWT
  • API Gateway
  • Feign Client

Problem

Every service had to trust the same identity, and calls between services had to be secured as well as the calls from the browser.

Approach

  1. Registration and login issue JWTs through Spring Security.
  2. Role-based access control guards endpoints.
  3. A refresh flow renews tokens without a new login.
  4. Inter-service calls through Feign clients carry secured credentials.
diagram: auth-and-security

Architecture

Architecture map5 components · 4 connections
84%
client Angular client service API Gateway service Auth Service service Other services database MySQL HTTPS + JWTlogin, refreshverified JWTusers, roles

Fit shows the whole map. Zoom in, then drag or scroll to explore.

Connections

  • Angular client to API GatewayHTTPS + JWT
  • API Gateway to Auth Servicelogin, refresh
  • API Gateway to Other servicesverified JWT
  • Auth Service to MySQLusers, roles