-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Support storage nodes setting a storage limit per user's application context and limiting the maximum number of users they support.
This will enable user's to pre-purchase specific amounts of storage capacity that will be enforced by storage nodes.
This can be enforced by checking the storage limit at the following endpoints:
/user/createDatabase/user/updateDatabase/auth/connect
This allows a user to obtain a refresh token, but not an access token. The user can also delete databases, but can't create or update them.
Tasks:
-
/auth/authenticatewill be updated to set a default per user storage limit -
.envwill be updated to specify the default storage limit for new users (10Mb default) -
/user/usagewill be updated to include the user's storage limit (in bytes) and utilization percentage -
_userscollection will store a new fieldstorageLimitwhich is the maximum size in bytes the user can store - Enforce limit
/user/createDatabase - Enforce limit
/user/updateDatabase - Enforce limit
/auth/connect -
.envwill be updated to specify the maximum number of users (10,000 default) for the node - Throw an error if attempting to create a new user and the maximum number of users has been hit
- Create an endpoint
/statusthat outputs (current version, maximum user count, current user count)
Note: A user could exceed the storage limit during a given session, but there's no point as once their access token expires they will no longer have access to the data.
Note: A "user" is actually a combination of DID and application context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels