The rough idea:
- human friendly starting point: dedicate domain (for humans) and have it DNSLink-ed to a IPFS key
- IPFS key is used for publishing IPNS
- optionally: share the key in secure manner with publishers (or just have one publisher or automate it)
- Hint: in case of key being compromised, just generate a new key, and update domain DNSLink to point to the new key, republish repository with new key
- trust is established very similarly as in Maven Central: domain tells you (via DNSLink) which IPNS you need to resolve to get to the latest CID (repository root).
- repo is usable with Maven via plain HTTP transport as well fx
https://ipfs.io/ipns/maven.ipfs.io[/subpath] but we should discourage misuse of public gateways and herd users toward running local IPFS nodes instead.
The setup would look like DNS domain (via DNSlink) -> IPNS -> CID and is a double indirection.
Repository would be usable from Maven repository URL as fx ipfs:/maven.ipfs.io (maybe some subpath like ipfs:/maven.ipfs.io/releases. Given Maven release artifacts are immutable, repo leaves are usually unchanged, it is merely the merkle tree root that changes, as repository "grow". Publishers, consumers and interested parties would keep repository pinned in their nodes (see below, would happen automatically).
Consumers just need to add extension, declare IPFS repository in env/POM and consume artifacts "as usual".
Publishers just need to add extension, have the publishing private key added in their IPFS node, and would deploy as usual (just by invoking mvn deploy while running an IPFS node).
Requirements for consumers and publishers:
- added extension
- both consumers and publishers should run IPFS node locally (even a IPFS Desktop).
(Behind the scenes) Workflow for consumers (assume repository URL is ipfs:/maven.ipfs.io):
name resolve maven.ipfs.io (to make sure you are up to date)
pin add $CID pin resolved CID to local node
files cp /ipfs/$CID /somewhere (exposes $CID via UnixFS)
- consume GAVs via UnixFS
For publishers:
- same as for consumers
- deploy files to repository structure
files write... and update/maintain metadata via UnixFS
- publish new CID with $KEY on Maven session end
Ideally, publisher has to have private $KEY in IPFS Node named as $NAME, for example:
$ ipfs key list
self
ipfs.maveniverse.eu <- key used to publish ipfs.maveniverse.eu domain linked with this key
$
This story above is implemented in https://github.com/maveniverse/ipfs
The extension adds:
This story above is exactly how https://ipfs.maveniverse.eu/ domain is implemented. Content is backed by two 24/7 running IPFS geographically distant nodes (but is still slow 😞 ).
The rough idea:
https://ipfs.io/ipns/maven.ipfs.io[/subpath]but we should discourage misuse of public gateways and herd users toward running local IPFS nodes instead.The setup would look like
DNS domain (via DNSlink) -> IPNS -> CIDand is a double indirection.Repository would be usable from Maven repository URL as fx
ipfs:/maven.ipfs.io(maybe some subpath likeipfs:/maven.ipfs.io/releases. Given Maven release artifacts are immutable, repo leaves are usually unchanged, it is merely the merkle tree root that changes, as repository "grow". Publishers, consumers and interested parties would keep repository pinned in their nodes (see below, would happen automatically).Consumers just need to add extension, declare IPFS repository in env/POM and consume artifacts "as usual".
Publishers just need to add extension, have the publishing private key added in their IPFS node, and would deploy as usual (just by invoking
mvn deploywhile running an IPFS node).Requirements for consumers and publishers:
(Behind the scenes) Workflow for consumers (assume repository URL is
ipfs:/maven.ipfs.io):name resolve maven.ipfs.io(to make sure you are up to date)pin add $CIDpin resolved CID to local nodefiles cp /ipfs/$CID /somewhere(exposes $CID via UnixFS)For publishers:
files write...and update/maintain metadata via UnixFSIdeally, publisher has to have private $KEY in IPFS Node named as $NAME, for example:
This story above is implemented in https://github.com/maveniverse/ipfs
The extension adds:
ipfs:/name[/subpath]wherenameis CID, or any "resolvable" string like IPNS or DNSlinked domain, example https://ipfs.maveniverse.eu/)This story above is exactly how https://ipfs.maveniverse.eu/ domain is implemented. Content is backed by two 24/7 running IPFS geographically distant nodes (but is still slow 😞 ).