@sync-in/server 1.5.2 → 1.6.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 (228) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +1 -0
  3. package/environment/environment.dist.min.yaml +1 -0
  4. package/environment/environment.dist.yaml +88 -30
  5. package/migrations/0002_sleepy_korath.sql +1 -0
  6. package/migrations/meta/0002_snapshot.json +2424 -0
  7. package/migrations/meta/_journal.json +7 -0
  8. package/package.json +6 -4
  9. package/server/app.bootstrap.js +1 -1
  10. package/server/app.bootstrap.js.map +1 -1
  11. package/server/applications/files/services/files-manager.service.js +1 -2
  12. package/server/applications/files/services/files-manager.service.js.map +1 -1
  13. package/server/applications/files/services/files-only-office-manager.service.js +5 -6
  14. package/server/applications/files/services/files-only-office-manager.service.js.map +1 -1
  15. package/server/applications/files/utils/files.js +6 -4
  16. package/server/applications/files/utils/files.js.map +1 -1
  17. package/server/applications/links/links.controller.js +2 -2
  18. package/server/applications/links/links.controller.js.map +1 -1
  19. package/server/applications/links/services/links-manager.service.js +2 -1
  20. package/server/applications/links/services/links-manager.service.js.map +1 -1
  21. package/server/applications/links/services/links-manager.service.spec.js +6 -3
  22. package/server/applications/links/services/links-manager.service.spec.js.map +1 -1
  23. package/server/applications/notifications/constants/notifications.js +9 -0
  24. package/server/applications/notifications/constants/notifications.js.map +1 -1
  25. package/server/applications/notifications/i18n/fr.js +10 -1
  26. package/server/applications/notifications/i18n/fr.js.map +1 -1
  27. package/server/applications/notifications/interfaces/notification-properties.interface.js.map +1 -1
  28. package/server/applications/notifications/mails/models.js +41 -3
  29. package/server/applications/notifications/mails/models.js.map +1 -1
  30. package/server/applications/notifications/mails/templates.js +1 -1
  31. package/server/applications/notifications/mails/templates.js.map +1 -1
  32. package/server/applications/notifications/schemas/notifications.schema.js +2 -1
  33. package/server/applications/notifications/schemas/notifications.schema.js.map +1 -1
  34. package/server/applications/notifications/services/notifications-manager.service.js +16 -13
  35. package/server/applications/notifications/services/notifications-manager.service.js.map +1 -1
  36. package/server/applications/notifications/services/notifications-manager.service.spec.js +9 -8
  37. package/server/applications/notifications/services/notifications-manager.service.spec.js.map +1 -1
  38. package/server/applications/notifications/services/notifications-queries.service.js +1 -1
  39. package/server/applications/notifications/services/notifications-queries.service.js.map +1 -1
  40. package/server/applications/shares/services/shares-manager.service.js +3 -2
  41. package/server/applications/shares/services/shares-manager.service.js.map +1 -1
  42. package/server/applications/sync/constants/auth.js +2 -2
  43. package/server/applications/sync/constants/auth.js.map +1 -1
  44. package/server/applications/sync/dtos/sync-client-registration.dto.js +5 -0
  45. package/server/applications/sync/dtos/sync-client-registration.dto.js.map +1 -1
  46. package/server/applications/sync/dtos/sync-operations.dto.js +1 -2
  47. package/server/applications/sync/dtos/sync-operations.dto.js.map +1 -1
  48. package/server/applications/sync/schemas/sync-clients.schema.js +2 -1
  49. package/server/applications/sync/schemas/sync-clients.schema.js.map +1 -1
  50. package/server/applications/sync/schemas/sync-paths.schema.js +2 -1
  51. package/server/applications/sync/schemas/sync-paths.schema.js.map +1 -1
  52. package/server/applications/sync/services/sync-clients-manager.service.js +28 -20
  53. package/server/applications/sync/services/sync-clients-manager.service.js.map +1 -1
  54. package/server/applications/sync/services/sync-clients-manager.service.spec.js +24 -18
  55. package/server/applications/sync/services/sync-clients-manager.service.spec.js.map +1 -1
  56. package/server/applications/sync/services/sync-queries.service.js +5 -5
  57. package/server/applications/sync/services/sync-queries.service.js.map +1 -1
  58. package/server/applications/users/admin-users.controller.js +48 -37
  59. package/server/applications/users/admin-users.controller.js.map +1 -1
  60. package/server/applications/users/admin-users.controller.spec.js +15 -0
  61. package/server/applications/users/admin-users.controller.spec.js.map +1 -1
  62. package/server/applications/users/constants/routes.js +5 -0
  63. package/server/applications/users/constants/routes.js.map +1 -1
  64. package/server/applications/users/constants/user.js +8 -0
  65. package/server/applications/users/constants/user.js.map +1 -1
  66. package/server/applications/users/dto/delete-user.dto.js +5 -23
  67. package/server/applications/users/dto/delete-user.dto.js.map +1 -1
  68. package/server/applications/users/dto/user-properties.dto.js +38 -3
  69. package/server/applications/users/dto/user-properties.dto.js.map +1 -1
  70. package/server/applications/users/interfaces/admin-user.interface.js.map +1 -1
  71. package/server/applications/users/interfaces/user-secrets.interface.js +10 -0
  72. package/server/applications/users/interfaces/user-secrets.interface.js.map +1 -0
  73. package/server/applications/users/models/user.model.js +84 -50
  74. package/server/applications/users/models/user.model.js.map +1 -1
  75. package/server/applications/users/schemas/user.interface.js.map +1 -1
  76. package/server/applications/users/schemas/users.schema.js +2 -0
  77. package/server/applications/users/schemas/users.schema.js.map +1 -1
  78. package/server/applications/users/services/admin-users-manager.service.js +7 -19
  79. package/server/applications/users/services/admin-users-manager.service.js.map +1 -1
  80. package/server/applications/users/services/admin-users-manager.service.spec.js +7 -26
  81. package/server/applications/users/services/admin-users-manager.service.spec.js.map +1 -1
  82. package/server/applications/users/services/admin-users-queries.service.js +1 -0
  83. package/server/applications/users/services/admin-users-queries.service.js.map +1 -1
  84. package/server/applications/users/services/users-manager.service.js +138 -28
  85. package/server/applications/users/services/users-manager.service.js.map +1 -1
  86. package/server/applications/users/services/users-manager.service.spec.js +11 -9
  87. package/server/applications/users/services/users-manager.service.spec.js.map +1 -1
  88. package/server/applications/users/services/users-queries.service.js +63 -57
  89. package/server/applications/users/services/users-queries.service.js.map +1 -1
  90. package/server/applications/users/users.controller.js +48 -1
  91. package/server/applications/users/users.controller.js.map +1 -1
  92. package/server/applications/users/users.controller.spec.js +8 -1
  93. package/server/applications/users/users.controller.spec.js.map +1 -1
  94. package/server/applications/users/users.e2e-spec.js +2 -1
  95. package/server/applications/users/users.e2e-spec.js.map +1 -1
  96. package/server/applications/users/utils/avatar.js +48 -0
  97. package/server/applications/users/utils/avatar.js.map +1 -0
  98. package/server/authentication/auth.config.js +85 -26
  99. package/server/authentication/auth.config.js.map +1 -1
  100. package/server/authentication/auth.controller.js +117 -9
  101. package/server/authentication/auth.controller.js.map +1 -1
  102. package/server/authentication/auth.controller.spec.js +16 -1
  103. package/server/authentication/auth.controller.spec.js.map +1 -1
  104. package/server/authentication/auth.e2e-spec.js +4 -3
  105. package/server/authentication/auth.e2e-spec.js.map +1 -1
  106. package/server/authentication/auth.module.js +4 -1
  107. package/server/authentication/auth.module.js.map +1 -1
  108. package/server/authentication/constants/auth.js +37 -4
  109. package/server/authentication/constants/auth.js.map +1 -1
  110. package/server/authentication/constants/routes.js +21 -0
  111. package/server/authentication/constants/routes.js.map +1 -1
  112. package/server/authentication/constants/scope.js +20 -0
  113. package/server/authentication/constants/scope.js.map +1 -0
  114. package/server/authentication/dto/login-response.dto.js +27 -4
  115. package/server/authentication/dto/login-response.dto.js.map +1 -1
  116. package/server/authentication/dto/token-response.dto.js +5 -0
  117. package/server/authentication/dto/token-response.dto.js.map +1 -1
  118. package/server/{applications/users/dto/user-password.dto.js → authentication/dto/two-fa-verify.dto.js} +27 -9
  119. package/server/authentication/dto/two-fa-verify.dto.js.map +1 -0
  120. package/server/authentication/guards/auth-basic.strategy.js +6 -5
  121. package/server/authentication/guards/auth-basic.strategy.js.map +1 -1
  122. package/server/authentication/guards/auth-token-access.strategy.js +3 -2
  123. package/server/authentication/guards/auth-token-access.strategy.js.map +1 -1
  124. package/server/authentication/guards/auth-token-refresh.strategy.js +3 -2
  125. package/server/authentication/guards/auth-token-refresh.strategy.js.map +1 -1
  126. package/server/authentication/guards/auth-two-fa-guard.js +81 -0
  127. package/server/authentication/guards/auth-two-fa-guard.js.map +1 -0
  128. package/server/authentication/interfaces/jwt-payload.interface.js +5 -0
  129. package/server/authentication/interfaces/jwt-payload.interface.js.map +1 -1
  130. package/server/authentication/interfaces/token.interface.js +2 -0
  131. package/server/authentication/interfaces/token.interface.js.map +1 -1
  132. package/server/authentication/interfaces/two-fa-setup.interface.js +10 -0
  133. package/server/authentication/interfaces/two-fa-setup.interface.js.map +1 -0
  134. package/server/authentication/models/auth-method.js.map +1 -1
  135. package/server/authentication/services/auth-manager.service.js +72 -49
  136. package/server/authentication/services/auth-manager.service.js.map +1 -1
  137. package/server/authentication/services/auth-methods/auth-method-database.service.js +3 -3
  138. package/server/authentication/services/auth-methods/auth-method-database.service.js.map +1 -1
  139. package/server/authentication/services/auth-methods/auth-method-database.service.spec.js +5 -0
  140. package/server/authentication/services/auth-methods/auth-method-database.service.spec.js.map +1 -1
  141. package/server/authentication/services/auth-methods/auth-method-ldap.service.js +100 -27
  142. package/server/authentication/services/auth-methods/auth-method-ldap.service.js.map +1 -1
  143. package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js +11 -12
  144. package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js.map +1 -1
  145. package/server/authentication/services/auth-methods/auth-method-two-fa.service.js +251 -0
  146. package/server/authentication/services/auth-methods/auth-method-two-fa.service.js.map +1 -0
  147. package/server/authentication/services/auth-methods/auth-method-two-fa.service.spec.js +41 -0
  148. package/server/authentication/services/auth-methods/auth-method-two-fa.service.spec.js.map +1 -0
  149. package/server/authentication/utils/crypt-secret.js +68 -0
  150. package/server/authentication/utils/crypt-secret.js.map +1 -0
  151. package/server/common/functions.js +18 -2
  152. package/server/common/functions.js.map +1 -1
  153. package/server/common/qrcode.js +34 -0
  154. package/server/common/qrcode.js.map +1 -0
  155. package/server/common/shared.js +18 -0
  156. package/server/common/shared.js.map +1 -1
  157. package/server/configuration/config.environment.js +23 -6
  158. package/server/configuration/config.environment.js.map +1 -1
  159. package/server/configuration/config.interfaces.js +10 -0
  160. package/server/configuration/config.interfaces.js.map +1 -0
  161. package/server/configuration/config.loader.js.map +1 -1
  162. package/server/configuration/config.validation.js +13 -13
  163. package/server/configuration/config.validation.js.map +1 -1
  164. package/server/infrastructure/cache/adapters/mysql-cache.adapter.js +6 -6
  165. package/server/infrastructure/cache/adapters/mysql-cache.adapter.js.map +1 -1
  166. package/server/infrastructure/cache/schemas/mysql-cache.schema.js +2 -1
  167. package/server/infrastructure/cache/schemas/mysql-cache.schema.js.map +1 -1
  168. package/server/infrastructure/cache/services/cache.service.js.map +1 -1
  169. package/server/infrastructure/database/columns.js +39 -0
  170. package/server/infrastructure/database/columns.js.map +1 -0
  171. package/server/infrastructure/database/database.config.js +0 -1
  172. package/server/infrastructure/database/database.config.js.map +1 -1
  173. package/server/infrastructure/mailer/interfaces/mail.interface.js.map +1 -1
  174. package/server/infrastructure/mailer/mailer.config.js +12 -0
  175. package/server/infrastructure/mailer/mailer.config.js.map +1 -1
  176. package/server/infrastructure/mailer/mailer.service.js +2 -1
  177. package/server/infrastructure/mailer/mailer.service.js.map +1 -1
  178. package/static/assets/mimes/text-x-c.svg +1 -0
  179. package/static/chunk-2TZUZMCM.js +4 -0
  180. package/static/chunk-2XJ5Z2GZ.js +1 -0
  181. package/static/{chunk-7VRUZRJG.js → chunk-5M4YJZUB.js} +2 -2
  182. package/static/{chunk-MRSWNAVB.js → chunk-5ZGQYTS2.js} +1 -1
  183. package/static/chunk-6BFNMDUD.js +1 -0
  184. package/static/chunk-6IRL673W.js +559 -0
  185. package/static/{chunk-2R6HHGUR.js → chunk-ABGR5AYC.js} +1 -1
  186. package/static/chunk-CN27VAGB.js +1 -0
  187. package/static/{chunk-MVO4WZLK.js → chunk-DNMO47SY.js} +1 -1
  188. package/static/{chunk-MGGT6MIJ.js → chunk-EI4PVI2W.js} +1 -1
  189. package/static/chunk-ET6QDNNM.js +1 -0
  190. package/static/{chunk-L6MU6S2V.js → chunk-G2TKYYWK.js} +1 -1
  191. package/static/chunk-G3FOG2QB.js +1 -0
  192. package/static/{chunk-MCLQFZ3S.js → chunk-GCUWGVYT.js} +1 -1
  193. package/static/{chunk-RSS6GYNE.js → chunk-HME7LAEY.js} +1 -1
  194. package/static/chunk-IEUANP3Q.js +1 -0
  195. package/static/{chunk-VJRTMDEJ.js → chunk-IIFHIIC6.js} +1 -1
  196. package/static/{chunk-YJMN3B4N.js → chunk-KPZ7FEMO.js} +1 -1
  197. package/static/{chunk-JYXLQRHG.js → chunk-M57NVD4V.js} +1 -1
  198. package/static/chunk-NN3VQOS7.js +1 -0
  199. package/static/chunk-NW3CTYUW.js +1 -0
  200. package/static/{chunk-6OJZWYRZ.js → chunk-O3ANXCPE.js} +1 -1
  201. package/static/{chunk-ZC5NIT55.js → chunk-QFOMEU3T.js} +1 -1
  202. package/static/{chunk-BIUNUYZ5.js → chunk-RKNTQYMU.js} +1 -1
  203. package/static/{chunk-VUI3KV7V.js → chunk-UQ4TRQCE.js} +1 -1
  204. package/static/{chunk-WI7FOANP.js → chunk-WINILGQN.js} +1 -1
  205. package/static/{chunk-NE4NDO45.js → chunk-X7MFVDBY.js} +1 -1
  206. package/static/chunk-XCBLEI2E.js +1 -0
  207. package/static/{chunk-CRQNEHTX.js → chunk-XLWCV4HI.js} +1 -1
  208. package/static/chunk-XPIYOZBX.js +4 -0
  209. package/static/{chunk-LLWSLOSX.js → chunk-YD74UCFG.js} +1 -1
  210. package/static/{chunk-IZL7JPTS.js → chunk-YDFVKH2D.js} +1 -1
  211. package/static/{chunk-SPTF6FSM.js → chunk-YVJDYSDE.js} +1 -1
  212. package/static/index.html +2 -2
  213. package/static/main-QNBKYA6L.js +9 -0
  214. package/static/{styles-FYUSO6OJ.css → styles-A5VYX3CE.css} +1 -1
  215. package/server/applications/users/dto/user-password.dto.js.map +0 -1
  216. package/static/chunk-4U5A2DEP.js +0 -4
  217. package/static/chunk-54EAZ2UD.js +0 -1
  218. package/static/chunk-7ZRXJONB.js +0 -1
  219. package/static/chunk-F2J2IIJE.js +0 -1
  220. package/static/chunk-FNFGUIQH.js +0 -4
  221. package/static/chunk-GGLK52CG.js +0 -1
  222. package/static/chunk-HW2H3ISM.js +0 -559
  223. package/static/chunk-HX6BBYVD.js +0 -1
  224. package/static/chunk-JF7S3UYQ.js +0 -1
  225. package/static/chunk-KSHPKI4G.js +0 -1
  226. package/static/chunk-VPJ2V27B.js +0 -1
  227. package/static/chunk-ZXS4V7J2.js +0 -1
  228. package/static/main-FFIWFD2F.js +0 -7
