0

how to implement user model without 3d-party services or ipns?

1 Answers1

0

what to use for user identity?

  • peer-id and private-key
  • specifically - of ipfs node - a config json file that node generates
  • running ipfs init /path/to/config allows to create same node with identity
  • it is simple - no need for DIDs - it works as SSH keys

ownership

  • program starts with discovery - users need to be able to discover dbs, like we can discover repos on github
  • program creates a public orbitdb database anyone can write to
  • users publish the dbs they want others to see to that list
  • and - when the write they also write name of db
  • if same name - how do we now that this db is actually from owner we expect? by peer-id
  • every message on pubsub - and also orbidb write entries - have peer-id of who posted them
  • so program shows name of db and peer-id of author - this way we know that that record in discovery db is exactly from that peer
  • and - as long as config file with peer-id and private-key is not lost - that person owns that identity

how to add/revoke writes in orbitdb without re-creating new db with new id? without 3d party services or ipns?

  • this is brilliant
  • an owner - always an owner - wants to give/take permissions
  • once owner creates db, program also creates a access-cotrol database - a list simply - with write permissions only to owner
  • other peers clone owner's db - and program also clones access-control db
  • program implements custom access-controller that reads from access-controller db and checks - is peer listed there? then they can write
  • no third party anything needed - all is already done within orbitdb
  • and that access controller list already decentralized and persistent and replicatable

is orbitdb id needed? is orbitb/keystore needed?

  • no
  • if program were to use ObritDBAccessController - where permissions are give by orbitdb id - then yes
  • but it is useless - we can add or revoke
  • and - as said above - the better solution is access-controll-peer-id-list-db that comes with each database
  • and for that - custom access-controller is needed
  • and since we have that - why would we make it use orbitdb identity when peer-id is much better - it is the identity of user, that they can persist and backup and they init ipfs from again
  • one identity - ipfs node config json file with peer-id and private-key
  • and - the access-controller-db's id can be written as the first record into the actual db it belongs to - this way that id it always readable from database itself – Sergei-Udris May 30 '22 at 12:56
  • and - since orbitdb has key-value store - we can use that with Arthur-Dent - who is datahike on nodejs - to actually read and write to datalog db and have that be replicated - no need for two in parallel - orbitdb as decentralized key-value store, Arthur-Dent as the sane db – Sergei-Udris May 30 '22 at 13:04
  • Arthur-Dent - datahike on nodejs - now has orbitdb backend as alternative to indexeddb - https://github.com/move-me-to-ipfs-shipyard/Fennec/blob/ae7eb4ffcaed2ab93648d34a5e1a0a27f6484e40/src/Fennec/beans.cljs#L49 - https://github.com/move-me-to-ipfs-shipyard/Arthur-Dent/blob/8e6087a58895c23424e89da46a7a8e61c1318dc3/konserve/src/konserve/orbitdb.cljs – Sergei-Udris May 31 '22 at 09:36