browserpolicy

package
v0.1.59 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContractID = "openlinker.browser.v2"
	Restricted = "restricted"
	Full       = "full"
	MaxOrigins = 32
)

Variables

View Source
var ErrInvalid = errors.New("browser interaction policy is invalid")

Functions

func Canonicalize

func Canonicalize(policy string, origins []string) ([]string, string, error)

Canonicalize returns the exact sorted origin list and the lowercase SHA-256 of its compact JSON encoding. It deliberately does not resolve DNS; public address and rebinding enforcement remains the Egress Gateway's boundary.

func ValidateCanonical

func ValidateCanonical(policy string, origins []string) (string, error)

ValidateCanonical rejects semantically equivalent but non-canonical wire lists. This keeps the stored list, authority envelope and lease digest byte-stable instead of accepting multiple encodings of the same scope.

Types

This section is empty.

Jump to

Keyboard shortcuts

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