The entry point for all client requests in the Collaborative Knowledge Workspace (CKW) platform. It handles request routing, authentication validation, and protocol conversion.
- Request Routing: Routes traffic to appropriate microservices based on path patterns.
- Security: Validates JWT tokens using a custom
JwtValidationfilter. - Access Control: Validates page access permissions via gRPC calls to
Workspace Service. - Protocol Conversion: Support for both HTTP and gRPC communication.
- CORS Handling: Centralized CORS configuration for the frontend.
- API Documentation Aggregation: Routes to OpenAPI docs of individual services.
- Spring Boot 4.0
- Spring Cloud Gateway (WebFlux-based)
- Spring gRPC (Client)
- Java 25
- Java 25
- Access to other microservices (Auth, User, Page, Workspace)
./gradlew bootRunThe gateway runs on port 8080 by default.
Key environment variables/properties:
SERVER_PORT: Port for the gateway (default: 8080)SPRING_CLOUD_GATEWAY_ROUTES: Route configurations (defined inapplication.yaml)
| Service | Route Pattern | Target URL |
|---|---|---|
| Auth | /auth/** |
http://ckw-auth-service:8080 |
| User | /user/** |
http://ckw-user-service:8080 |
| Workspace | /workspaces/** |
http://ckw-workspace-service:8080 |
| Page | /workspace/{wid}/documents/** |
http://ckw-page-service:8080 |
| Collaboration | /collaboration/** |
ws://ckw-collaboration-service:8080 |
Aggregated documentation is available at:
/api-docs/auth/api-docs/user/api-docs/workspace/api-docs/page