dify/api/tests/unit_tests
yungle246 a79bc7d074 feat(api): mask secret tokens in api-key list responses (reveal-once)
Previously the console api-key list returned every key's full plaintext
token, so anyone with console access could retrieve the secret of an
already-created key (via the copy button or the raw API response). This
is contrary to the reveal-once norm.

- List endpoints (app keys, workspace dataset keys, per-dataset keys) now
  return a masked token (prefix + last 4); the full secret is only ever
  returned by the create endpoint, at creation time.
- Frontend secret-key modal displays the masked token as-is and drops the
  copy affordance for existing keys (copying a masked value is pointless).

Applies to both app and dataset keys since they share the modal and the
ApiKeyItem response model.
2026-06-25 14:21:38 +09:00
..
clients feat(agent-v2): sync nightly updates to main (2026-06-22) (#37651) 2026-06-23 08:05:16 +00:00
commands chore: add Type to test (#37191) 2026-06-19 16:44:20 +00:00
configs fix(api): add bounded timeouts to Nacos remote settings HTTP requests (#37444) 2026-06-16 07:42:51 +00:00
controllers feat(api): mask secret tokens in api-key list responses (reveal-once) 2026-06-25 14:21:38 +09:00
core feat(agent-v2): sync nightly updates to main (2026-06-22) (#37651) 2026-06-23 08:05:16 +00:00
enterprise/telemetry chore: Caplog type (#37603) 2026-06-18 18:53:13 +00:00
enums refactor: quota v3 integration (#35436) 2026-04-27 01:49:40 +00:00
events chore: add more type in test (#37609) 2026-06-18 23:07:12 +00:00
extensions refactor: improve stream close 2 (#37106) 2026-06-23 03:32:33 +00:00
factories fix: validate conversation variable description length to prevent varchar(255) truncation error (#33038) 2026-06-10 07:28:12 +00:00
fields feat: RBAC (#37107) 2026-06-18 16:35:29 +00:00
libs Merge branch 'main' into feat/dataset-api-key-scope 2026-06-23 18:21:21 +09:00
migrations feat(agent-v2): sync nightly updates to main (2026-06-22) (#37651) 2026-06-23 08:05:16 +00:00
models chore: not use request.scoped session (#37421) 2026-06-22 19:38:24 +00:00
oss chore: add more type in test (#37609) 2026-06-18 23:07:12 +00:00
repositories feat(api): introduce select, file and file list form input types to Human Input node (#36322) 2026-06-04 01:54:28 +00:00
services chore: compatiable old role update (#37804) 2026-06-23 09:08:08 +00:00
tasks chore: Caplog type (#37603) 2026-06-18 18:53:13 +00:00
tools chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
utils chore: add Type to test (#37191) 2026-06-19 16:44:20 +00:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
.gitignore Enhance Code Consistency Across Repository with .editorconfig (#19023) 2025-04-29 18:04:33 +08:00
conftest.py chore: fix use select style api in orm (#35531) 2026-04-24 08:35:20 +00:00
test_makefile_backend_tests.py test(api): manage backend pytest services natively (#36235) 2026-05-19 07:52:15 +00:00
test_pytest_dify.py test(api): manage backend pytest services natively (#36235) 2026-05-19 07:52:15 +00:00