agentauth

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package agentauth defines the byte-exact wire format used by the gRPC agent authentication handshake. Both the agent (signer) and the agent server (verifier) depend on this package to guarantee they agree on the payload structure — touch one side without the other and the handshake stops working.

Index

Constants

View Source
const SignPayloadSize = 56

SignPayloadSize is the fixed length of the agent auth signing payload. nonce(32) || agent_uuid_bytes(16) || timestamp_be64(8) = 56 bytes.

Variables

View Source
var ErrInvalidUUID = errors.New("invalid uuid: expected 32 hex chars after stripping dashes")

ErrInvalidUUID is returned when a UUID-like string cannot be decoded to 16 bytes.

Functions

func BuildSignPayload

func BuildSignPayload(nonce []byte, agentID string, ts int64) ([]byte, error)

BuildSignPayload constructs the byte-exact payload that the agent signs and the server verifies during the Push stream auth handshake. Layout: nonce(32) || uuid_bytes(16) || timestamp_be64(8).

func UUIDToBytes

func UUIDToBytes(s string) ([]byte, error)

UUIDToBytes decodes a UUID-like hex string (with or without dashes) into 16 raw bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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