Documentation
¶
Overview ¶
Package pointer is how a worker or connector finds its harness from the key its token carries. pointer.mainplane.ai maps the key to the harness's current URL, signed by the key. Neither the pointer nor the URL is trusted: the harness at the URL proves the key before any secret goes there.
PUT pointer.mainplane.ai/<key> {url, seq, sig} sig over "<key> <url> <seq>"
GET <url>/id?nonce=<n> {url, sig, sig over "id <url> <n>"
noise} noise over "noise <coordinator's Noise key>"
Index ¶
- func Encode(k ed25519.PrivateKey) string
- func Find(ctx context.Context, key, cached string) (string, error)
- func ID(k ed25519.PrivateKey, url func() string, noise string) http.Handler
- func Key(file string) (ed25519.PrivateKey, error)
- func Prove(ctx context.Context, key, url string) error
- func ProveNoise(ctx context.Context, key, url, noise string) error
- func Publish(ctx context.Context, k ed25519.PrivateKey, url string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
func Encode(k ed25519.PrivateKey) string
Encode is k's public half as tokens and the pointer carry it.
func Find ¶
Find is where the harness with key is: cached, when it proves the key there, else the URL on the pointer, once it proves the key there.
func ID ¶
ID answers a proof for the harness with k, now reached at url(), whose coordinator has the Noise key noise.
func Key ¶
func Key(file string) (ed25519.PrivateKey, error)
Key is the harness key kept in file, made there the first time. Only its owner may read it: whoever has it can move the harness's workers.
func Prove ¶
Prove is nil when the harness at url holds key. It signs a fresh nonce with the URL it knows itself by, which must be url: a host that relays another harness's answer fails.
func ProveNoise ¶ added in v0.3.0
ProveNoise is nil when the harness at url holds key and vouches for noise as its coordinator's Noise key.
Types ¶
This section is empty.