authcontract

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaVersion     = "vango.auth.tenancy.v1.0"
	ArtifactKind      = "vango_auth_tenancy_contract"
	DefaultOutputPath = ".vango/auth/vango_auth_tenancy_contract.json"
)

Variables

This section is empty.

Functions

func MarshalDeterministic

func MarshalDeterministic(c *Contract) ([]byte, error)

func Write

func Write(path string, c *Contract) error

Types

type AccountLifecycle

type AccountLifecycle struct {
	DeleteRouteID string              `json:"delete_route_id,omitempty"`
	ExportRouteID string              `json:"export_route_id,omitempty"`
	Status        string              `json:"status"`
	ProofLevel    artifact.ProofLevel `json:"proof_level"`
}

type BuildOptions

type BuildOptions struct {
	ProjectRoot   string
	Name          string
	Module        string
	AppVersion    string
	ToolVersion   string
	Commit        string
	OutputPath    string
	RouteContract *routecontract.Contract
	EnvContract   *envcontract.Contract
}

type Contract

type Contract struct {
	SchemaVersion      string                          `json:"schema_version"`
	ArtifactID         string                          `json:"artifact_id"`
	ArtifactKind       string                          `json:"artifact_kind"`
	Producer           artifact.Producer               `json:"producer"`
	App                artifact.App                    `json:"app"`
	Analysis           artifact.Analysis               `json:"analysis"`
	ProviderProfiles   []artifact.ProfileFact          `json:"provider_profiles"`
	Providers          []Provider                      `json:"providers"`
	Policies           []Policy                        `json:"policies"`
	TenantModel        TenantModel                     `json:"tenant_model"`
	RouteAuth          []RouteAuth                     `json:"route_auth"`
	WebhookTrust       []WebhookTrust                  `json:"webhook_trust"`
	NativeHandoffs     []NativeHandoff                 `json:"native_handoffs"`
	AccountLifecycle   AccountLifecycle                `json:"account_lifecycle"`
	ControlProfiles    []artifact.ProfileFact          `json:"control_profiles"`
	OperationReadiness []artifact.OperationReadiness   `json:"operation_readiness"`
	Inputs             []artifact.ArtifactRef          `json:"inputs"`
	Outputs            []artifact.ArtifactRef          `json:"outputs"`
	References         map[string]artifact.ArtifactRef `json:"references"`
	Diagnostics        []artifact.Diagnostic           `json:"diagnostics"`
}

func Build

func Build(opts BuildOptions) (*Contract, error)

type NativeHandoff

type NativeHandoff struct {
	ID         string              `json:"id"`
	Kind       string              `json:"kind"`
	Status     string              `json:"status"`
	ProofLevel artifact.ProofLevel `json:"proof_level"`
}

type Policy

type Policy struct {
	ID          string              `json:"id"`
	Kind        string              `json:"kind"`
	Requirement string              `json:"requirement"`
	ProofLevel  artifact.ProofLevel `json:"proof_level"`
}

type Provider

type Provider struct {
	ID                  string              `json:"id"`
	Kind                string              `json:"kind"`
	DisplayName         string              `json:"display_name"`
	Origin              artifact.Origin     `json:"origin"`
	ProofLevel          artifact.ProofLevel `json:"proof_level"`
	RequiredEnv         []string            `json:"required_env"`
	CallbackRoutes      []string            `json:"callback_routes"`
	LogoutRoutes        []string            `json:"logout_routes"`
	WebhookRoutes       []string            `json:"webhook_routes"`
	SessionBridge       SessionBridge       `json:"session_bridge"`
	HostBindingRequired bool                `json:"host_binding_required"`
}

type RouteAuth

type RouteAuth struct {
	RouteID           string              `json:"route_id"`
	PolicyID          string              `json:"policy_id,omitempty"`
	Requirement       string              `json:"requirement"`
	Freshness         string              `json:"freshness"`
	TenantScope       string              `json:"tenant_scope"`
	ProofLevel        artifact.ProofLevel `json:"proof_level"`
	DataClasses       []string            `json:"data_classes"`
	ManualReviewFacts []string            `json:"manual_review_facts"`
}

type SessionBridge

type SessionBridge struct {
	HTTPIdentityRequired bool   `json:"http_identity_required"`
	OnSessionStart       string `json:"on_session_start"`
	OnSessionResume      string `json:"on_session_resume"`
	PeriodicRevalidation string `json:"periodic_revalidation"`
}

type TenantModel

type TenantModel struct {
	Mode                        string              `json:"mode"`
	TenantIDType                string              `json:"tenant_id_type,omitempty"`
	Source                      string              `json:"source"`
	Claim                       string              `json:"claim,omitempty"`
	RouteParam                  string              `json:"route_param,omitempty"`
	DBScopeRequired             bool                `json:"db_scope_required"`
	StorageScopeRequired        bool                `json:"storage_scope_required"`
	RuntimeServiceScopeRequired bool                `json:"runtime_service_scope_required"`
	ProofLevel                  artifact.ProofLevel `json:"proof_level"`
}

type ValidationOptions

type ValidationOptions struct {
	ProjectRoot      string
	RequireArtifacts bool
}

type ValidationResult

type ValidationResult struct {
	Valid       bool                  `json:"valid"`
	Diagnostics []artifact.Diagnostic `json:"diagnostics"`
}

func Validate

func Validate(c *Contract, opts ValidationOptions) ValidationResult

type WebhookTrust

type WebhookTrust struct {
	ID                  string              `json:"id"`
	RouteID             string              `json:"route_id"`
	ProviderProfile     string              `json:"provider_profile,omitempty"`
	SignatureRequired   bool                `json:"signature_required"`
	SignatureStatus     string              `json:"signature_status"`
	FreshnessRequired   bool                `json:"freshness_required"`
	IdempotencyRequired bool                `json:"idempotency_required"`
	ProofLevel          artifact.ProofLevel `json:"proof_level"`
}

Jump to

Keyboard shortcuts

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