Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Papplic Common Security & Resilience Module

papplic-common is the shared core library for the Papplic microservices platform. It provides centralized security utilities, JWT token verification, global REST exception mapping, and OpenFeign inter-service error decoding.

Features

  • Global Exception Mappings (@RestControllerAdvice):
    • ResultNotFoundException $\rightarrow$ HTTP 404 (Not Found)
    • ResultConflictException $\rightarrow$ HTTP 409 (Conflict)
    • ResultForbiddenException $\rightarrow$ HTTP 403 (Forbidden)
    • IllegalArgumentException $\rightarrow$ HTTP 400 (Bad Request)
    • Generic Exception $\rightarrow$ HTTP 500 (Internal Server Error)
  • Feign Inter-Service Resilience (CustomFeignErrorDecoder):
    • Decodes downstream non-2xx HTTP status codes into domain exceptions, preventing raw FeignException cascades.
  • Pluggable Festival Authentication & SSO Infrastructure (de.papplic.common.security.auth):
    • FestivalAuthProvider: Interface for multi-service festival role providers (getOrder(), authenticate()).
    • AuthResult: DTO carrying authentication state, claims, roles, and default redirect URLs.
    • JwtCookieAuthenticationFilter: Reusable Spring Security filter resolving JWT from subdomain-wide papplic_token cookies or Bearer headers.
    • AuthCookieUtils: Helper for secure cookie creation, deletion, and subdomain resolution (.papplic.de / .localhost).
  • Transactional Outbox Infrastructure (de.papplic.common.outbox):
    • AbstractOutboxEvent, OutboxRepository, OutboxDispatcher, and OutboxPublisher for resilient domain event dispatching.
  • Shared Security Infrastructure:
    • JWT claim validation, AES encryption helpers, and security exception base.

Build & Install

# Build and install to local Maven repository
mvn clean install

Maven Dependency Usage

Add the following dependency to any Papplic microservice pom.xml:

<dependency>
    <groupId>de.papplic.common</groupId>
    <artifactId>papplic-common</artifactId>
    <version>1.0</version>
</dependency>

Requirements

  • Java: 21
  • Spring Boot: 4.1.0+

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages