Commit graph

53 commits

Author SHA1 Message Date
Andrey Antukh
91118bec70 Improve internal naming of setup/props
This reverts commit a6f70c77cb.
2024-03-14 10:48:23 +01:00
alonso.torres
a6f70c77cb Revert " Improve internal naming of setup/props"
This reverts commit f525c6df5e.
2024-03-13 16:21:12 +01:00
Andrey Antukh
f525c6df5e Improve internal naming of setup/props 2024-03-13 11:39:53 +01:00
alonso.torres
af7142e97b New overlay for v2 information 2024-02-12 16:29:47 +01:00
Andrey Antukh
d2626ead0b Add better email cleaning mechanism
This commit separates the email cleaning mechanism to a separated
function, and enables a proper cleaning of `mailto:` prefix, usually
found on invitations because users just copy and paste from external
source.
2024-02-07 09:14:07 +01:00
Andrey Antukh
a5c6d78ee5 ♻️ Fix some fundamental bugs on climit module
The climit previously of this commit is heavily used inside a
transactions, so in heavy contention operation such that file thumbnail
creation can cause a db pool exhaust.

This commit fixes this issue setting up a better resource limiting
mechanism that works outside the transactions so, contention will
no longer hold an open connection/transaction.

It also adds general improvement to the traceability to the climit
mechanism: it now properly logs the profile-id that is currently
cause some contention on specific resources.

It also add a general/root climit that is applied to all requests
so if someone start making abussive requests, we can clearly detect
it.
2024-02-01 17:37:49 +01:00
Andrey Antukh
69ffd57447 🐛 Fix incorrect props handling on profile registration 2024-01-24 17:12:41 +01:00
Andrey Antukh
746d898245 Improve the db api efficiency
Mainly setup proper defaults and reduce unnecesary allocations
on every db api call.
2024-01-04 12:41:16 +01:00
Andrey Antukh
addb392ecc Add safety mechanism for direct object deletion
The main objective is prevent deletion of objects that can leave
unreachable orphan objects which we are unable to correctly track.

Additionally, this commit includes:

1. Properly implement safe cascade deletion of all participating
   tables on soft deletion in the objects-gc task;

2. Make the file thumbnail related tables also participate in the
   touch/refcount mechanism applyign to the same safety checks;

3. Add helper for db query lazy iteration using PostgreSQL support
   for server side cursors;

4. Fix efficiency issues on gc related task using server side
   cursors instead of custom chunked iteration for processing data.

   The problem resided when a large chunk of rows that has identical
   value on the deleted_at column and the chunk size is small (the
   default); when the custom chunked iteration only reads a first N
   items and skip the rest of the set to the next run.

   This has caused many objects to remain pending to be eliminated,
   taking up space for longer than expected. The server side cursor
   based iteration does not has this problem and iterates correctly
   over all objects.

5. Fix refcount issues on font variant deletion RPC methods
2024-01-03 10:56:57 +01:00
Andrey Antukh
6f93b41920 🎉 Add features assignation for teams 2023-11-07 12:48:31 +01:00
Andrey Antukh
decaeda2fe 🐛 Set bigger maximum token length on backend validation 2023-07-10 12:44:24 +02:00
Andrey Antukh
60130d4db2 🐛 Use correct fullname after OICD registration process 2023-07-10 12:44:24 +02:00
Andrey Antukh
be652b909e Add stronger validationt to auth/register rpc methods 2023-07-04 14:36:31 +02:00
Andrey Antukh
f166fe1926 🐛 Add proper validation of registration domain whitelist on oidc
Fixes #3348
2023-06-26 18:14:56 +02:00
Alejandro Alonso
aeebed6ef7 Merge remote-tracking branch 'origin/staging' into develop 2023-06-16 14:13:51 +02:00
Alejandro Alonso
8a9a3cbf37 Improve invitations validation 2023-06-13 11:51:03 +02:00
Andrey Antukh
84c8a6eced 🐛 Use correct parameters on password update on login 2023-04-24 19:46:42 +02:00
Andrey Antukh
76b931108e Increase strenght of password hashing algorithm
And enable password update mechanism on login
2023-03-14 12:30:27 +01:00
Andrey Antukh
aafbf6bc15 ♻️ Refactor cocurrency model on backend
Mainly the followin changes:

- Pass majority of code to the old and plain synchronous style
  and start using virtual threads for the RPC (and partially some
  HTTP server middlewares).
- Make some improvements on how CLIMIT is handled, simplifying code
- Improve considerably performance reducing the reflection and
  unnecesary funcion calls on the whole stack-trace of an RPC call.
