WeKnora/frontend
wizardchen d2ffc1b973 refactor(api-keys): simplify authorization to a single-role gate
Redesign tenant API key authorization around one dimension (role) plus a
central default-deny gate, replacing the previous role + KB-scoped flag model.

- Add APIKeyGate as the single authority for API-key authorization: routes
  declare one policy (MinRole) via apiKeyGroup/apiKeyRoute helpers; undeclared
  routes are denied by default. JWT principals short-circuit the gate and the
  JWT-centric RBAC guards short-circuit for API-key principals.
- Roles: viewer/contributor/admin are knowledge-base data-plane only (KB scope
  is a pure downstream data filter); owner is a full-access tenant tier that
  unlocks tenant-level infrastructure routes and is required for every method.
- Drop the KBScoped policy flag and the KB-restricted-vs-tenant branching.
- Security hardening: never disclose HMAC secret (return presence only), abort
  writes on API-key encryption failure, deny KB-restricted keys on /files, and
  backfill legacy key hashes at startup instead of O(N) plaintext scans.
- Frontend: two-level create dialog (access type -> permission level), rename
  role labels to reflect actual scope, sync en/zh/ko/ru locales.
- Fix startup self-check false-positive on trailing-slash routes and normalize
  gin paths before comparison; add regression tests.
2026-07-07 12:00:13 +08:00
..
packages chore: Update Dockerfile and package-lock.json for xlsx package management 2025-11-17 13:15:10 +08:00
public feat(embed): add widget, visitor chat, and management UI (#1657) 2026-06-12 23:10:39 +08:00
src refactor(api-keys): simplify authorization to a single-role gate 2026-07-07 12:00:13 +08:00
.dockerignore feat(docker): streamline frontend build process and update Docker configuration 2026-06-10 16:04:11 +08:00
.gitignore init commit 2025-08-05 15:08:07 +08:00
Dockerfile feat(docker): streamline frontend build process and update Docker configuration 2026-06-10 16:04:11 +08:00
docker-entrypoint.sh feat: support remote backend and HTTPS proxy 2026-02-09 17:58:35 +08:00
embed.html feat(embed): add widget, visitor chat, and management UI (#1657) 2026-06-12 23:10:39 +08:00
env.d.ts feat(frontend): inject commit ID into frontend build for version tracking 2026-06-09 18:08:57 +08:00
index.html fix(frontend): bundle tdesign-icons sprite locally for offline deploys 2026-04-23 18:21:49 +08:00
nginx.conf fix(nginx):embed iframe x-frame-options 2026-07-02 17:17:24 +08:00
package-lock.json docs: release v0.6.3 notes and polish architecture diagram 2026-06-26 14:59:09 +08:00
package.json docs: release v0.6.3 notes and polish architecture diagram 2026-06-26 14:59:09 +08:00
package.json.md5 fix: update environment configuration for debugging and logging, enhance SQLite FTS5 table management, and improve API base URL handling 2026-04-11 18:51:16 +08:00
pnpm-workspace.yaml fix(frontend): configure pnpm v11 build approvals in workspace file 2026-05-08 16:34:33 +08:00
tsconfig.app.json fix lint and test failures 2026-07-01 17:31:42 +08:00
tsconfig.json init commit 2025-08-05 15:08:07 +08:00
tsconfig.node.json init commit 2025-08-05 15:08:07 +08:00
vite.config.ts feat: add EPUB and MHTML document support 2026-06-16 11:25:27 +08:00