Commit Graph

12 Commits

Author SHA1 Message Date
msksbr aa745f8d81 build(config): add docker support and project documentation
- Integrate Docker Spring Boot application plugin for containerization
- Bump project version to 0.1
- Include MIT license and project README
- Ignore IDE configuration files in version control
2026-05-24 01:51:41 +08:00
msksbr 57683ad64c feat(logging): add structured audit logging with file export
- Add logback-spring.xml with daily rolling file appenders
- Add structured audit events to RequireRoleAspect
- Add logging export configuration to application.yaml
- Add janino dependency for logback evaluation
- Ignore /log/ export directory
2026-05-24 00:38:11 +08:00
msksbr bc4f7ac8cc refactor(admin-book): rename Result to ApiResult and tighten return types
- Replace `Result` with `ApiResult` across admin book/borrow modules
- Change return type from `Result<Any?>` to `ApiResult<String>`
- Reformat multi-arg log statements for readability
2026-05-23 21:43:40 +08:00
msksbr f73e0e3cba feat(admin-borrows): add search endpoint replacing getAll
Replace the simple \"get all borrows\" endpoint with a search-based
approach supporting queries by book name, author, username, and role.

- Change endpoint from GET /getall to GET /search?query=xxx
- Add search service implementation using QueryWrapper with LIKE
  predicates across Book, User, and BorrowRecord tables
- Use kotlinx-coroutines for parallel async data fetching per result
- Add kotlinx-coroutines-core and kotlinx-coroutines-reactor deps
2026-05-23 13:06:47 +08:00
msksbr 00e2ea0700 fix(auth): harden login against timing-based user enumeration
- Use constant-time comparison when user is not found to prevent
  user enumeration via response timing
- Remove debug logging that could expose sensitive data
- Add AspectJ weaver dependency for AOP support
2026-05-21 17:53:26 +08:00
msksbr 193fed29b2 fix(build): use bootJar task for production packaging
- Use bootJar instead of processResources for excluding dev configuration
- Set default time-zone to GMT for JSON serialization
2026-05-21 14:30:52 +08:00
msksbr 44b8326e96 feat(auth): implement JWT authentication
- Add JwtUtils for token generation and validation using jjwt
- Refactor AuthService.login to return User instead of Boolean
- Add jjwt dependencies and integrate JWT into login flow
- Externalize JWT secret, expiration, and log level as configurable env vars with defaults
2026-05-21 14:04:00 +08:00
msksbr 3937224341 fix(auth): harden password verification against timing attacks
- Run dummy hash when user is not found to prevent timing-based enumeration
- Extract and log real client IP on login requests
- Remove unused test files
- Reorder application config for clarity
2026-05-21 02:39:06 +08:00
msksbr 2cf3806298 feat(auth): implement login logic with database and password verification
- Replace stub with MyBatis-Plus user query and password matching
- Integrate kotlin-logging for structured logging across services
- Add custom Log utility replacing direct SLF4J usage
- Add kotlin-logging dependency to build configuration
2026-05-20 22:30:58 +08:00
msksbr 402e9e04cd refactor(api): restructure auth endpoints with DTO validation and unified response
- Add Result<T> generic response template for standardized API output
- Introduce UserLoginDTO with validation annotations for login requests
- Migrate AuthController to use DTO binding and return Result responses
- Update AuthService interface to accept UserLoginDTO and return Boolean
- Add Jackson configuration (snake_case, non-null, date format)
- Include jackson-module-kotlin and spring-boot-starter-validation deps
2026-05-20 17:29:04 +08:00
msksbr 52298e7fff feat(auth): add password encoding and default user initialization
- Register Argon2PasswordEncoder as a Spring bean
- Implement InitUserRunner to seed default users on startup
- Add spring-security-crypto and bouncycastle dependencies
- Include database schema initialization script
2026-05-20 12:43:05 +08:00
msksbr 3a86d29e5c 实现了数据层的功能 2026-05-13 03:11:56 +08:00