{"id":27185052,"url":"https://github.com/threefoldtech/tfconnect_pkid","last_synced_at":"2025-07-11T16:41:45.292Z","repository":{"id":50186365,"uuid":"204716742","full_name":"threefoldtech/tfconnect_pkid","owner":"threefoldtech","description":"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.","archived":false,"fork":false,"pushed_at":"2024-05-26T14:56:19.000Z","size":81,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T17:10:33.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/threefoldtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-27T14:06:50.000Z","updated_at":"2024-05-26T14:55:27.000Z","dependencies_parsed_at":"2025-04-09T17:10:22.490Z","dependency_job_id":"29eff202-c7c0-4708-a846-c000b371dea0","html_url":"https://github.com/threefoldtech/tfconnect_pkid","commit_stats":null,"previous_names":["threefoldtech/tfconnect_pkid","threefoldtech/pkid"],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/threefoldtech/tfconnect_pkid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Ftfconnect_pkid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Ftfconnect_pkid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Ftfconnect_pkid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Ftfconnect_pkid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threefoldtech","download_url":"https://codeload.github.com/threefoldtech/tfconnect_pkid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2Ftfconnect_pkid/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264854259,"owners_count":23673814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T17:10:16.363Z","updated_at":"2025-07-11T16:41:45.273Z","avatar_url":"https://github.com/threefoldtech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PKID\n\n## Concept\nPKID 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.\n\n\n# Routes\n\n## Document storage\n### Set document\n\n```\nPUT /v1/documents/{pk}/{key}\n```\nSet 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}.\n\npk is hex encoded;\nrequest data is a base64 encoded and signed;\nheader is base64 encoded and signed;\n\n```\n{ 'intent' : 'pkid.store', timestamp: 'epochtime'}\n```\n\n### Get document\n\n```\nGET /v1/documents/{pk}/{key}\n```\npk is hex encoded;\nresponse data is base64 encoded;\n\nGet the value of a document corresponding to {key} indexed by the public key {pk}. There is no requirement for a security header\n\n# Run in dev mode\n\nTo run the backend in devmode simply execute following command\n\n```\nbin/dev.sh\n```\nor\n```\ndocker-compose build\ndocker-compose up\n```\n\n\n# Using PKID in combination with the Threefold Connect app - derived key scope\n\nYou 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.\n\nFlow:\n## 1. Make the user log in using TF-Connect \nUse the example to find out how to make the user log in and get a derived seed. \nURL for staging: https://example.staging.jimber.org/ (use 'Authenticate \u0026 get emailaddress and derived seed.' button)\nURL of example code repository: https://github.com/threefoldtech/threefold_connect/tree/master/example\n         \n## 2. Get the key from the scope\nSee callback.js @ https://github.com/threefoldtech/threefold_connect/blob/master/example/src/views/callback/callback.js\n\n## 3. Write data to PKID\nGet the derived seed from the decrypted data in step 2, use the \"Set document\" section to write to PKID.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreefoldtech%2Ftfconnect_pkid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreefoldtech%2Ftfconnect_pkid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreefoldtech%2Ftfconnect_pkid/lists"}