signingprofile

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package signingprofile is the sole bridge from validated datasource results to signing profiles.

An adapter resolves one self-contained datasource result, validates its exact identity and eligibility, and maps every provider-neutral key-handle ID through an immutable registry to an existing inert signing handle. The bridge does not invoke a signer, perform DNS lookup, authorize routes, or weaken any signing invariant. Missing, inconsistent, inactive, or unauthorized bindings fail closed without returning a partial profile.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter resolves one datasource selection into a complete signing profile.

func NewAdapter

func NewAdapter(
	provider datasource.Provider,
	registry Registry,
	signingLimits signing.Limits,
) (Adapter, error)

NewAdapter constructs one immutable datasource-to-signing bridge.

func (Adapter) Format

func (a Adapter) Format(state fmt.State, _ rune)

Format prevents formatting verbs from exposing adapter dependencies.

func (Adapter) GoString

func (a Adapter) GoString() string

GoString returns a constant protected adapter representation.

func (Adapter) MarshalJSON

func (a Adapter) MarshalJSON() ([]byte, error)

MarshalJSON emits an empty object without provider or registry facts.

func (Adapter) ResolvePolicy

func (a Adapter) ResolvePolicy(
	ctx context.Context,
	tenant datasource.TenantID,
	domain string,
	use datasource.ProfileUse,
	evaluationTime time.Time,
) (profile signing.Profile, resultErr error)

ResolvePolicy resolves and projects one exact administrative policy selection.

func (Adapter) ResolveProfile

func (a Adapter) ResolveProfile(
	ctx context.Context,
	profileID datasource.ProfileID,
	use datasource.ProfileUse,
	evaluationTime time.Time,
) (profile signing.Profile, resultErr error)

ResolveProfile resolves and projects one exact profile selection.

func (Adapter) String

func (a Adapter) String() string

String returns a constant protected adapter summary.

func (Adapter) Valid

func (a Adapter) Valid() bool

Valid reports whether the adapter retains complete immutable dependencies.

type Binding

type Binding struct {
	// contains filtered or unexported fields
}

Binding carries one exact administrative key declaration into the sole bridge.

func NewBinding

func NewBinding(
	tenant string,
	domain string,
	useText string,
	handleID string,
	handle signing.PrivateKeyHandle,
	algorithmText string,
	publicDigest [sha256.Size]byte,
) (Binding, error)

NewBinding validates one exact provider-neutral key declaration.

func (Binding) Format

func (Binding) Format(state fmt.State, _ rune)

Format prevents formatting verbs from traversing binding state.

func (Binding) GoString

func (Binding) GoString() string

GoString returns a constant protected binding representation.

func (Binding) MarshalJSON

func (Binding) MarshalJSON() ([]byte, error)

MarshalJSON emits an empty object without selection or key facts.

func (Binding) String

func (Binding) String() string

String returns a constant protected binding summary.

func (Binding) Valid

func (b Binding) Valid() bool

Valid reports whether the binding owns one complete protected projection.

type Entry

type Entry struct {
	// contains filtered or unexported fields
}

Entry binds one exact datasource credential to one inert private-key handle.

func NewEntry

func NewEntry(
	profile datasource.Profile,
	handleID datasource.KeyHandleID,
	handle signing.PrivateKeyHandle,
	allowedUses []datasource.ProfileUse,
	limits datasource.Limits,
) (Entry, error)

NewEntry validates one exact immutable handle-registry binding.

func (Entry) AllowedUses

func (e Entry) AllowedUses() []datasource.ProfileUse

AllowedUses returns the detached canonical administrative use set.

func (Entry) Format

func (e Entry) Format(state fmt.State, _ rune)

Format prevents formatting verbs from exposing registry facts.

func (Entry) GoString

func (e Entry) GoString() string

GoString returns a constant protected registry-entry representation.

func (Entry) KeyHandleID

func (e Entry) KeyHandleID() datasource.KeyHandleID

KeyHandleID returns the exact provider-neutral registry key.

func (Entry) String

func (e Entry) String() string

String returns a constant protected registry-entry summary.

func (Entry) Valid

func (e Entry) Valid() bool

Valid reports whether the entry remains internally complete.

func (Entry) ValidForLimits

func (e Entry) ValidForLimits(limits datasource.Limits) bool

ValidForLimits reports whether the entry satisfies one narrowed datasource contract.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry is one immutable exact KeyHandleID-to-signing-handle map.

func NewRegistry

func NewRegistry(entries []Entry, limits datasource.Limits) (Registry, error)

NewRegistry validates and detaches one immutable exact registry.

func (Registry) Format

func (r Registry) Format(state fmt.State, _ rune)

Format prevents formatting verbs from exposing registry facts.

func (Registry) GoString

func (r Registry) GoString() string

GoString returns a constant protected registry representation.

func (Registry) ProjectPolicy

func (r Registry) ProjectPolicy(
	result datasource.ResolvedPolicy,
	request datasource.PolicyRequest,
	limits signing.Limits,
) (signing.Profile, error)

ProjectPolicy converts one exact eligible resolved policy without provider or signer calls.

func (Registry) ProjectProfile

func (r Registry) ProjectProfile(
	result datasource.ResolvedProfile,
	request datasource.ProfileRequest,
	limits signing.Limits,
) (signing.Profile, error)

ProjectProfile converts one exact resolved profile without resolving a provider or invoking a signer.

func (Registry) String

func (r Registry) String() string

String returns a constant protected registry summary.

func (Registry) Valid

func (r Registry) Valid() bool

Valid reports whether the registry remains complete and exact.

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver owns one provider-neutral generation and its exact signing projection registry.

func NewResolver

func NewResolver(
	provider datasource.InspectionProvider,
	bindings []Binding,
	at time.Time,
) (*Resolver, error)

NewResolver validates every immutable binding, including inactive policies, without granting signing authority. Runtime projection still checks status, rollout, and validity for each message.

func (*Resolver) Close

func (r *Resolver) Close(ctx context.Context) error

Close releases the confined datasource descriptor exactly once.

func (*Resolver) ResolvePolicy

func (r *Resolver) ResolvePolicy(
	ctx context.Context,
	tenant string,
	domain string,
	useText string,
	at time.Time,
) (signing.Profile, error)

ResolvePolicy returns one internal signing profile from the sole adapter.

Jump to

Keyboard shortcuts

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