sessionapi

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package sessionapi owns runtime-to-platform session management and the separate, server-scoped gateway read audience.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Store        Store
	Token        string
	Authenticate func(context.Context, string) (sessionstate.Server, error)
}

func (Handler) Gateway

func (h Handler) Gateway() http.Handler

Gateway returns a mux used exclusively on the dedicated gateway port.

func (Handler) RegisterAccess

func (h Handler) RegisterAccess(mux *http.ServeMux)

RegisterAccess mounts only on the control-plane listener. Tenant tokens are never accepted here, and the internal shared token is never accepted by Gateway.

type KubernetesIdentity

type KubernetesIdentity struct{ Client client.Client }

func NewKubernetesIdentity

func NewKubernetesIdentity() (*KubernetesIdentity, error)

func (KubernetesIdentity) Authenticate

func (k KubernetesIdentity) Authenticate(ctx context.Context, token string) (sessionstate.Server, error)

Authenticate verifies the audience and live Pod binding, then follows UID checked controller references. A tenant's shared service-account username or caller-supplied server label is insufficient to select a server.

func (KubernetesIdentity) AuthenticateAudience

func (k KubernetesIdentity) AuthenticateAudience(ctx context.Context, token, audience string) (sessionstate.Server, error)

AuthenticateAudience retains live Pod/controller binding for independently scoped workload protocols; human JWTs and unrelated projected tokens fail.

Jump to

Keyboard shortcuts

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