/riverbank

A Rust-based Delta Sharing server

Primary LanguageRustApache License 2.0Apache-2.0

Riverbank

Riverbank is a Delta Sharing Server implemented in Rust. The Delta Sharing Protocol is still very early on and so this project may see significant changes.

Table 1. Status

Feature

Status

Bearer authentication security

✔️

Configuring shares

✔️

Fetching table versions

✔️

Loading table metadata

✔️

Querying tables

✔️

Paginated responses

Using

Riverbank uses Rust, which will be needed to build and run a local development version of the service.

The config.yml should be configured with the test shares desired. Secrets for accessing resources in AWS S3 can be set in the environment or via a .env file in the repository root directory, for example:

The .env file
AWS_REGION=us-east-2
AWS_ACCESS_KEY_ID=foo
AWS_SECRET_ACCESS_KEY=bar

Environment Variables

Name Required Description

AWS_REGION

yes

AWS region for S3 buckets

AWS_ACCESS_KEY_ID

yes

IAM access key

AWS_SECRET_ACCESS_KEY

yes

IAM secret access key

RIVERBANK_ADMIN

yes

Username for the built-in admin user (e.g. root or admin)

RIVERBANK_PASSWORD

yes

Password for the built-in admin user

RIVERBANK_URL

no

Client-facing URL for generating share links (e.g. http://example.com/api/v1)

In production, download a pre-built release and set up your configuration files appropriately.

In development, you can run cargo run, or if you have catflap and cargo-watch installed catflap -p 8000 — cargo watch -x run which will start up the development server at localhost:8000.

Or you can use the provided docker-compose file to start the database and the riverbank server

docker-compose up --build --force-recreate && docker-compose down --volumes

You can use the API documentation at localhost:8000/apidocs/index.html.

SQLX data json update

Start the test postgres db

docker-compose up db

Start a rust docker environment

docker run -ti -v $(pwd):/src rust:1.54 /bin/bash

Inside this container you can update/crete the sqlx-data.json file

export DATABASE_URL=postgres://postgres:supersecretpassword@host.docker.internal:5432/riverbank
cd /src

cargo install sqlx-cli
cargo sqlx prepare