Commit graph

348 commits

Author SHA1 Message Date
dongmucat
8324f130cd fix(namespace): add index on promotion_request.target_namespace_id
The existsByTargetNamespaceId query used in namespace deletion
dependency checks was missing an index, causing a sequential scan.
2026-05-08 14:42:27 +08:00
dongmucat
8dd1668555 fix(namespace): support team namespace deletion 2026-05-08 10:15:17 +08:00
XiaoSeS
a3c07725e5
feat(publish): skill upload limits, nested SKILL.md, session fix (#364)
* feat(publish): increase max file count from 100 to 500

Configurable via SKILLHUB_PUBLISH_MAX_FILE_COUNT env var.

* feat(publish): support SKILL.md in subdirectory with warning for ignored files

When SKILL.md is found in a single subdirectory (e.g. my-skill/SKILL.md),
promote that directory's contents to root and discard files outside it.
Discarded files are reported as warnings through the existing confirm flow.

* feat(publish): pass extraction warnings through confirm flow

When files are ignored during SKILL.md subdirectory promotion,
warnings are surfaced to the user via the existing precheck confirm dialog.

* fix(security): add invalidSessionStrategy to return 401 on expired session

Handles the case where Spring Security detects an invalid session cookie,
returning a clean 401 JSON response instead of triggering cascading exceptions.
Closes #360 (part 1/2)

* fix(security): handle session invalidation IllegalStateException as 401

Catches IllegalStateException with "Session was invalidated" message and
returns 401 instead of letting it fall through to the generic 500 handler.
Non-session IllegalStateExceptions are re-thrown to the catch-all handler.
Closes #360 (part 2/2)

* feat(publish): filter macOS metadata and add integration tests

Skip __MACOSX/, .DS_Store, and ._ resource fork entries during zip
extraction. Add integration tests for nested SKILL.md warning flow,
session invalidation 401 response, and macOS metadata filtering.

* test(publish): add real-world macOS zip and edge case integration tests

Covers: macOS zip with nested SKILL.md + __MACOSX + .DS_Store + stray files,
simple macOS single-folder case, and missing SKILL.md fallback behavior.
2026-04-30 11:20:51 +08:00
dongmucat
f70c1c6d99
Merge pull request #348 from iflytek/feature/oidc-login
feat(auth): support OIDC login
2026-04-29 15:21:37 +08:00
dongmucat
f41723e0dc
Merge pull request #356 from iflytek/feature/skill-subscription-notification
feat(subscription): add skill subscription notification feature
2026-04-29 15:20:40 +08:00
vzpd
003f811292 feat(storage): support IAM authentication for S3 storage
When access-key / secret-key are left blank, fall back to the AWS
DefaultCredentialsProvider chain so that deployments on EC2, ECS,
and EKS can authenticate via instance profile, task role, or IRSA
without static credentials.

- Extract buildCredentialsProvider() in S3StorageService
- Add sts dependency for Web Identity Token (EKS) support
- Add unit tests for credential provider selection
- Update storage-spi docs (zh + en) and env example
2026-04-29 11:51:01 +08:00
dongmucat
7f47f8a702 test(subscription): update test DTOs with subscriptionCount field 2026-04-29 10:58:15 +08:00
dongmucat
4882abc043 fix(subscription): expose subscription count in skill detail API
Include subscriptionCount in SkillDetailDTO and SkillDetailResponse
so the frontend SubscribeButton receives the updated count after
subscribe/unsubscribe mutations.
2026-04-29 10:56:20 +08:00
dongmucat
d945c46785 fix(auth): move OIDC email verification to service layer, add logging
Revert emailVerified check in EmailDomainAccessPolicy to preserve
backward compatibility with GitHub/GitLab OAuth users. Instead, null
unverified emails in CustomOidcUserService.toOAuthClaims() so
EmailDomainAccessPolicy naturally denies them via null email.

Add SLF4J logging to CustomOidcUserService for OIDC authentication
flow tracing and failure diagnostics.

Add registration ID collision warning to deployment docs.
2026-04-29 10:36:34 +08:00
dongmucat
fb3035e545 test(subscription): add SkillSubscriptionController integration tests 2026-04-29 09:52:50 +08:00
dongmucat
fbbd20a5a6 fix(auth): require verified email for domain access
变更摘要:

- 修复 EMAIL_DOMAIN 准入策略,未验证邮箱不再因域名匹配被放行

- 新增回归测试,覆盖 OIDC 场景下 email_verified=false 的拒绝行为

- 保持修复范围收敛,仅调整策略判定与对应测试

关键文件:

- server/skillhub-auth/src/main/java/com/iflytek/skillhub/auth/policy/EmailDomainAccessPolicy.java

- server/skillhub-auth/src/test/java/com/iflytek/skillhub/auth/policy/AccessPolicyTest.java
2026-04-28 16:31:52 +08:00
dongmucat
4f44ea3976 fix(auth): add OIDC sub claim validation and complete env example
- Add null/blank validation for OIDC sub claim in CustomOidcUserService
- Throw OAuth2AuthenticationException when sub is missing or blank
- Complete .env.release.example with all required OIDC environment variables
- Add test cases for sub validation and providerLogin fallback scenarios
- All 5 tests passing
2026-04-28 13:49:26 +08:00
dongmucat
f707cfee61
Merge pull request #342 from iflytek/feature/batch-member-import
feat(namespace): batch member import via CSV upload
2026-04-28 09:44:53 +08:00
dongmucat
7063a6d348 test(subscription): add SkillSubscriptionService unit tests 2026-04-27 17:02:48 +08:00
dongmucat
9bc5d0c784 feat(subscription): notify subscribers on skill publish and version yank 2026-04-27 16:51:40 +08:00
dongmucat
6f0103f013 feat(subscription): publish SkillVersionYankedEvent on version yank 2026-04-27 16:50:38 +08:00
dongmucat
4e62698231 feat(subscription): add /me/subscriptions endpoint for user subscription list 2026-04-27 16:49:26 +08:00
dongmucat
4713e864bd feat(subscription): add SkillSubscriptionController REST endpoints 2026-04-27 16:47:56 +08:00
dongmucat
a2aa4c3fb1 feat(subscription): update subscription count on subscribe/unsubscribe 2026-04-27 16:47:14 +08:00
dongmucat
9d4422cd6c feat(subscription): add increment/decrement subscription count methods 2026-04-27 16:46:34 +08:00
dongmucat
79f1aa4db1 feat(subscription): add subscriptionCount field to Skill entity 2026-04-27 16:44:34 +08:00
dongmucat
7da8ffdb1b feat(subscription): add JPA implementation for SkillSubscriptionRepository 2026-04-27 16:43:34 +08:00
dongmucat
1567a67bdd feat(subscription): add SkillSubscriptionService domain service 2026-04-27 16:43:15 +08:00
dongmucat
7391c26843 feat(subscription): add subscription and version yanked domain events 2026-04-27 16:42:50 +08:00
dongmucat
9c05e91a6c feat(subscription): add SkillSubscription entity and repository interface 2026-04-27 16:40:34 +08:00
dongmucat
8c75409b72 feat(subscription): add skill_subscription table migration V40 2026-04-27 16:39:46 +08:00
dongmucat
0cc3c46831
Merge pull request #340 from iflytek/feature/web-update-skill
feat(dashboard): add Update button to My Skills with publish prefill
2026-04-24 15:25:04 +08:00
dongmucat
bb9f8915e2 feat(auth): support oidc login 2026-04-24 13:45:20 +08:00
dongmucat
3739c7879b
Merge pull request #305 from iflytek/fix/bootstrap-admin-role-backfill
fix(auth): backfill bootstrap admin role binding
2026-04-23 10:11:43 +08:00
dongmucat
17b30c8f30 docs(namespace): clarify intentional no-transaction on batchAddMembers 2026-04-22 16:47:18 +08:00
dongmucat
7ab2fd5e64 test(namespace): add batch member import controller tests 2026-04-22 16:04:42 +08:00
dongmucat
65b9b8b609 feat(namespace): add batch member import endpoint 2026-04-22 15:43:23 +08:00
dongmucat
4f7cdc48cb feat(namespace): add batch member import DTOs 2026-04-22 15:42:12 +08:00
dongmucat
230b915194 feat(dashboard): add Update button to My Skills with publish prefill
Add an "Update" button to each skill card on the My Skills dashboard
page. Clicking it navigates to the Publish page with the skill's
namespace and visibility pre-selected, reducing manual steps when
re-publishing a skill package.

- Add visibility field to SkillSummaryResponse so the list API exposes
  each skill's current visibility setting
- Add publish-prefill module to normalize and validate URL search params
- Wire TanStack Router validateSearch on the publish route
- Add E2E tests covering the prefill flow and invalid-param fallback
2026-04-22 14:59:01 +08:00
dongmucat
62028e9f55
Merge pull request #337 from iflytek/fix/search-page-400
fix(search): harden portal query parsing
2026-04-22 13:53:46 +08:00
dongmucat
60a30190bf
Merge pull request #336 from iflytek/fix/s3-bucket-access-check
fix(storage): lazily create missing s3 buckets on upload
2026-04-22 09:52:33 +08:00
dongmucat
f902c6f59b fix(search): restore clawhub namespace-only access 2026-04-21 17:28:05 +08:00
dongmucat
1e9d22b528 fix(storage): stage retryable s3 upload bodies 2026-04-21 13:09:20 +08:00
dongmucat
37aa366233 fix(storage): retry put after lazy bucket creation 2026-04-21 12:57:24 +08:00
dongmucat
e01c987a82 fix(search): restore clawhub namespace-only access 2026-04-21 09:45:39 +08:00
dongmucat
2c519c8efd fix(search): harden portal search query parsing 2026-04-20 16:57:47 +08:00
wrj97
7be6a36960
feat(auth): add GitLab OAuth2 provider support (#264)
* feat(auth): add GitLab OAuth2 provider support

Add GitLab as an additional OAuth2 authentication provider alongside
GitHub. This includes:

- GitLab OAuth2 client configuration with customizable base URL
- GitLabClaimsExtractor for handling GitLab-specific user claims
- Multi-provider login UI with provider-specific icons
- Updated localization to use OAuth-agnostic terminology
- JSON type annotation for IdentityBinding entity

* fix(auth): restore oauth redirect and gitlab email checks

* test(auth): align oauth login handler expectation

---------

Co-authored-by: wowo-zZ <zhenggui5228@126.com>
2026-04-17 19:56:32 +08:00
XiaoSeS
080be28eef
fix(search): align portal visibility for private skills (#323)
* feat(ci): add AI-powered release notes generation

- Add GitHub Models integration for automated release notes
- Support bilingual (EN) release notes with highlights extraction
- Fallback to conventional commit grouping when LLM unavailable
- Trigger on tag push or manual workflow dispatch
- Zero configuration: uses GitHub Models (gpt-4o-mini) by default

* chore: pin action versions and update gitignore

- Pin checkout and setup-deno to commit hashes matching project convention
- Add .playwright-mcp/ and .mcp.json to gitignore

* fix(search): keep private skills out of portal discovery

- remove super admin expanded visibility from portal search
- exclude all private skills from portal search results
- keep namespace-only skills visible only to namespace members
- reserve private skill access for my-skills and future admin surfaces

* test(search): update test to reflect portal visibility policy

- rename test from platformWideAccessShouldBypass... to platformWideAccessShouldNotBypass...
- verify that platformWideAccess flag does not grant extra visibility in portal search
- verify PRIVATE skills are excluded from search SQL
- aligns test with new requirement: portal search uses standard visibility rules

* test(search): update app service test for portal visibility policy

- rename test from search_shouldGrantPlatformWideAccessToSuperAdmin to search_shouldNotGrantPlatformWideAccessToSuperAdminInPortal
- verify super admin does not get platformWideAccess in portal search
- aligns with requirement: portal uses standard visibility, admin features reserved for dedicated interface
2026-04-17 17:46:05 +08:00
dongmucat
a6f8956549 fix(auth): preserve bootstrap admin profile on backfill 2026-04-15 15:49:42 +08:00
dongmucat
2cfd4a730b
Merge pull request #302 from iflytek/fix/rerelease-precheck-warnings
fix(rerelease): support precheck warning confirmation flow
2026-04-14 20:28:00 +08:00
dongmucat
5d87a0ccd3
Merge pull request #304 from iflytek/feat/oss-02-super-admin-visibility
feat(access): add SUPER_ADMIN platform role support
2026-04-14 20:27:39 +08:00
dongmucat
2334aa6a5a fix(review): avoid stale promotion approval save 2026-04-14 20:02:41 +08:00
xiose
7c2f06d1b6 test(rerelease): add confirmWarnings coverage and sync generated schema
- Add domain tests for rerelease with precheck warnings (reject + confirm)
- Add controller test verifying confirmWarnings passthrough
- Sync SkillVersionRereleaseRequest generated type with backend DTO
2026-04-14 17:55:56 +08:00
dongmucat
1246cca930
Merge pull request #279 from iflytek/fix/issue-276-review-own-namespace
fix(review): allow namespace admins to review own submissions
2026-04-14 17:22:08 +08:00
xiose
edcc248244 fix(portal): keep skill detail on viewer permissions 2026-04-14 16:42:22 +08:00