feat: licensing API phase 2 — validation, signed downloads, management, tier admin #660

Merged
jmiller merged 10 commits from dev into main 2026-06-21 02:37:32 +00:00
Owner

Summary

Closes #622, #623, #624, #627

Phase 2-3 of the DLID licensing system:

API Endpoints (routers/api/v1/licensing/)

  • GET /validate — public DLID validation with reason codes
  • GET /{dlid}/status — authenticated full license detail
  • GET /download/{product}/{version}.zip — ed25519 signed downloads (5-min TTL)
  • POST/GET/PATCH/DELETE /licenses — admin license CRUD
  • GET/DELETE /my/licenses — user self-service + domain management
  • GET/POST/PATCH/DELETE /tiers — product tier CRUD

Services

  • services/licensing/signer.go — ed25519 keypair management, sign/verify download tokens

Admin UI

  • /-/admin/license-tiers — tier list with CRUD, repo mapping, license counts

Changelog

  • Updated CHANGELOG.md with all additions

Test plan

  • Validate endpoint returns valid/invalid with reason codes
  • Signed download verifies token + expiry + entitlement
  • Admin can create/modify/revoke licenses via API
  • User can view own licenses and deactivate domains
  • Tier admin page renders with seed data
  • Delete tier blocked when active licenses exist
## Summary Closes #622, #623, #624, #627 Phase 2-3 of the DLID licensing system: ### API Endpoints (routers/api/v1/licensing/) - `GET /validate` — public DLID validation with reason codes - `GET /{dlid}/status` — authenticated full license detail - `GET /download/{product}/{version}.zip` — ed25519 signed downloads (5-min TTL) - `POST/GET/PATCH/DELETE /licenses` — admin license CRUD - `GET/DELETE /my/licenses` — user self-service + domain management - `GET/POST/PATCH/DELETE /tiers` — product tier CRUD ### Services - `services/licensing/signer.go` — ed25519 keypair management, sign/verify download tokens ### Admin UI - `/-/admin/license-tiers` — tier list with CRUD, repo mapping, license counts ### Changelog - Updated CHANGELOG.md with all additions ## Test plan - [ ] Validate endpoint returns valid/invalid with reason codes - [ ] Signed download verifies token + expiry + entitlement - [ ] Admin can create/modify/revoke licenses via API - [ ] User can view own licenses and deactivate domains - [ ] Tier admin page renders with seed data - [ ] Delete tier blocked when active licenses exist
jmiller added 9 commits 2026-06-21 02:35:00 +00:00
feat: add license validation API — public validate + authenticated status (#623)
Universal: Auto Version Bump / Version Bump (push) Successful in 6s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 1m16s
3e909df6d4
GET /api/v1/licensing/validate?dlid=XXX&product=YYY&domain=ZZZ (public)
GET /api/v1/licensing/{dlid}/status (authenticated, reqToken)

Public endpoint returns valid/invalid with reason codes for Joomla plugin
and external integration use. Authenticated endpoint returns full license
detail with entitlement list and domain usage for admin dashboards.
feat: add signed download endpoint with ed25519 tokens (#622)
Universal: Auto Version Bump / Version Bump (push) Successful in 6s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 1m20s
5bd449017c
GET /api/v1/licensing/download/{product}/{version}.zip?token=XXX&expires=YYY&dlid=ZZZ

ed25519 keypair auto-generated on first use, stored in Gitea data dir.
Update XML endpoint now generates signed URLs with 5-minute TTL.
Download verifies signature + expiry + DLID + entitlement before serving
the release ZIP attachment. Downloads logged to audit trail.
feat: add license management API — admin CRUD, user self-service, tier management (#624)
Universal: Auto Version Bump / Version Bump (push) Successful in 5s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 1m22s
1d1b867df5
Admin: POST/GET/PATCH/DELETE /api/v1/licensing/licenses (reqSiteAdmin)
User: GET /api/v1/licensing/my/licenses, manage domains (reqToken)
Tiers: GET/POST/PATCH/DELETE /api/v1/licensing/tiers (reqSiteAdmin)

Includes pagination, entitlement/activation detail in GET, tier change
triggers entitlement rebuild, delete-tier blocked if active licenses exist.
feat: add product tier admin UI with CRUD and license counts (#627)
Universal: Auto Version Bump / Version Bump (push) Successful in 5s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 1m35s
3a405033ae
Admin page at /-/admin/license-tiers for managing product tiers:
- Tier list with key, name, repos, max domains, license count, sort order
- Create new tier form with repo input
- Delete tier (blocked if active licenses exist)
- Nav item added to admin sidebar
jmiller added 1 commit 2026-06-21 02:36:01 +00:00
Merge remote-tracking branch 'origin/main' into dev
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 8s
Universal: Auto Version Bump / Version Bump (push) Successful in 14s
Universal: PR Check / Secret Scan (pull_request) Successful in 43s
PR RC Release / Build RC Release (pull_request) Failing after 41s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 42s
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Failing after 44s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 1m35s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
e3949077b0
# Conflicts:
#	.mokogitea/manifest.xml
#	.mokogitea/workflows/issue-branch.yml
#	CHANGELOG.md
jmiller merged commit 78ad2c999b into main 2026-06-21 02:37:32 +00:00
Sign in to join this conversation.