Commit Graph

88 Commits

Author SHA1 Message Date
akastijn 4267c782a7 Add debug logging for user loading, permissions processing, and token generation in LoginController. 2025-07-29 23:16:04 +02:00
akastijn 343964eda8 Add server.address property and update issuer field in LoginController to use dynamic server address. Modify SQL query in PrivilegedUserMapper to simplify permissions retrieval. 2025-07-28 23:01:18 +02:00
akastijn 5d8ab2deef Add debug log for generated token in LoginController. 2025-07-06 19:39:46 +02:00
akastijn aef32a8982 Change log level to DEBUG in beta configuration and improve logging in LoginController. 2025-07-06 19:23:38 +02:00
akastijn c42fc38b2c Add SecurityAuthFailureHandler for better handling of authentication and access failures; update SecurityConfig to integrate the new handler. 2025-07-04 19:49:04 +02:00
akastijn 213f9987d9 Remove particle component and its associated routes and security controls. 2025-07-03 20:08:56 +02:00
akastijn 6ed2e15017 Parametrize notification server URL configuration for improved flexibility. 2025-06-29 03:17:25 +02:00
akastijn 7fc25f46f3 Add endpoints, services, and security controls for particle file management, including save and download APIs. 2025-06-29 03:15:39 +02:00
akastijn c72703ea32 Refactor user privilege handling to use Optional instead of null checks. Remove unused cache entries and update security configuration to refine access controls. 2025-06-23 21:34:54 +02:00
Teriuihi d6faaba01c Update security configuration to allow unrestricted access
Changed default security rule to permit all requests instead of requiring authentication. Adjusted `SecurityConfig` to ensure open access for all endpoints.
2025-06-22 01:15:45 +02:00
Teriuihi 32a454c034 Refactor permission handling and authentication services
Replaced `PermissionClaim` enum with an OpenAPI-defined schema `PermissionClaimDto` for consistency across frontend and backend. Refactored authentication flow to utilize `AuthService` on the frontend, consolidating JWT handling logic. Removed redundant methods like `saveJwt` and integrated robust permission management throughout the application.
2025-06-21 23:15:46 +02:00
Teriuihi 07646e8c42 Implement enhanced login functionality with JWT, role-based permissions, and frontend integration
Added JWT-based login dialog with form validation and secure token handling on the frontend. Updated backend with role-based access control, privilege management, and refined security configurations. Extended database schema for user privileges and permissions.
2025-05-30 23:41:13 +02:00
Teriuihi c4c17b3adc Add JWT-based login flow with key pair generation
Introduced a secure login flow using JWTs with dynamically generated RSA key pairs stored in the database. Updated relevant APIs, database schema, and services to support login codes, JWT encoding, and secret validation.
2025-05-24 01:33:36 +02:00
Teriuihi cf758bfe60 Add endpoints and schema for history retrieval by UUID
Introduced a new API endpoint to fetch all punishment history for a specified UUID. Updated existing schemas, controllers, and mappers to support this functionality. Adjusted login endpoints to improve request handling and streamlined frontend form setup for appeals.
2025-05-03 04:37:47 +02:00
Teriuihi 26b5f86983 Add rate limiting to LoginController endpoints
Introduced a `@RateLimit` annotation to enforce limits on the `addLogin` and `login` methods in `LoginController`. This restricts the number of requests per minute to improve security and prevent abuse.
2025-04-26 23:14:33 +02:00
Teriuihi ba6cf6d938 Add rate limiting to AppealController methods
Introduced @RateLimit annotations to enforce request limits on the AppealController. The overall controller has a global limit of 30 requests per hour, while specific methods for Discord and Minecraft appeals are limited to 3 requests per hour. This aims to prevent abuse and improve system reliability.
2025-04-26 23:13:26 +02:00
Teriuihi 643545a18a Add appeal and login functionality structure
Introduces initial structure for appeal and login forms in both the frontend and backend. New controllers, APIs, and components were created, but functionality has not been fully implemented yet. This serves as a foundation for future development of these features.
2025-04-26 20:58:47 +02:00
Teriuihi 6be6944dea Update rate limit for HistoryApiController
Changed the rate limit from 30 requests per minute to 30 requests per 10 seconds. This ensures a smoother request flow and prevents excessive delays for frequent API users.
2025-04-19 05:00:41 +02:00
Teriuihi 3babde5513 Add punishment details and history retrieval functionality
This commit introduces a new `DetailsComponent` for displaying detailed punishment data and establishes a route to view punishment history by ID and type. It also updates the API to support fetching individual punishment records and refines database mappings for improved data handling.
2025-04-19 04:02:51 +02:00
Teriuihi 3d4d77bc73 Add WebConfig for static resource handling
Introduced WebConfig to configure resource handling in the backend. This ensures SPA fallback by serving `index.html` for non-existent paths, improving routing for client-side applications.
2025-04-19 01:07:49 +02:00
Teriuihi 5b158ae3f7 Add application-beta.properties for beta environment config. 2025-04-19 01:01:48 +02:00
Teriuihi bbedd2257e Ensure backend tasks depend on frontend build completion 2025-04-19 00:44:52 +02:00
Teriuihi 25e8dc8e8e Update build scripts to integrate frontend with backend. 2025-04-18 22:24:55 +02:00
Teriuihi ecee377f01 Add API endpoints for search result counts by name and UUID
Introduced new API paths and backend logic to retrieve total punishment counts based on user search queries using names or UUIDs. Updated the frontend to utilize these endpoints and display the total search results dynamically.
2025-04-18 20:43:17 +02:00
Teriuihi 905373093c Update rate limiting headers and adjust time unit for limits
Added `Access-Control-Expose-Headers` to rate limit responses to expose retry-related headers for easier accessibility on the client side. Changed the rate limit time unit in `HistoryApiController` from seconds to minutes for more reasonable throttling.
2025-04-18 19:32:34 +02:00
Peter 87a0b9ad1b Refactor pagination buttons and adjust rate limit interval.
Updated pagination buttons with new styles and class name (`historyPageButton`) for consistency and improved UX. Modified backend rate limit interval from 1 minute to 1 second for faster request handling.
2025-04-18 18:45:40 +02:00
Teriuihi a01038e86c Refactor rate-limiting and name history queries.
Removed redundant rate-limit response headers and improved query methods for fetching punishment history. Refactored methods to handle cases where partial names are empty and added escaping for underscores in search names.
2025-04-18 18:33:47 +02:00
Teriuihi e3eaab708c Add rate-limiting mechanism with AOP for API endpoints
Introduced a rate-limiting feature using Spring AOP and a custom `RateLimit` annotation. Includes `InMemoryRateLimiterService`, `RateLimitAspect`, and related classes for controlling request limits. Applied rate limiting to specific API controllers to enhance system stability and prevent abuse.
2025-04-17 20:31:14 +02:00
Teriuihi 44d28494e5 Add API endpoint to retrieve total punishment counts
Introduced a new API endpoint `/history/total` for fetching the total counts of bans, mutes, kicks, and warnings. Added database mapping and DTO classes to support this functionality, along with necessary schema and controller updates.
2025-04-11 23:27:20 +02:00
Teriuihi 23367b6dea Fix history not loading 2025-04-11 21:37:21 +02:00
Teriuihi 2289b14b5a Add history page 2025-04-11 21:20:02 +02:00
Teriuihi 4b891dd672 Reworked database setup and added pagination
The database tables are now automatically created
The history lookup now uses a view for names (for simplicity and readability)
The all history lookup now uses a view combining all punishment history for efficiency
2025-04-11 18:22:07 +02:00
Teriuihi 0f9761da3a Refactor history APIs and integrate LiteBans database support
Redesigned history-related APIs to streamline handling of user and UUID punishments, moving from POST to GET endpoints. Added support for LiteBans database with mappers for retrieving punishment records by name and UUID, and implemented global exception handling for better error reporting. Updated schema paths and added enums (UserType, HistoryType) and a new Gradle dependency.
2025-04-11 01:12:46 +02:00
Teriuihi 1585011143 Refactor API structure and endpoints for history and team.
Updated API definitions and endpoints to better support punishment history and team queries. Introduced new parameters, schemas, and operations to improve functionality, and reorganized related controllers into appropriate packages.
2025-04-10 22:46:30 +02:00
Teriuihi 2137459e9b Refactor API structure and enhance logging/debugging.
Modularized OpenAPI definitions by splitting into dedicated files for teams, bans, and errors. Improved backend logging for database connections, CORS configuration, and debugging. Updated application properties to support environment-specific CORS origins and logging levels.
2025-04-10 21:45:00 +02:00
Teriuihi 02f21169b4 Remove unused TeamMemberDto import in TeamApiController
The TeamMemberDto import was unnecessary and not used in the code. Removing it improves code cleanliness and reduces potential confusion. This is a minor optimization with no functional changes.
2025-04-10 20:39:51 +02:00
Teriuihi d5daa8458b Refactor database structure and improve player handling.
Reorganized database-related code into a dedicated module, added mappings for UUID handling, and updated SQL queries for clarity. Enhanced team members API to use player data directly, ensuring consistency and better handling of UUIDs. Introduced new database table for connection settings and adjusted Gradle configurations for modularization.
2025-04-10 01:22:19 +02:00
Teriuihi 67a3162ae3 Added backend and fixed openapi generation 2025-04-08 22:24:24 +02:00