Persistent, pluggable storage

Learn about Cased's persistent storage layer and how to set it up for custom deployments.

Overview

Cased Shell comes with persistent/nonvolatile storage automatically when using our preferred deployment method to deploy an instance. It automatically creates a private, encrypted S3 bucket and uses it to store application data related to your Cased Shell instance. All data is encrypted at rest and in transit using a per-instance Amazon KMS key.
If you do not configure persistent storage, Cased Shell will simply fallback to non-persistent, local storage for things like your SSH recordings.

Custom AWS deployment

If you are not deploying Cased Shell with our preferred deployment method all you have to do is set the following environment variables as follows.
  • STORAGE_BACKEND: set to s3 to store data on s3
  • STORAGE_S3_BUCKET: set to the name of a bucket dedicated for this purpose
  • STORAGE_S3_ACCESS_KEY_ID: set to the access key ID of a user that can read and write objects from the above bucket
  • STORAGE_S3_SECRET_ACCESS_KEY: set to the secret access key ID of a user that can read and write objects from the above bucket
  • STORAGE_S3_REGION: set to the region containing the bucket:
  • STORAGE_S3_ENDPOINT: (advanced) if using a custom s3 backend, set this value to its API endpoint (http://minio:9000)
  • STORAGE_S3_SIGNATURE_VERSION: (advanced) if using a custom s3 backend, set this value to the signature version in use (s3v4)

Custom Google Cloud deployment

Cased uses the official Google Cloud client directly so credentials are automatically managed using this pattern.
gsutil mb gs://cased-shell-EXAMPLE
Grant the service account the objectAdmin role on the bucket:
gsutil iam ch \
serviceAccount:[email protected]:objectAdmin,legacyBucketReader \
gs://cased-shell-EXAMPLE
Add the bucket name to the environment:
echo "STORAGE_GOOGLE_CLOUD_BUCKET=cased-shell-EXAMPLE" >> .env
echo "STORAGE_BACKEND=gcs" >> .env
Now deploy again:
gcloud run deploy cased-shell \
--source=. \
--region=us-central1 \
--service-account=cased-shell \
--port=8888 \
--allow-unauthenticated \
--vpc-connector=cased-shell-vpc-connector \
--set-env-vars="$(cat .env | tr '\n' ',')"