Documentation
¶
Index ¶
- Constants
- Variables
- func ExportLocalUIDeviceCA(stateDir, outputPath string) error
- func InstallLocalUIDeviceCAForCurrentUser(stateDir string) error
- func LocalUIDeviceCACertificatePath(stateDir string) string
- func LocalUIPublicCertificatePEM(stateDir string) ([]byte, error)
- func SaveRuntimeAccess(layout config.StateLayout, input RuntimeAccessUpdate) (*config.EnvironmentCatalogAccess, error)
- func ValidateLocalUICertificateForBind(stateDir, rawBind string) error
- type BindSpec
- type CertificateImport
- type DeviceCAStatus
- func GenerateLocalUIDeviceCA(stateDir string) (DeviceCAStatus, error)
- func ImportLocalUICertificate(stateDir string, input CertificateImport) (DeviceCAStatus, error)
- func InspectLocalUIDeviceCA(stateDir string) (DeviceCAStatus, error)
- func RegenerateLocalUIDeviceCA(stateDir string) (DeviceCAStatus, error)
- func RemoveLocalUICertificate(stateDir string) (DeviceCAStatus, error)
- type LocalAuthorizationKeyRotationResult
- type Options
- type RuntimeAccessUpdate
- type Server
- func (s *Server) Close() error
- func (s *Server) DisplayURLs() []string
- func (s *Server) HandlerForDesktopBridge() http.Handler
- func (s *Server) ListenLabel() string
- func (s *Server) LocalUIBridgeTokenForDesktop() string
- func (s *Server) LocalUIBridgeURLForDesktop() string
- func (s *Server) LocalUIExposure() runtimemanagement.LocalUIExposure
- func (s *Server) Port() int
- func (s *Server) RuntimeAttachStatus() runtimemanagement.RuntimeAttachStatus
- func (s *Server) RuntimeControlEndpointForDesktopBridge() *runtimemanagement.RuntimeControlEndpoint
- func (s *Server) RuntimeServiceSnapshotForDesktopBridge() runtimeservice.Snapshot
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) StartOnListeners(ctx context.Context, listeners []net.Listener, ...) error
Constants ¶
const DefaultBind = "localhost:23998"
const (
// LocalEnvPublicID is the fixed env_public_id used for Local UI mode.
LocalEnvPublicID = "env_local"
)
Variables ¶
var ( ErrLocalUIDeviceCAMissing = errors.New("local UI device CA is missing") ErrLocalUIDeviceCAInvalid = errors.New("local UI device CA is invalid") ErrLocalUIDeviceCAExpired = errors.New("local UI device CA is expired") ErrLocalUIDeviceCAUntrusted = errors.New("local UI device CA is not trusted by this OS user") ErrLocalUIDeviceCAManual = errors.New("local UI device CA requires manual trust installation") ErrLocalUIDeviceCAExists = errors.New("local UI device CA already exists") ErrLocalUIDeviceCANotYetValid = errors.New("local UI device CA is not yet valid") )
var ( ErrLocalUIDeviceCAInstallFailed = errors.New("current-user certificate trust installation failed") ErrLocalUIDeviceCAInstallCanceled = errors.New("current-user certificate trust installation was canceled") )
Functions ¶
func ExportLocalUIDeviceCA ¶ added in v0.13.0
ExportLocalUIDeviceCA writes only the public CA certificate or server chain.
func InstallLocalUIDeviceCAForCurrentUser ¶ added in v0.13.0
InstallLocalUIDeviceCAForCurrentUser is invoked only by the explicit CLI install operation. It never elevates privileges or modifies system-wide trust. Linux distributions expose incompatible user trust stores, so Linux returns a manual-install result instead of guessing or invoking sudo.
func LocalUIDeviceCACertificatePath ¶ added in v0.13.0
LocalUIDeviceCACertificatePath returns the public certificate path. The CA private key path is intentionally not exposed.
func LocalUIPublicCertificatePEM ¶ added in v0.13.0
LocalUIPublicCertificatePEM returns the validated public CA or server chain. Private key material never enters the export payload.
func SaveRuntimeAccess ¶ added in v0.13.0
func SaveRuntimeAccess(layout config.StateLayout, input RuntimeAccessUpdate) (*config.EnvironmentCatalogAccess, error)
func ValidateLocalUICertificateForBind ¶ added in v0.13.0
ValidateLocalUICertificateForBind checks the saved identity without binding the configured port or interrupting the current Runtime. Startup repeats the check against its actual listener authorities.
Types ¶
type BindSpec ¶
type BindSpec struct {
// contains filtered or unexported fields
}
BindSpec is the parsed Local UI listener configuration.
func (BindSpec) IsLoopbackOnly ¶
func (BindSpec) IsNetworkExposure ¶ added in v0.10.0
func (BindSpec) IsWildcard ¶
func (BindSpec) ListenLabel ¶
func (BindSpec) ListenLabelForPort ¶
type CertificateImport ¶ added in v0.13.0
type CertificateImport struct {
CertificatePEM string `json:"certificate_pem"`
PrivateKeyPEM string `json:"private_key_pem"`
}
CertificateImport carries a PEM certificate chain and its matching key only through the privileged maintenance input. It is never part of a status report.
type DeviceCAStatus ¶ added in v0.13.0
type DeviceCAStatus struct {
Identity string `json:"identity"`
Trust string `json:"trust"`
NotAfter string `json:"not_after,omitempty"`
CertPath string `json:"certificate_path,omitempty"`
Remedy string `json:"remedy,omitempty"`
Kind string `json:"certificate_kind,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
}
DeviceCAStatus is the stable, credential-free Local UI trust projection.
func GenerateLocalUIDeviceCA ¶ added in v0.13.0
func GenerateLocalUIDeviceCA(stateDir string) (DeviceCAStatus, error)
GenerateLocalUIDeviceCA explicitly creates the persistent device-local CA. Runtime startup never calls this function.
func ImportLocalUICertificate ¶ added in v0.13.0
func ImportLocalUICertificate(stateDir string, input CertificateImport) (DeviceCAStatus, error)
func InspectLocalUIDeviceCA ¶ added in v0.13.0
func InspectLocalUIDeviceCA(stateDir string) (DeviceCAStatus, error)
InspectLocalUIDeviceCA reports the serving identity and platform-specific client-trust guidance without exposing the CA key or a generated certificate.
func RegenerateLocalUIDeviceCA ¶ added in v0.13.0
func RegenerateLocalUIDeviceCA(stateDir string) (DeviceCAStatus, error)
func RemoveLocalUICertificate ¶ added in v0.13.0
func RemoveLocalUICertificate(stateDir string) (DeviceCAStatus, error)
type LocalAuthorizationKeyRotationResult ¶ added in v0.11.0
type LocalAuthorizationKeyRotationResult struct {
PreviousVersion int `json:"previous_version"`
CurrentVersion int `json:"current_version"`
RetainedKeys int `json:"retained_keys"`
}
func RotateLocalAuthorizationKey ¶ added in v0.11.0
func RotateLocalAuthorizationKey(stateRoot string) (LocalAuthorizationKeyRotationResult, error)
type Options ¶
type Options struct {
Logger *slog.Logger
Bind BindSpec
Protocol string
DisableSelfUpgrade bool
EffectiveRunMode string
RemoteEnabled bool
ControlplaneBaseURL string
ControlplaneProviderID string
EnvPublicID string
// AppServer is the Env App local API and proxy handler mounted under /_redeven_proxy/*.
AppServer *appserver.Server
// Agent serves direct sessions (RPC/streams) after a successful E2EE handshake.
Agent *agent.Agent
// ConfigPath is the absolute path to the runtime config file.
// It is used to compute the local permission cap and to render Settings consistently.
ConfigPath string
StateRoot string
RuntimeControlSocketPath string
// Version is the runtime build version (used by /api/local/agent/version/latest).
Version string
// Diagnostics stores structured debug-only request timing events.
Diagnostics *diagnostics.Store
// AccessGate protects the local browser entry when password mode is enabled.
AccessGate *accessgate.Gate
// contains filtered or unexported fields
}
type RuntimeAccessUpdate ¶ added in v0.13.0
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) DisplayURLs ¶
func (*Server) HandlerForDesktopBridge ¶ added in v0.6.8
func (*Server) ListenLabel ¶
func (*Server) LocalUIBridgeTokenForDesktop ¶ added in v0.13.0
func (*Server) LocalUIBridgeURLForDesktop ¶ added in v0.10.0
func (*Server) LocalUIExposure ¶ added in v0.10.0
func (s *Server) LocalUIExposure() runtimemanagement.LocalUIExposure
func (*Server) RuntimeAttachStatus ¶ added in v0.6.8
func (s *Server) RuntimeAttachStatus() runtimemanagement.RuntimeAttachStatus
func (*Server) RuntimeControlEndpointForDesktopBridge ¶ added in v0.6.8
func (s *Server) RuntimeControlEndpointForDesktopBridge() *runtimemanagement.RuntimeControlEndpoint
func (*Server) RuntimeServiceSnapshotForDesktopBridge ¶ added in v0.6.8
func (s *Server) RuntimeServiceSnapshotForDesktopBridge() runtimeservice.Snapshot