package/CHANGELOG.md CHANGED
@@ -1,4 +1,24 @@
1
1
 
2
+ ## [1.6.0](https://github.com/Sync-in/server/compare/v1.5.2...v1.6.0) (2025-09-26)
3
+
4
+ 🔥🚀 Support for Multi-Factor Authentication (MFA) & App Passwords
5
+
6
+ ### Features
7
+
8
+ * **feat: mfa and app passwords** ([5ed579f](https://github.com/Sync-in/server/commit/5ed579fd31dcf51770abe52f385b4ed306a22bd8) [431a988](https://github.com/Sync-in/server/commit/431a988c6d0b88711b50b642bd440c42f80283ce) [43a8b10](https://github.com/Sync-in/server/commit/43a8b10eb8869eafd3014cdad034c2b093237edf) [91eda5c](https://github.com/Sync-in/server/commit/91eda5cbc396da3bd6cfddf5e1e4001466327575))
9
+ * **backend:sync:** handle 2FA during client registration ([b0aadde](https://github.com/Sync-in/server/commit/b0aadde6323ffc9a61f43ea424b7cff8922f718d))
10
+ * **backend:auth:** add support for AD-specific LDAP attributes ([1b6a8fc](https://github.com/Sync-in/server/commit/1b6a8fc139db54a71a4aaa5cba7715d349ffef0f))
11
+ * **backend:infrastructure:** allow configuration of ignoreTLS and rejectUnauthorized for SMTP transport ([c1b3f5a](https://github.com/Sync-in/server/commit/c1b3f5a810e2cdc6977b48022f491e602b70ee9f))
12
+ * **backend:notifications:** add email notifications for two-factor authentication security events ([b207f33](https://github.com/Sync-in/server/commit/b207f336c2dc75deec7992975b7aa1376289ee42))
13
+ * **backend:notifications:** include link password in sent emails ([1a3ed0a](https://github.com/Sync-in/server/commit/1a3ed0a7624c16986ced259d8e272eaa2872c8a8))
14
+ * **backend:users:** add email notifications when account is locked ([954bb10](https://github.com/Sync-in/server/commit/954bb1061e6399768aad13d9822491975a843b9b))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **backend:auth:** improve handling of sql errors ([f4b78fa](https://github.com/Sync-in/server/commit/f4b78fa2779d2fea01d7dd554d861cb6272b594e))
20
+ * **backend:users:** ensure default value for user secrets when null ([090eb6e](https://github.com/Sync-in/server/commit/090eb6e61f4973522f201879e611b744aa0677e8))
21
+
2
22
  ## [1.5.2](https://github.com/Sync-in/server/compare/v1.5.1...v1.5.2) (2025-09-09)
3
23
 
4
24
 
package/README.md CHANGED
@@ -41,6 +41,7 @@ Sync-in fits seamlessly into any environment — from small teams to large enter
41
41
  - 🔒 Security & Data Ownership
42
42
  - Full control over data security and compliance
43
43
  - Designed to protect sensitive documents and prevent unauthorized access
44
+ - **Multi-Factor Authentication (MFA)**: TOTP (authenticator apps), recovery codes, app passwords
44
45
  - 🔑 Advanced User Access Control
45
46
  - **Spaces & Shares**: Organize files with fine-grained access permissions
46
47
  - Role-based permission system ensuring secure file management
@@ -1,6 +1,7 @@
1
1
  mysql:
2
2
  url: mysql://user:MySQLRootPassword@localhost:3306/database
3
3
  auth:
4
+ encryptionKey: changeEncryptionKeyWithStrongKey
4
5
  token:
5
6
  access:
6
7
  secret: changeAccessWithStrongSecret
@@ -1,97 +1,155 @@
1
1
  server:
2
- # default host : 0.0.0.0
2
+ # default host : `0.0.0.0`
3
3
  host: 0.0.0.0
4
- # default port : 8080
4
+ # default port : `8080`
5
5
  port: 8080
6
- # workers: auto (use all cpus) | number
6
+ # workers: `auto` (use all cpus) | number
7
7
  # regardless of the value, starts with at least 2 workers, 1 worker is dedicated to scheduled tasks
8
- workers: 4
9
- # trust proxy: true | false | 127.0.0.1,192.168.1.1/24
10
- trustProxy: false
11
- # restartOnFailure : automatically restart workers if they are killed or die
8
+ workers: 2
9
+ # trust proxy: number (trust the nth hop from the front-facing proxy server as the client) | `true` | `false` | `127.0.0.1,192.168.1.1/24`
10
+ # default: 1
11
+ trustProxy: 1
12
+ # restartOnFailure: automatically restart workers if they are killed or die
13
+ # default: `true`
12
14
  restartOnFailure: true
13
15
  logger:
14
- # level: trace | debug | info | warn | error | fatal
16
+ # level: `trace` | `debug` | `info` | `warn` | `error` | `fatal`
17
+ # default: `info`
15
18
  level: info
16
- # stdout : if false logs are written to the run directory (default: true)
19
+ # stdout: if false logs are written to the run directory
20
+ # default: `true`
17
21
  stdout: true
18
22
  # colorize output
23
+ # default: `true`
19
24
  colorize: true
20
25
  # path to the log file used when stdout is set to false
21
26
  filePath:
22
27
  mysql:
28
+ # required
23
29
  url: mysql://user:MySQLRootPassword@localhost:3306/database
30
+ # default: `false`
24
31
  logQueries: false
25
32
  cache:
26
- # adapter: mysql (default) | redis (requires optional dependency: redis)
33
+ # adapter: `mysql` | `redis`
34
+ # default: `mysql`
27
35
  adapter: mysql
28
- # default ttl in seconds
36
+ # ttl in seconds
37
+ # default: `60`
29
38
  ttl: 60
30
39
  # redis adapter url
40
+ # default: `redis://127.0.0.1:6379`
31
41
  redis: redis://127.0.0.1:6379
32
42
  websocket:
33
- # adapter: cluster (Node.js Workers: default) | redis (requires optional dependency: @socket.io/redis-adapter)
43
+ # adapter: `cluster` (Node.js Workers: default) | `redis`
44
+ # default: `cluster`
34
45
  adapter: cluster
35
46
  # cors origin allowed
47
+ # default: `*`
36
48
  corsOrigin: '*'
37
49
  # redis adapter url
50
+ # default: `redis://127.0.0.1:6379`
38
51
  redis: redis://127.0.0.1:6379
39
52
  mail:
40
53
  host: smtp.server.com
41
- port: 587
54
+ # default: `25`
55
+ port: 25
56
+ # default: `Sync-in<notification@sync-in.com>`
42
57
  sender: 'Sync-in<notification@sync-in.com>'
58
+ # optional
43
59
  auth:
44
60
  user: user
45
61
  pass: password
46
62
  # secure: defines if the connection should use SSL (if true) or not (if false)
63
+ # note: setting `secure: false` does not necessarily mean messages are sent in plaintext
64
+ # if the server supports STARTTLS, the connection is usually upgraded to TLS automatically
65
+ # default: `false`
47
66
  secure: false
67
+ # ignoreTLS: if true, disables the use of STARTTLS even if the server advertises it
68
+ # default: false
69
+ ignoreTLS: false
70
+ # rejectUnauthorized: reject the connection if the server's TLS certificate is invalid
71
+ # default: false
72
+ rejectUnauthorized: false
48
73
  # enable logger
74
+ # default: `false`
49
75
  logger: false
50
76
  # set log level to debug
77
+ # default: `false`
51
78
  debug: false
52
79
  auth:
53
- # adapter : mysql (default) | ldap
80
+ # adapter : `mysql` | `ldap`
81
+ # default: `mysql`
54
82
  method: mysql
55
- # sameSite (cookie settings) : lax | strict
56
- sameSite: strict
83
+ # key used to encrypt user secret keys in the database
84
+ # optional, but strongly recommended
85
+ # warning: do not change or remove the encryption key after MFA activation, or the codes will become invalid
86
+ encryptionKey: changeEncryptionKeyWithStrongKey
87
+ # multifactor authentication
88
+ mfa:
89
+ # totp configuration
90
+ totp:
91
+ # enable TOTP authentication
92
+ # default: true
93
+ enabled: true
94
+ # name displayed in the authentication app (FreeOTP, Proton Authenticator, Aegis Authenticator etc.)
95
+ # default: Sync-in
96
+ issuer: Sync-in
97
+ # cookie sameSite setting: `lax` | `strict`
98
+ # default: `strict`
99
+ cookieSameSite: strict
57
100
  token:
58
101
  access:
59
- name: sync-in-access
60
- # used for token & cookie signatures
102
+ # used for token and cookie signatures
103
+ # required
61
104
  secret: changeAccessWithStrongSecret
105
+ # token expiration = cookie maxAge
106
+ # default: `30m`
62
107
  expiration: 30m
63
- cookieMaxAge: 30m
64
108
  refresh:
65
- name: sync-in-refresh
66
- # used for token & cookie signatures
109
+ # used for token and cookie signatures
110
+ # required
67
111
  secret: changeRefreshWithStrongSecret
112
+ # token expiration = cookie maxAge
113
+ # default: `4h`
68
114
  expiration: 4h
69
- cookieMaxAge: 4h
70
115
  ldap:
71
116
  # e.g: [ldap://localhost:389, ldaps://localhost:636] (array required)
72
117
  servers: []
73
- # baseDN: distinguished name, e.g: (ou=people,dc=ldap,dc=sync-in,dc=com)
118
+ # baseDN: distinguished name ( e.g.ou=people,dc=ldap,dc=sync-in,dc=com)
74
119
  baseDN:
75
120
  # filter, e.g: (acl=admin)
76
121
  filter:
77
- # login attribute: uid (default) or mail
78
- loginAttribute:
122
+ attributes:
123
+ # login attribute (e.g. `uid` | `sAMAccountName` | `userPrincipalName`)
124
+ # default: `uid`
125
+ login: uid
126
+ # email attribute: `mail` or `email`
127
+ # default: `mail`
128
+ email: mail
79
129
  applications:
80
130
  files:
131
+ # required
81
132
  dataPath: /home/sync-in
82
- # Default to 5 GB if not specified
133
+ # default: 5368709120 (5 GB)
83
134
  maxUploadSize: 5368709120
84
- # Show files starting with a dot in the file explorer (default: false)
135
+ # Show files starting with a dot in the file explorer
136
+ # default: false
85
137
  showHiddenFiles: false
86
138
  onlyoffice:
139
+ # enable onlyoffice integration
140
+ # default: false
87
141
  enabled: false
88
- # for an external server (e.g: https://onlyoffice.domain.com), remember the url must be accessible from browser !
142
+ # for an external server (e.g., https://onlyoffice.domain.com), remember the url must be accessible from browser !
89
143
  # if externalServer is empty (case of official docker compose), we use the local instance
144
+ # default: null
90
145
  externalServer:
91
146
  # secret used for jwt tokens, it must be the same on the onlyoffice server
147
+ # required
92
148
  secret: onlyOfficeSecret
93
- # if you use https, set to true
149
+ # if you use https, set to `true`
150
+ # default: `false`
94
151
  verifySSL: false
95
152
  appStore:
96
- # repository: public (default) | local
153
+ # repository: `public` | `local`
154
+ # default: `public`
97
155
  repository: public
@@ -0,0 +1 @@
1
+ ALTER TABLE `users` ADD `secrets` json;