edgeauth

package
v1.15.21 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package edgeauth authenticates Cloudflare edge-subscribe Workers. It is kept separate from user and admin authentication so an edge credential cannot be used against any other PPanel API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateManifestRequest

func AuthenticateManifestRequest(authorization, token, requestID string, cfg config.EdgeSubscribeConfig, now time.Time) (string, bool)

AuthenticateManifestRequest checks the HMAC format emitted by edge-subscribe. The signed bytes are: v2\nGET\n/api/edge/v1/manifest\nSHA256(token)\nUnixTimestamp\nSHA256(requestID). The returned key ID is safe to use as a replay-cache partition key.

func ClaimManifestRequest

func ClaimManifestRequest(ctx context.Context, client redis.Cmdable, kid, requestID string, cfg config.EdgeSubscribeConfig) (bool, error)

ClaimManifestRequest records a valid request ID for the entire time window in which its signature could be accepted. A replay is rejected. Redis errors are returned to the caller so the endpoint can fail closed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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