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) RegisterAccess ¶
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 ¶
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.
type Store ¶
type Store interface {
PutSession(context.Context, sessionstate.Session) (sessionstate.Session, error)
GetSession(context.Context, string, string) (sessionstate.Session, bool, error)
ListSessions(context.Context, sessionstate.Filter) (sessionstate.Page, error)
SetSessionRevoked(context.Context, string, string, bool, string) error
DeleteSession(context.Context, string, string) error
DeleteSessionVersioned(context.Context, string, string, string) error
CompleteSessionEnrollment(context.Context, string, string, string) error
DeletePendingSession(context.Context, string, string, string, string) error
RevokeSessions(context.Context, sessionstate.Filter, string) (int64, error)
SessionSnapshot(context.Context, sessionstate.Server) (sessionstate.Snapshot, error)
SessionChanges(context.Context, sessionstate.Server, string, int64) (sessionstate.Changes, error)
}