A simple API to upload notes or files to KBFS

Overview

KBFS Upload API

Purpose

This API can be used to upload either secure notes or files to a secure KeybaseFS folder. The idea behind it is that files can be stored in a secure, end-to-end encrypted format without having less tech-savvy end users sign up for Keybase. This was created as a work around I needed at work so that coworkers could send me sensitive information in a secure format, but they didn't have Keybase or know how to use GPG. Creating this API and an internal web-page front end for it allowed them to send me this information and have it stored securely without teaching them anything about encryption.

Usage

Direct Launch

If you'd like to run this directly using Poetry to install it. Simply do poetry install to install it, then poetry run kbfsu to launch it.

Docker

This is also available as a Docker image. Simply run docker run -p 5000:5000 -d --restart=always dakotakae/kbfs_upload to start the server listening on port 5000.

Configuration

No matter how you launch it, some configuration will be required. This can all be done with Environment Variables.

Variable Name Data Type Description Required Default
KBFSU_CHAT_TYPE str Type of chat to send notifications to. Can be private, team or silent No silent
KBFSU_CHAT_TEAM str The team that will be used to store the files. The bot must be a member of that team (not just installed) Yes, if KBFSU_CHAT_TYPE is team none
KBFSU_CHAT_TEAM_CHANNEL str The team chat channel to send notifications to. No general
KBFSU_CHAT_USER str The user to sharefiles with Yes, if KBFSU_CHAT_TYPE is private or silent Same as KEYBASE_USERNAME
KBFSU_FILER_DIR str The subdirectory path to store files in. No none
KEYBASE_USERNAME str The username to log into Keybase with Yes none
KEYBASE_PAPERKEY str The paperkey to use to log the user into Keybase Yes none

API Interaction

The API accepts POST requests to /upload/ , where type is either note or file. Both types accept form-data as the input. Both types also require the following form entries:

  • filename - The name to save the file to. This filename will be sanitized and timestamped after the fact, but is still required.
  • sender - The name of the person submitting the form.

You can also send recipient to identify the intended recipient of the file. This is an arbitrary string and does not have to be a particular Keybase username.

If type is note, the request also needs to include a body field that contains the text to be stored. If the type is file, the uploaded file must be sent with the file key.

This is all the reference needed to build your own front-end for this api.

Development/Contribution

As stated before, Poetry is used to manage the project. If there are any improvements/changes to be made, feel free to submit a PR.

Support

Owner
Dakota Brown
I am a Python developer, devops engineer for a great company, coffee lover, spouse to a great woman, and parent to two crazy offspring.
Dakota Brown
Design-by-contract in Python3 with informative violation messages and inheritance

icontract icontract provides design-by-contract to Python3 with informative violation messages and inheritance. It also gives a base for a flourishing

275 Jan 02, 2023
Render your templates using .txt files

PizzaX About Run Run tests To run the tests, open your terminal and type python tests.py (WIN) or python3 tests.py (UNX) Using the function To use the

Marcello Belanda 2 Nov 24, 2021
Python Create Your Own Tool Series

Python Create Your Own Tool Series Hey there! This is an additional Github repository that contains the final product files for each video in my Youtu

Joe Helle 21 Dec 02, 2022
Badge-Link-Creater 'For more beautiful profiles.'

Badge-Link-Creater 'For more beautiful profiles.' Ready Badges Prepares the codes of the previously prepared badges for you. Note Click here for more

Mücahit Gündüz 9 Oct 19, 2022
A Lego Mindstorm robot for dealing out cards based on a birds-eye view of a poker table and given ArUco fiducial tags.

A Lego Mindstorm robot for dealing out cards based on a birds-eye view of a poker table and given ArUco fiducial tags.

4 Dec 06, 2021
Use this function to get list of routes for particular journey

route-planner Functions api_processing Use this function to get list of routes for particular journey. Function has three parameters: Origin Destinati

2 Nov 28, 2021
Beancount Importers for DKB (Deutsche Kredit Bank) CSV Exports

Beancount DKB Importer beancount-dkb provides an Importer for converting CSV exports of DKB (Deutsche Kreditbank) account summaries to the Beancount f

Siddhant Goel 24 Aug 06, 2022
Blender Add-on That Provides Quick Access to Render Controls

Blender Render Buttons Blender Add-on That Provides Quick Access to Render Controls A Blender 3.0 compatablity update of Blender2.8x-RenderButton v0.0

Don Schnitzius 3 Oct 18, 2022
Python script to commit to your github for a perfect commit streak. This is purely for education purposes, please don't use this script to do bad stuff.

Daily-Git-Commit Commit to repo every day for the perfect commit streak Requirments pip install -r requirements.txt Setup Download this repository. Cr

JareBear 34 Dec 14, 2022
Blender 3.1 Alpha (and later) PLY importer that correctly loads point clouds (and all PLY models as point clouds)

import-ply-as-verts Blender 3.1 Alpha (and later) PLY importer that correctly loads point clouds (and all PLY models as point clouds) Latest News Mand

Michael Prostka 82 Dec 20, 2022
An open-source hyper-heuristic framework for multi-objective optimization

MOEA-HH An open-source hyper-heuristic framework for multi-objective optimization. Introduction The multi-objective optimization technique is widely u

Hengzhe Zhang 1 Feb 10, 2022
samples of neat code

NEAT-samples Some samples of code and config files for use with the NEAT-Python package These samples are largely copy and pasted, so if you

Harrison 50 Sep 28, 2022
A tool to build reproducible wheels for you Python project or for all of your dependencies

asaman: Amra Saman (আমরা সমান) This is a tool to build reproducible wheels for your Python project or for all of your dependencies. What this means is

Kushal Das 14 Aug 05, 2022
This repository contains Python Projects for Beginners as well as for Intermediate Developers built by Contributors.

Python Projects {Open Source} Introduction The repository was built with a tree-like structure in mind, it contains collections of Python Projects. Mo

Gaurav Pandey 115 Apr 30, 2022
Cross-platform .NET Core pre-commit hooks

dotnet-core-pre-commit Cross-platform .NET Core pre-commit hooks How to use Add this to your .pre-commit-config.yaml - repo: https://github.com/juan

Juan Odicio 5 Jul 20, 2021
Job Guy Backend

جاب‌گای چیست؟ اونجا وضعیت چطوریه؟ یه سوال به همین کلیت و ابهام معمولا وقتی برای یه شرکت رزومه می‌فرستیم این سوال کلی و بزرگ برای همه پیش میاد.اونجا وض

Jobguy.work 217 Dec 25, 2022
Swim between bookmarks in the Windows terminal

Marlin Swim between bookmarks in the terminal! Marlin is an easy to use bookmark manager for the terminal. Choose a folder, bookmark it and swim there

wilfredinni 7 Nov 03, 2022
Lenovo Yoga Ideapad Autocharge

Description This program uses the conservation_mode of Lonovo Ideapad / Yoga not

1 Jan 09, 2022
Python for Microscopists and other image processing enthusiasts

The YouTube channel associated with this code walks you through the entire process of learning to code in Python; all the way from basics to advanced machine learning and deep learning.

Dr. Sreenivas Bhattiprolu 2.3k Jan 01, 2023
Let's make a lot of random function from Scracth...

Pseudo-Random On a whim I asked myself the question about how randomness is integrated into an algorithm? So I started the adventure by trying to code

Yacine 2 Jan 19, 2022