policyhttp

package
v4.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

Package policyhttp adapts the Policy management HTTP contract to DecisionService.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectTLSTransportEvidence

type DirectTLSTransportEvidence struct{}

DirectTLSTransportEvidence accepts only verified direct TLS by default. Deployments terminating TLS at a proxy must inject their shared trusted-proxy resolver.

func (DirectTLSTransportEvidence) Protected

func (DirectTLSTransportEvidence) Protected(ctx *gin.Context) bool

Protected reports whether the request arrived through direct verified TLS.

type Handler

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

Handler adapts strict HTTP requests to the admission-enforcing DecisionService.

func New

New constructs the Policy HTTP adapter. A nil service remains fail-closed as 503.

func (*Handler) Register

func (h *Handler) Register(group *gin.RouterGroup)

Register mounts only the unary Policy endpoint and its unconditional no-store response policy.

type TransportEvidence

type TransportEvidence interface {
	Protected(*gin.Context) bool
}

TransportEvidence resolves protected transport from server-observed HTTP evidence. It is intentionally separate from credential extraction and DecisionService admission.

type TrustedProxyTransportEvidence

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

TrustedProxyTransportEvidence applies the shared Policy transport predicate to direct and proxy-terminated HTTP.

func NewTrustedProxyTransportEvidence

func NewTrustedProxyTransportEvidence(entries []string) TrustedProxyTransportEvidence

NewTrustedProxyTransportEvidence compiles trusted immediate-peer CIDRs for HTTP transport classification.

func (TrustedProxyTransportEvidence) Protected

func (e TrustedProxyTransportEvidence) Protected(ctx *gin.Context) bool

Protected preserves the shared direct-TLS or trusted-immediate-proxy HTTPS predicate.

Jump to

Keyboard shortcuts

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