βΆοΈGetting Started
VSS API Client
The VSS API Client is a Node.js utility designed to interact with a Versioned Storage Service (VSS). It provides functionality to securely store, retrieve, and manage encrypted data using a cloud-hosted VSS server. Client code
Features
File Storage: Encrypt and upload files to the VSS server.
File Retrieval: Decrypt and fetch files from the server.
Key Version Management: List versions of stored keys for audit and recovery purposes.
Client-Side Encryption: Ensures data is encrypted locally using AES-256-GCM before being transmitted.
Protobuf Serialization: Leverages Protobuf for efficient data communication.
Prerequisites
VSS Server: Access to a running VSS server instance.
https://safe.thunderstack.org/vssProtobuf Schema: Obtain the
vss.protofile from the VSS service provider.
Installation
Clone the repository:
git clone https://github.com/RGB-OS/vss-server cd https://github.com/RGB-OS/vss-server/nodejs-api-clientInstall dependencies:
npm installConfigure the client:
Update
config.jswith:token: JWT token for authentication.vssServerBaseUrl: Base URL for the VSS server.ENCRYPTION_KEY: 32-byte AES encryption key in Base64 format.
Usage
1. Save a File
Upload a file to the VSS server:
2. Retrieve a File
Fetch and decrypt a file from the VSS server:
3. List Key Versions
Retrieve a list of versions for a specific key:
Configuration
config.js Example
config.js ExampleGenerate an AES-256 Encryption Key
Run the following command to generate a 32-byte key:
Directory Structure
Security
Client-Side Encryption: Data is encrypted locally using AES-256-GCM before being sent to the server.
Troubleshooting
Common Issues
Invalid Token:
Ensure the
tokeninconfig.jsis valid and not expired.
Connection Errors:
Verify the
vssServerBaseUrlis correct and the server is running.
Encryption Errors:
Ensure the
ENCRYPTION_KEYmeets format and length requirements.
Contact
For questions or support, reach out to [email protected].
Last updated