Commit graph

6 commits

Author SHA1 Message Date
vsxd
5c4be0a26f feat(auth): add OAuth2 login, access policy, API token, and RBAC
Task 10b: OAuth Claims + Access Policy
- OAuthClaims record, OAuthClaimsExtractor SPI, GitHubClaimsExtractor
- AccessPolicy SPI with Open/EmailDomain/ProviderAllowlist/SubjectWhitelist
- AccessPolicyFactory with config-driven strategy selection
- 8 unit tests for access policies

Task 11: Identity binding + OAuth2 user service
- PlatformPrincipal session-serializable record
- IdentityBindingService: bind-or-create on OAuth login
- CustomOAuth2UserService: policy evaluation + identity binding
- OAuth2LoginSuccessHandler: store principal in session

Task 12: API Token + RBAC
- ApiTokenService: SHA-256 hashed token create/validate/revoke
- ApiTokenAuthenticationFilter: Bearer token authentication
- RbacService: role/permission queries with SUPER_ADMIN bypass
2026-03-11 23:48:16 +08:00
vsxd
2991eb11e0 feat(domain/infra/auth): add domain entities, JPA repos, and auth entities
Task 8: Domain layer
- UserAccount entity with UserStatus lifecycle
- Namespace, NamespaceMember entities with NamespaceRole
- Repository interfaces for domain aggregates

Task 9: Infra layer
- UserAccountJpaRepository, NamespaceJpaRepository, NamespaceMemberJpaRepository
- Spring Data JPA implementations

Task 10: Auth entities and repositories
- IdentityBinding, ApiToken, Role, Permission, RolePermission, UserRoleBinding
- JPA repositories for all auth entities
- UserRoleBinding with eager-loaded Role for RBAC queries
2026-03-11 23:42:53 +08:00
vsxd
edfff6abc7 feat: complete Chunk 1 - backend skeleton and infrastructure
- Migrate all Maven groupId and Java packages to com.iflytek.skillhub
- Add Docker Compose with PostgreSQL 16, Redis 7, MinIO
- Add Flyway V1 migration with Phase 1 core schema (user, auth, RBAC, namespace, audit)
- Add RequestIdFilter with MDC tracing and X-Request-Id header
- Add GlobalExceptionHandler and ErrorResponse DTO
- Add HealthController (/api/v1/health) and OpenAPI config
- Add basic SecurityConfig permitting public endpoints
- Add H2 test profile for CI-friendly testing without external services
- Add top-level Makefile for dev workflow orchestration
- All 3 tests passing
2026-03-11 23:35:47 +08:00
vsxd
e726746f4d feat: add Spring Boot application entry point and base configuration
- Create SkillhubApplication main class
- Add application.yml with JPA, Flyway, graceful shutdown config
- Add application-local.yml for local development profile
- Add database and Redis dependencies to skillhub-app POM
2026-03-11 22:57:03 +08:00
vsxd
b7cc6b883f feat: initialize Maven multi-module project structure
- Parent POM with Spring Boot 3.2.3 and JDK 21
- 6 modules: app, domain, auth, search, storage, infra
- Module dependency directions per architecture design
- Maven Wrapper for reproducible builds
2026-03-11 22:52:04 +08:00
vsxd
27b7a4dad1 feat: project ini and docs updates 2026-03-11 22:47:05 +08:00