server

package
v0.0.0-...-6921878 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package server wires the Access Virtual Workspace binary together: the shared access graph, the RBAC provider that populates it, and a virtual-workspace root apiserver (kcp virtual-workspace-framework) serving the access virtual workspace at /services/access behind kcp's front-proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, o *Options) error

Run starts the provider and serves the Access virtual workspace until ctx is cancelled.

Types

type Options

type Options struct {
	// SecureServing configures TLS serving (bind address, port,
	// serving certs). The VW must serve TLS: behind kcp's front-proxy
	// the proxy verifies the VW's serving cert, and the VW verifies
	// the proxy's client cert via the requestheader CA.
	SecureServing *genericoptions.SecureServingOptions

	// Authentication configures delegated authentication:
	//   - requestheader: trust X-Remote-User/X-Remote-Group/X-Remote-Extra-*
	//     from clients presenting a cert signed by --requestheader-client-ca-file
	//     (this is how kcp's front-proxy forwards identity),
	//   - bearer tokens: TokenReview against kcp (direct access without
	//     the front-proxy, e.g. local development),
	//   - client certs via --client-ca-file.
	Authentication *genericoptions.DelegatingAuthenticationOptions

	// Authorization is the virtual-workspace-framework authorizer setup:
	// always-allow paths (health endpoints) plus per-VW authorizers.
	Authorization *vwoptions.Authorization

	// Kubeconfig is the path to the kubeconfig for the target kcp.
	// Used by the RBAC provider (informers), for TokenReview-based
	// authentication, and as the base identity for impersonated
	// per-workspace MCP calls.
	Kubeconfig string

	// EndpointBase is the front-proxy URL prefix used to construct
	// per-cluster endpoints in SCAR responses.
	EndpointBase string

	// APIExportEndpointSlice is the name of the APIExportEndpointSlice
	// for the access VW's system APIExport. When set, the RBAC provider
	// runs in multi-shard mode and only indexes workspaces bound to
	// that APIExport.
	APIExportEndpointSlice string
}

Options configures the access virtual workspace server.

func NewOptions

func NewOptions() *Options

NewOptions returns options with defaults suitable for running behind kcp's front-proxy.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags registers all flags on the given flag set.

func (*Options) Complete

func (o *Options) Complete() error

Complete fills in derived defaults.

func (*Options) Validate

func (o *Options) Validate() error

Validate checks flag consistency, reporting every problem it finds rather than only the first.

Jump to

Keyboard shortcuts

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