pop

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package pop holds the proof-of-possession primitives shared by the agent (signer) and the management server (verifier) for ADR 0004 #75 polls.

The canonical string is signed by the agent's Ed25519 signing key and transported in the X-Nebula-Signature header alongside the fingerprint, timestamp, and nonce. The format is intentionally rigid — four "\n" separators between five trusted server-shaped fields — so a single implementation works for sign and verify and a golden test can pin it.

Index

Constants

View Source
const (
	HeaderFingerprint = "X-Nebula-Fingerprint"
	HeaderTimestamp   = "X-Nebula-Timestamp"
	HeaderNonce       = "X-Nebula-Nonce"
	HeaderSignature   = "X-Nebula-Signature"
)

Header names used in the signed-poll protocol (ADR 0004 §7.1).

Variables

This section is empty.

Functions

func CanonicalString

func CanonicalString(method, path, host, timestamp, nonce string) string

CanonicalString returns the bytes that the agent signs and the server verifies for every poll request. Format:

METHOD\nPATH\nHOST_HEADER\nTIMESTAMP\nNONCE

All inputs are caller-trusted: METHOD and PATH come from the chi router, HOST_HEADER from the Host header, and TIMESTAMP / NONCE from the request headers (already syntactically validated by the verifier before this is computed on the server side).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL