Commit Graph

38 Commits

Author SHA1 Message Date
Kimi CLI
02c5d8c72d chore: add Npgsql log level config to suppress GSSAPI warnings
- Set Logging__LogLevel__Npgsql to Error in ConfigMap
- Prevents libgssapi_krb5.so.2 warning spam in logs
2026-03-08 15:21:27 +08:00
movingsam
2a60caae80 docs(architecture): 添加系统架构分析文档
- 描述整体基于ASP.NET Core的分层架构与领域驱动设计
- 详细说明表现层、视图模型层、配置层和基础设施层职责
- 介绍用户认证、OAuth2授权码与令牌颁发的数据流过程
- 抽象说明用户与租户、声明和授权实体设计
- 说明应用启动入口和关键HTTP端点
- 列出错误处理策略和跨领域关注点(日志、追踪、安全)

docs(concerns): 新增代码库问题与关注点分析文档

- 汇总并详述安全漏洞如配置文件泄露、Cookie策略不当
- 记录技术债务包括缺乏单元测试、依赖注入不统一等
- 罗列性能问题和具体代码缺陷
- 给出优先级明确的修复建议和改进措施
- 涵盖架构设计问题和依赖兼容性风险
- 说明测试覆盖缺口及高风险未测试区域

docs(conventions): 新增编码约定与规范文档

- 明确文件、类、方法、变量等命名规则
- 规范代码风格包括命名空间、主构造函数使用
- 制定日志记录、审计日志和依赖注入的标准
- 规定控制器路由、异步模式和错误处理方式
- 说明DTO命名及特性使用规范
- 描述配置管理、注释规范及常用代码注释样例

docs(integrations): 添加外部系统集成文档

- 介绍数据库连接和PostgreSQL客户端库版本
- 描述身份认证与授权服务及默认用户信息
- 说明可观测性方案及OpenTelemetry组件
- 涵盖容器化部署相关Docker与Kubernetes配置
- 说明CI/CD流水线触发条件与构建流程
- 列出环境变量需求和主要API端点
- 强调生产环境密钥管理与安全存储机制
2026-03-01 11:28:44 +08:00
movingsam
9a7948e634 refactor: reorganize project structure to src/ with slnx solution
- Move all source code to src/ directory
- Add Fengling.AuthService.slnx solution file
- Update Dockerfile to reference src/ paths
- Update CI/CD workflow for new structure
- Optimize .dockerignore for cleaner builds
2026-02-28 18:31:52 +08:00
Sam
f72e415c0f Remove bin folder 2026-02-25 17:37:13 +08:00
Sam
84f38a0bab Add .gitignore 2026-02-25 17:25:25 +08:00
movingsam
9f02398eb9 调整项目 2026-02-21 15:05:37 +08:00
movingsam
a8656ca982 refactor(platform): migrate Tenant to anemia model, use Manager pattern
- Convert Tenant to anemia model with long Id (no strong-typed ID)
- Add ApplicationUser, ApplicationRole to Platform.Domain (inherit Identity)
- Add TenantInfo value object for user-tenant redundancy
- Implement TenantManager/TenantStore in Platform.Infrastructure
- Update PlatformDbContext to inherit IdentityDbContext
- Migrate AuthService and Console to use Platform entities
- Remove old TenantRepository (replaced by TenantManager)
- Update AGENTS.md documentation
2026-02-21 13:22:08 +08:00
movingsam
7a9fcf9fc1 debug 2026-02-19 21:40:22 +08:00
movingsam
d4aff05804 refactor: clean up Member module and update Console
- Remove redundant PointsRule repositories (use single PointsRuleRepository)
- Clean up Member migrations and consolidate to single Init migration
- Update Console frontend API and components for Tenant
- Add H5LinkService for member H5 integration
2026-02-18 23:34:40 +08:00
movingsam
39cc9a8538 feat(auth): extract Tenant to Platform domain
- Add Fengling.Platform domain and infrastructure projects
- Move Tenant aggregate from AuthService/Console to Platform.Domain
- Add TenantRepository and SeedData to Platform
- Remove duplicate Tenant/TenantInfo models from AuthService and Console
- Update controllers and services to use Platform.Domain.Tenant
- Add new migrations for PlatformDbContext

BREAKING CHANGE: Tenant entity now uses strongly-typed ID (TenantId)
2026-02-18 23:02:03 +08:00
sam
8184f77c0f chore: update gitignore to allow Vben packages directory 2026-02-13 21:34:52 +08:00
Sam
5d097d8582 feat: 添加Console API认证和OpenIddict集成
- 配置AuthService使用OpenIddict reference tokens
- 添加fengling-api客户端用于introspection验证
- 配置Console API通过OpenIddict验证reference tokens
- 实现Tenant/Users/Roles/OAuthClients CRUD API
- 添加GatewayController服务注册API
- 重构Repository和Service层支持多租户

