Giter VIP home page Giter VIP logo

pkid's Introduction

PKID

Concept

PKID is a public Key Indexed Datastore. You can save plain or encrypted data in a public key index; as long as you are the owner of the secret corresponding to that public key.

Routes

Document storage

Set document

PUT /v1/documents/{pk}/{key}

Set the value of a document corresponding to {key} indexed by the public key {pk}. This is only possible when sending following header; signed by the secret key corresponding to {pk}.

pk is hex encoded; request data is a base64 encoded and signed; header is base64 encoded and signed;

{ 'intent' : 'pkid.store', timestamp: 'epochtime'}

Get document

GET /v1/documents/{pk}/{key}

pk is hex encoded; response data is base64 encoded;

Get the value of a document corresponding to {key} indexed by the public key {pk}. There is no requirement for a security header

Run in dev mode

To run the backend in devmode simply execute following command

bin/dev.sh

or

docker-compose build
docker-compose up

Using PKID in combination with the Threefold Connect app - derived key scope

You can let the user login using TF-Connect on your own 3rd party app, get a unique key (unique for the user and your application) and use that to write data to PKID.

Flow:

1. Make the user log in using TF-Connect

Use the example to find out how to make the user log in and get a derived seed. URL for staging: https://example.staging.jimber.org/ (use 'Authenticate & get emailaddress and derived seed.' button) URL of example code repository: https://github.com/threefoldtech/threefold_connect/tree/master/example

2. Get the key from the scope

See callback.js @ https://github.com/threefoldtech/threefold_connect/blob/master/example/src/views/callback/callback.js

3. Write data to PKID

Get the derived seed from the decrypted data in step 2, use the "Set document" section to write to PKID.

pkid's People

Contributors

ldruwel avatar maximledaine avatar lennertdefauw1 avatar mathiasdeweerdt avatar jdelrue avatar ahmedhanafy725 avatar hossnys avatar xmonader avatar

Stargazers

Mark avatar Mik avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.