Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kosolabs/cipherly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cipherly

A web app for sharing secrets.

Development of this app is being presented as a series of videos on The Friendly TL's YouTube channel.

Build

# Build prod container
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t gcr.io/cipherly/cipherly .

# Run prod container at http://127.0.0.1:8000
docker run -p 8000:8000 gcr.io/cipherly/cipherly

Deploy

Staging is automatically deployed when a PR is merged to main. Prod is deployed by cutting a new release tag.

Manual Deployment

# Upload to Google Container Registry
gcloud builds submit --tag gcr.io/cipherly/cipherly

# Staging Deployment
gcloud run deploy cipherly-staging \
  --image gcr.io/cipherly/cipherly \
  --platform managed \
  --region us-west1 \
  --allow-unauthenticated

# Prod Deployment
gcloud run deploy cipherly \
  --image gcr.io/cipherly/cipherly \
  --platform managed \
  --region us-west1 \
  --allow-unauthenticated

Setting up the Development Environment

  1. Install prerequisites.

    • pnpm
      curl -fsSL https://get.pnpm.io/install.sh | sh -
    • Rust
      curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Clone the repository.

    git clone [email protected]:shadanan/cipherly.git
    cd cipherly
  3. Start a frontend dev server.

    cd frontend
    pnpm install
    pnpm build
    pnpm dev
  4. Start a backend server using a test KEK First, install cargo-watch then run:

    cargo watch -x run --bin cipherly

Message Format

URL Form

The basic URL form for a cipherly message is:

/schema/<schema>/version/<version>/<header>.<envelope>#<header>.<secret>

The schema is a name for the secret type. Currently only password is supported.

The version represents what version the secret type is on. Should be 1.

The header is a URL-safe base64 encoded value that is specific to the schema.

Password

For the password schema encrypted message:

/schema/password/version/1/<header>.<envelope>#<secret>