- Improve efficiency reducing considerably the total threads number.
2023-03-14 12:30:27 +01:00
Andrey Antukh
1d21ee7089 Merge remote-tracking branch 'origin/staging' into develop 2023-02-24 18:30:05 +01:00
Andrey Antukh
f0c0e5e43a Add proper audit log for invitations 2023-02-24 10:28:07 +01:00
Andrey Antukh
bd2745d1fe ♻️ Clean email related namespaces
- Remove legacy and outdated mjml directory
- Rename namespace to a proper name
- Add more specs
2023-02-07 18:16:55 +01:00
Andrey Antukh
7e9a5c4a8f Merge remote-tracking branch 'origin/staging' into develop 2023-01-23 09:55:50 +01:00
Andrey Antukh
8d60b3fc3e 🐛 Add missing hint on duplicate profile exception 2023-01-20 16:52:58 +01:00
Andrey Antukh
d8faff47a8 ♻️ Move profile queries and mutations to commands 2023-01-18 10:51:58 +01:00
Andrey Antukh
db689d151e ♻️ Refactor profile and session handling
- makes the profile access more efficient (replace in-app joins to a
  simple select query on profile table
- add partial support for access-tokens (still missing some RPC methods)
- move router definitions to specific modules and simplify the main http
  module definitions to simple includes
- simplifiy authentication code related to access-tokens and sessions
- normalize db parameters with proper namespaced props
- more work on convert all modules initialization to use proper specs
  with fully-qualified keyword config props
2023-01-18 10:51:58 +01:00
Andrey Antukh
bafe3ec087 Revert some changes related to admin that are no longer necessary 2023-01-13 10:19:39 +01:00
Andrey Antukh
2840cb893e 🎉 Add login-with-password flag
As replacement to `login` flag
2022-12-22 16:42:45 +01:00
Andrey Antukh
b929564fa7 ♻️ Add admin facilities on the code base
- Fix bugs related to orphan teams on profile deletion
- Separate session based profile-id param from api user provided
2022-12-22 16:42:45 +01:00
Andrey Antukh
7a9172560d ♻️ Move teams queries and mutations to commands 2022-12-14 16:22:13 +01:00
Andrey Antukh
8bad9d8340 ♻️ Refactor loggers/audit, auth/oidc, and http/clent modules 2022-12-05 08:53:00 +01:00
Andrey Antukh
fde03e21b0 🎉 Add conditional reading to RPC 2022-11-10 14:54:50 +01:00
Andrey Antukh
37ad04d2a6 🎉 Add robust concurrency limiter for RPC 2022-11-07 10:05:56 +01:00
Andrey Antukh
43ab19f690 ♻️ Refactor (minor) of http session code
The rationale behind the refactor:
- Make available profile data to other middlewares without
  the need to access to the database (mainly for error reporting).
- Align with codestyle with the rest of internal modules.
- Simplify code.
2022-11-07 08:37:43 +01:00
Andrey Antukh
a85a65a554 Merge branch 'staging' into develop 2022-10-31 10:44:15 +01:00
Eva
6eb85b2c8c 🐛 Fix nudge error 2022-10-26 17:53:08 +02:00
Andrey Antukh
e50137d186 Minor improvement on internal RPC metadata api 2022-10-18 15:49:18 +02:00
Alejandro Alonso
c4c419b971 Merge remote-tracking branch 'origin/staging' into develop 2022-10-10 18:10:52 +02:00
Andrey Antukh
6e28bb9df8 🐛 Fix issues on profile deletion procedure 2022-10-05 11:27:11 +02:00
luz paz
e30bea0b6f 🔧 Fix typos in source code
Found via `codespell -q 3 -S *.po,./frontend/yarn.lock -L childs,clen,fpr,inflight,ody,ot,ro,te,trys,ue`
2022-10-04 10:40:34 +02:00
Andrey Antukh
06bce92cdc 📎 Fix linter issues on backend 2022-09-28 09:45:43 +02:00
Andrey Antukh
757cee67fb 🎉 Add the ability to completly block access to a profile 2022-09-28 09:45:43 +02:00
Andrey Antukh
37e2fe5c65 Allow repeated registers after small delay
Helps users with expired tokens proceed with a new register
2022-09-28 09:45:43 +02:00
Andrey Antukh
2348146f00 🎉 Add 'email-verification' flag enabled by default
The main idea is deprecating the `insecure-register` flag with the more
general `email-verification` flag.
2022-09-21 09:29:48 +02:00
Andrey Antukh
41134f22e9 📎 Update license header 2022-09-20 23:23:22 +02:00
Andrey Antukh
c4aba025c4 Add some srepl helpers for resend email verification 2022-09-20 23:04:37 +02:00
Andrey Antukh
6f42f4ec45 ♻️ Refactor semaphore and executors 2022-09-20 11:32:45 +02:00
Andrey Antukh
ec3651d85b 🎉 Add optional rate limit support for RPC calls 2022-08-31 12:55:48 +02:00
Andrey Antukh
d6d9d25fce ♻️ Refactor token generation API 2022-08-31 11:01:07 +02:00
Eva
bf63e9da95 🎉 Add new hero projects 2022-08-17 15:50:24 +02:00