AB
Back to work

Case 02

Hotel Rating System

Identity and failure handling across microservices

DESIGNDELIVEROPERATE

Several microservices behind one gateway, with Okta handling login and circuit breakers keeping one failure from spreading.

How it fits together

clientgatewayidentityhotel servicerating service

The problem

Checking the login once at the front door is not enough. Each service receives tokens, calls its neighbours, and can fail on its own.

Where it could go wrong

What is exposed

  • OAuth flows
  • API gateway
  • service-to-service trust

Checks in place

  • OIDC token validation
  • request rate limits
  • circuit breaking

Result

  • authenticated service calls
  • bounded failure
  • independent data stores

How I built it

Okta and Spring Security handle OAuth2/OIDC, and every service validates the token itself instead of trusting the gateway. The gateway rate-limits requests. Circuit breaker, retry and bulkhead patterns stop one slow service taking down the rest. MySQL holds hotel records, MongoDB holds ratings.

JavaSpring BootSpring SecurityOktaMySQLMongoDB

What it does

  • Okta and Spring Security
  • Gateway rate limiting
  • Eureka service discovery
  • Resilience4j failure controls

What I would improve

  • Move secrets and environment configuration out of application files
  • Add automated dependency and container checks
  • Model workload identity and network policy for a Kubernetes deployment

Code

View repository