Adding a User to a Group
Sequence Diagram
User Request
- The user sends a request to the server to add a user to a group.
Server Processing
- The server fetches all the credential fields accessible by the group.
- The server returns the credential fields to the user.
Background Service Processing
- The user sends the credential fields and the user to be added to the group to the background service.
- The background service sends the credential fields to the WASM service for decryption.
- The WASM service decrypts the credential fields.
- The WASM service returns the decrypted credential fields to the background service.
- The background service sends the decrypted credential fields to the WASM service for encryption with the user’s public key.
- The WASM service encrypts the credential fields with the user’s public key.
- The WASM service returns the encrypted credential fields to the background service.
- The background service returns the encrypted credential fields to the user.
- The client then sends the whole payload to hash and then sign
- The client sends the payload to the server with signature in the header.
Server Processing
- The user sends the payload (encrypted credential fields, user ID, and group ID) to the server.
- The server processes the request after verifying the signature.
- For each credential:
- The server infers the access type from the group.
- The server adds entries to the
credential_access
table. - The server adds entries to the
fields
table.
- The server returns the response (success/failure) to the user.
Note:
When a user is added to a group, they gain access to all the credentials that are accessible by the group. The server infers the access type for each credential based on the group’s access and adds the necessary entries to the credential_access
and fields
tables.