Help us shape the future of Go! Take the 2026 Go Developer Survey

trust

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package trust verifies external OIDC tokens and evaluates compiled trust bindings.

Index

Constants

View Source
const (
	// MaxJWTBytes is the shared maximum compact external JWT size.
	MaxJWTBytes = 64 << 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	BindingID string
	Match     bool
	Reason    string
}

Diagnostic records a bounded, token-free binding evaluation result.

type Result

type Result struct {
	IssuerID, Issuer, UpstreamSubject string
	Claims                            map[string]any
	Binding                           *config.EffectiveTrustBinding
	Diagnostics                       []Diagnostic
}

Result contains verified provenance and the exactly matched binding.

type Service

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

Service performs external verification and policy evaluation.

func NewService

func NewService(cfg *config.Config, resolver policyResolver) *Service

NewService constructs a verifier with bounded HTTP behavior.

func (*Service) VerifyAndEvaluate

func (s *Service) VerifyAndEvaluate(ctx context.Context, raw, clientID string) (*Result, error)

VerifyAndEvaluate runs the complete production verification and exactly-one evaluator.

Jump to

Keyboard shortcuts

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