BREAKING CHANGE: API认证现在使用OpenIddict reference tokens
2026-02-08 19:01:25 +08:00
Sam
0c5bd5e647 feat: 添加OAuth2认证配置和实现
添加OAuth2认证相关配置文件和服务实现,包括环境变量配置、PKCE流程支持、token管理等功能。主要变更:
- 新增OAuth2配置文件
- 实现OAuth2服务层
- 更新请求拦截器支持token自动刷新
- 修改认证API和store以支持OAuth2流程
2026-02-07 17:47:11 +08:00
Sam
1a0c18c198 fix: simplify OpenIddict server configuration
- Remove non-existent method calls (AllowAuthorizationCodeFlow, etc)
- Keep only basic configuration: issuer, encryption, scopes
- This should fix 'authorization endpoint must be enabled' error
2026-02-06 21:59:06 +08:00
Sam
875ba7bc61 fix: add UseAspNetCore() to OpenIddict validation
- Add .UseAspNetCore() to validation configuration
- This enables OpenIddict Server to properly process OAuth2 requests
- Fix for 'The OpenID Connect request cannot be retrieved' error
2026-02-06 21:54:56 +08:00
Sam
7c92208c40 fix: remove invalid app.UseOpenIddictServer() call
- Remove non-existent middleware call
- OpenIddict server is automatically configured via AddOpenIddictConfiguration
- Keep correct middleware order: StaticFiles -> Routing -> Authentication -> Authorization
2026-02-06 21:50:50 +08:00
Sam
5a7ebaf20d feat: update OAuth2 client configuration for Fengling Console 2026-02-06 01:47:41 +08:00
Sam
d92d51fb3e feat: implement OAuth 2.0 login flow with auto-redirect
- Modify login page to auto-redirect to auth center
- Update auth store to use OAuth login flow
- Handle OAuth callback and token exchange
- Update logout to use OAuth logout endpoint
2026-02-06 01:14:11 +08:00
Sam
b6c85b1c4b fix: configure TenantInfo as owned entity and use AsNoTracking
- Add AsNoTracking to tenant query to avoid tracking conflicts
- Configure TenantInfo as owned entity in ApplicationUser
- Map TenantInfo properties to separate columns in AspNetUsers table
2026-02-06 00:55:58 +08:00
Sam
0472772d35 fix: use in-memory database for development environment 2026-02-06 00:51:28 +08:00
Sam
635e3b6c86 feat: configure OAuth client for Fengling Console
- Add localhost:5777 callback URIs to fengling-console client
- Register OIDC scopes: openid, profile, email
- Add support for development environment
2026-02-06 00:47:06 +08:00
Sam
c998686ab6 feat(console): complete migration of User, Tenant, and Role management APIs 2026-02-05 14:21:36 +08:00
Sam
02b446cfa7 first commit 2026-02-03 15:30:12 +08:00
Sam
1b815e59fd chore: add .gitignore and remove tracked binary files (bin, obj, dll, pdb) 2026-02-02 10:20:22 +08:00
Sam
9059c56515 feat(auth): pre-register Fengling.Console as OAuth client 2026-02-02 09:59:32 +08:00
Sam
cda6225bc5 feat(auth): add OAuth client management API 2026-02-02 09:58:55 +08:00
Sam
40b3184937 docs(auth): add API documentation 2026-02-02 09:55:23 +08:00
Sam
a7d87a98b7 feat(auth): add Dockerfile for containerization 2026-02-02 09:55:10 +08:00
Sam
58e6969e95 feat(auth): add health check endpoint 2026-02-02 09:54:36 +08:00
Sam
42976f09df feat(auth): add seed data for admin and test users 2026-02-02 09:53:06 +08:00
Sam
db3d345b86 chore: upgrade all projects to .NET 10.0 and latest packages 2026-02-02 01:04:51 +08:00
Sam
9a717b153f feat(auth): add authentication controller with login endpoint 2026-02-02 01:00:57 +08:00
Sam
baed266718 feat(auth): configure OpenIddict with JWT and OAuth2 support 2026-02-01 23:40:37 +08:00
Sam
9f414ccb74 feat(auth): add user and role models with EF Core migrations 2026-02-01 23:36:20 +08:00
Sam
9b389beafb feat(auth): upgrade all dependencies to latest versions 2026-02-01 23:31:33 +08:00
Sam
53e0978ad2 revert(auth): restore OpenIddict to 5.0.2 per spec 2026-02-01 23:25:08 +08:00
Sam
e3428d3bd6 chore(auth): upgrade OpenIddict to 7.2.0 2026-02-01 23:24:47 +08:00
Sam
3099abb710 feat(auth): create authentication service project structure 2026-02-01 23:23:56 +08:00