streamby-core 0.33.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/LICENSE +661 -0
  3. package/README.md +53 -2
  4. package/dist/middleware/createRouter.js +15 -2
  5. package/dist/middleware/routes/ai.js +3 -3
  6. package/dist/middleware/routes/connection.js +3 -12
  7. package/dist/middleware/routes/dbConnection.js +7 -26
  8. package/dist/middleware/routes/distribution.js +12 -5
  9. package/dist/middleware/routes/export.js +5 -4
  10. package/dist/middleware/routes/media.js +23 -10
  11. package/dist/middleware/routes/member.js +3 -12
  12. package/dist/middleware/routes/pipeline.js +3 -3
  13. package/dist/middleware/routes/production.js +9 -9
  14. package/dist/middleware/routes/project.js +8 -25
  15. package/dist/middleware/routes/renderFarm.js +13 -6
  16. package/dist/middleware/routes/review.js +4 -4
  17. package/dist/middleware/routes/rights.js +1 -1
  18. package/dist/middleware/routes/storage.js +21 -15
  19. package/dist/middleware/routes/storageConnection.js +2 -8
  20. package/dist/middleware/routes/workflow.js +1 -1
  21. package/dist/services/auth.d.ts +1 -2
  22. package/dist/services/auth.js +9 -11
  23. package/dist/services/connectionResolver.js +2 -2
  24. package/dist/services/executor.d.ts +4 -1
  25. package/dist/services/executor.js +29 -11
  26. package/dist/services/reencryptCredentials.d.ts +5 -0
  27. package/dist/services/reencryptCredentials.js +74 -0
  28. package/dist/services/userIntegration.d.ts +2 -2
  29. package/dist/services/userIntegration.js +7 -1
  30. package/dist/types/index.d.ts +2 -0
  31. package/dist/utils/auth.d.ts +15 -1
  32. package/dist/utils/auth.js +21 -6
  33. package/dist/utils/encryption.d.ts +6 -1
  34. package/dist/utils/encryption.js +80 -27
  35. package/dist/utils/serviceEndpoints.d.ts +2 -0
  36. package/dist/utils/serviceEndpoints.js +26 -0
  37. package/package.json +4 -3
  38. package/dist/middleware/routes/apiConnection.d.ts +0 -3
  39. package/dist/middleware/routes/apiConnection.js +0 -100
  40. package/dist/middleware/routes/credential.d.ts +0 -3
  41. package/dist/middleware/routes/credential.js +0 -80
  42. package/dist/services/apiConnection.d.ts +0 -18
  43. package/dist/services/apiConnection.js +0 -65
  44. package/dist/services/credential.d.ts +0 -8
  45. package/dist/services/credential.js +0 -70
  46. package/dist/services/pipeline.d.ts +0 -2
  47. package/dist/services/pipeline.js +0 -292
package/CHANGELOG.md ADDED
@@ -0,0 +1,67 @@
1
+ # Changelog
2
+
3
+ ## 0.34.0
4
+
5
+ ### ⚠️ Migration and deploy
6
+
7
+ Read this before deploying 0.34.0.
8
+
9
+ - **Stored credentials are converted at startup.** The first time 0.34.0 starts, every stored
10
+ credential is re-encrypted in the new format (`v2`, AES-256-GCM). This covers project API,
11
+ database and storage connections, export credentials, and user integrations. Distribution and
12
+ render farm credentials, which were stored unencrypted, are encrypted. The conversion is
13
+ non-destructive: a value is only replaced by its own re-encryption, and one that can't be
14
+ decrypted with the configured keys is left as it is and logged.
15
+ - **There's no going back after the conversion.** Versions before 0.34.0 can't read the `v2`
16
+ format. Once 0.34.0 has started against your databases, don't roll back to 0.33.x. If you run
17
+ several instances, deploy all of them together, so that no older instance reads converted
18
+ credentials.
19
+ - **Don't rotate the encryption key in the same deploy that does the conversion.** The old
20
+ format (AES-256-CBC) doesn't record which key encrypted a value. Deploy 0.34.0 with your
21
+ current key first. Rotate afterwards, with the new `encryptPreviousKeys` option (see the
22
+ README).
23
+
24
+ ### Breaking changes
25
+
26
+ - **Permissions depend on the member's role in the project**, not on the platform role that
27
+ `authProvider` returns (`Auth.role`). Only active members count (`status: 'active'`); a
28
+ pending invitation gives no access.
29
+ - **Editing a project requires being an editor or an admin of it.** This covers its content,
30
+ connections, exports, files, jobs, workflow, pipelines, production, reviews and rights, and
31
+ the upload URLs.
32
+ - **Deleting a project and managing its members requires being an admin of it.** A platform
33
+ admin who isn't an admin of the project can't do either.
34
+ - **The public export route doesn't run nodes that use credentials, nor nodes that start
35
+ jobs.** A request to `GET /:projectId/export/:exportName` has no session, so only nodes that
36
+ read data run: static JSON, the built-in databases and storage, and the project's own
37
+ connections. A node using an account integration (Claude, Jira, Google, or a user's own
38
+ database or storage), or one that starts a job (transcode, render, AI and the like), fails
39
+ with an error.
40
+ - **`getDecryptedIntegrationCredentialById` now takes the project** as its third argument:
41
+ `getDecryptedIntegrationCredentialById(integrationId, config, project)`. It resolves the
42
+ credential only while the integration's owner is an active member of that project.
43
+ - **`GET /users/search` requires a session.**
44
+
45
+ ### Security
46
+
47
+ - An account integration's credential is tied to its owner. It resolves only for a project its
48
+ owner is an active member of.
49
+ - An integration node sends its credential only to its own provider's API: `api.anthropic.com`
50
+ for Claude, `api.atlassian.com` or `*.atlassian.net` for Jira, and `*.googleapis.com` for
51
+ Google. It does so over https, never to a URL with a port or credentials in it, and without
52
+ following redirects.
53
+ - Only the public export route goes without a session. Before, any path containing `/export/`
54
+ skipped authentication.
55
+ - A job is visible only to whoever started it, or to a member of its project.
56
+ - Stored credentials are encrypted with AES-256-GCM (authenticated, so an altered value fails
57
+ to decrypt), and each value records the id of the key that encrypted it, so keys can be
58
+ rotated.
59
+ - Distribution and render farm connections encrypt their credential when they're saved.
60
+
61
+ ### Added
62
+
63
+ - `encryptPreviousKeys` (in the router config): keys stored credentials may still be encrypted
64
+ with. They're used only to decrypt, and what they hold is re-encrypted with `encrypt` at
65
+ startup.
66
+ - Distribution and render farm connections take their credential as `credential`. The old name,
67
+ `encryptedCredential`, is still accepted for the same plain value.