k8s

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowPrivateUpstreams bool

AllowPrivateUpstreams disables the SSRF dial-time guard when true. Set by cmd/credentialproxy/main.go from config.

Functions

func BuildMergedKubeconfig

func BuildMergedKubeconfig(
	bindings []*provider.BindingMeta,
	proxyToken string,
	credproxyURL string,
) (*provider.SandboxConfigFile, error)

BuildMergedKubeconfig generates a merged kubeconfig that routes all cluster traffic through the credential proxy. Pure function: no I/O.

func IsPrivateIP

func IsPrivateIP(ip net.IP) bool

IsPrivateIP reports whether ip falls in any private/reserved range.

func ParseKubeconfig

func ParseKubeconfig(_ string, raw []byte) (*provider.UploadResult, error)

ParseKubeconfig validates an uploaded kubeconfig yaml and extracts the fields to persist.

func ValidateIssuerURL added in v0.40.0

func ValidateIssuerURL(issuerURL string) error

ValidateIssuerURL checks that an OIDC issuer URL is https and not a private IP. Exported so the agentserver handler can call it before OIDC discovery.

Types

type K8sProvider

type K8sProvider struct{}

K8sProvider implements provider.Provider for Kubernetes API servers.

func (*K8sProvider) BuildSandboxConfig

func (p *K8sProvider) BuildSandboxConfig(
	bindings []*provider.BindingMeta,
	proxyToken string,
	credproxyPublicURL string,
) ([]*provider.SandboxConfigFile, error)

func (*K8sProvider) Kind

func (p *K8sProvider) Kind() string

func (*K8sProvider) ParseUpload

func (p *K8sProvider) ParseUpload(contentType string, raw []byte) (*provider.UploadResult, error)

func (*K8sProvider) ServeHTTP

type OIDCAuthConfig added in v0.40.0

type OIDCAuthConfig struct {
	IssuerURL    string   `json:"issuer_url"`
	ClientID     string   `json:"client_id"`
	Scopes       []string `json:"scopes"`
	RefreshToken string   `json:"refresh_token,omitempty"`
	AccessToken  string   `json:"access_token,omitempty"`
	TokenExpiry  string   `json:"token_expiry,omitempty"`
}

OIDCAuthConfig is the auth_blob plaintext format for auth_type="oidc".

Jump to

Keyboard shortcuts

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