commit abe1a6f6d4473f09f5715c1eac9e7192f1bb1cac Author: kalipso Date: Wed Jul 31 16:16:48 2024 +0200 init diff --git a/README.md b/README.md new file mode 100644 index 0000000..78bb6d4 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Currently all i do is brainstorm + +![img](./layout.svg) diff --git a/layout.d2 b/layout.d2 new file mode 100644 index 0000000..6ebd231 --- /dev/null +++ b/layout.d2 @@ -0,0 +1,119 @@ +ppassctl + +ppassctl.Commands: { + shape: class + + init + ls + grep + find + show + insert + edit + generate + rm + mv + cp + git + help + version +} + +ppassctl -- ppassd: control via unix socket + +ppassd +ppassd.Host: { + shape: class + + PeerId: "libp2p.ID" + PublicKey: "libp2p.PubKey" + PrivateKey: "libp2p.PrivKey" +} + +ppassd.Config: { + shape: class + + +VaultCfgs: "[]VaultCfg" +} + +ppassd.VaultCfg { + shape: class + + peers: "[]Peer" + VaultId: "string" #PubSub Topic +} + +ppassd.Peer { + shape: class + + PeerId: "libp2p.ID" + PublicKey: "string" +} + +ppassd.Vault: { + shape: class + + Id: "string" + Keys: "[]Peer.PublicKey" + + Add(p Password): "error" + Get(k string): "(Password, error)" + Modify(p Password): "error" + Remove(k string): "(bool, error)" + Exists(k string): "(bool)" + OnUpdate(handler func()): "error" + + ctx: "context.Context" + ps: "*pubsub.PubSub" + topic: "*pubsub.Topic" + sub: "*pubsub.Subscription" +} + +ppassd.PasswordStore: { + shape: class + + Init(): "error" + Add(p Password): "error" + Get(k string): "(Password, error)" + Modify(p Password): "error" + Remove(k string): "(bool, error)" + Exists(k string): "(bool)" + + NewVault(id string): "(Vault, error)" + + Cfg: "Config" + Vaults: "[]Vaults" + Passwords: "[]Password" + Secrets: "[]GnuPGKey" + host: "Host" +} + +ppassd.Password: { + shape: class + + Key: "string" + Password: "string" + Vaults: "[]*Vault" +} + +ppassd.PasswordStore -> PPassd.Host +ppassd.PasswordStore -> PPassd.Config +ppassd.Config -> PPassd.VaultCfg +ppassd.VaultCfg -> PPassd.Peer +ppassd.PasswordStore -> PPassd.Vault +ppassd.PasswordStore -> PPassd.Password: Load on Init() + +Thoughts +Thoughts.explanation: |md + # Architecture + - The host is a libp2p node. It connects with Peers of the given VaultCfgs. + - The Vaults itself a basically pubsub topics that each hosts subscribes and publishes to. + - Vaults internally are just abstractions of the PasswordStore + - they are like a "view" onto certain passwords + - there they can modify, add, delete passwords too + - if a password is in multiple vaults, it should be updated too + - hosts do not have to be able to decrypt stored passwords + - for example it would be nice to have a dummy node that is always online, storing passwords + - but not able to decrypt them + +| diff --git a/layout.svg b/layout.svg new file mode 100644 index 0000000..57a402e --- /dev/null +++ b/layout.svg @@ -0,0 +1,872 @@ +ppassctlppassdThoughtsCommands+init+ls+grep+find+show+insert+edit+generate+rm+mv+cp+git+help+versionHost+PeerIdlibp2p.ID+PublicKeylibp2p.PubKey+PrivateKeylibp2p.PrivKeyConfig+VaultCfgs[]VaultCfgVaultCfg+peers[]Peer+VaultIdstringPeer+PeerIdlibp2p.ID+PublicKeystringVault+Idstring+Keys[]Peer.PublicKey+ctxcontext.Context+ps*pubsub.PubSub+topic*pubsub.Topic+sub*pubsub.Subscription+Add(p Password)error+Get(k string)(Password, error)+Modify(p Password)error+Remove(k string)(bool, error)+Exists(k string)(bool)+OnUpdate(handler func())errorPasswordStore+CfgConfig+Vaults[]Vaults+Passwords[]Password+Secrets[]GnuPGKey+hostHost+Init()error+Add(p Password)error+Get(k string)(Password, error)+Modify(p Password)error+Remove(k string)(bool, error)+Exists(k string)(bool)+NewVault(id string)(Vault, error)Password+Keystring+Passwordstring+Vaults[]*Vault

Architecture

+
    +
  • The host is a libp2p node. It connects with Peers of the given VaultCfgs.
  • +
  • The Vaults itself a basically pubsub topics that each hosts subscribes and publishes to.
  • +
  • Vaults internally are just abstractions of the PasswordStore +
      +
    • they are like a "view" onto certain passwords
    • +
    • there they can modify, add, delete passwords too
    • +
    • if a password is in multiple vaults, it should be updated too
    • +
    +
  • +
  • hosts do not have to be able to decrypt stored passwords +
      +
    • for example it would be nice to have a dummy node that is always online, storing passwords
    • +
    • but not able to decrypt them
    • +
    +
  • +
+
control via unix socket Load on Init() + + + + + + + +