Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GitSecurityConfig ¶ added in v0.4.0
type GitSecurityConfig struct {
// HostBlocklist is a set of hostnames that always fail validation.
HostBlocklist []string
// AllowPlainHTTP opts in to "http://" remotes ; default false.
AllowPlainHTTP bool
}
GitSecurityConfig governs which git remotes the clone/pull/push handlers will dial. Defaults reject loopback, RFC1918 and the AWS metadata IP ; HostBlocklist extends the deny list with operator- specified DNS names.
type Options ¶
type Options struct {
// Logger is the slog logger. Required.
Logger *slog.Logger
// Static is the SPA bundle FS (typically the embedded dist/).
Static fs.FS
// Projects backs project file IO.
Projects project.Store
// Compiler orchestrates microVM compile jobs.
Compiler *compile.Service
// Auth validates OIDC bearers. nil = dev mode (auth disabled,
// every request gets a synthetic identity).
Auth auth.Verifier
// Config bundles security-sensitive runtime knobs (WS origin
// allowlist, host-pty fallback gate, git host blocklist). Zero
// value = safe production defaults except in dev mode (Auth=nil)
// where the missing-config path is permissive on purpose.
Config SecurityConfig
// Mailer delivers @-mention + new-comment notifications. nil =
// noop (no SMTP configured). NewSender returns a NoopSender for
// an empty SMTPHost so callers can always set this field.
Mailer email.Sender
}
Options bundles everything the server needs to boot.
type SecurityConfig ¶ added in v0.4.0
type SecurityConfig struct {
// AllowOrigin restricts the set of HTTP Origin values accepted on
// websocket upgrades. "*" or empty = no enforcement (the
// reverse-proxy layer is expected to validate). Comma-separated
// list otherwise ; each entry is a coder/websocket OriginPattern
// (host[:port], wildcards allowed).
AllowOrigin string
// AllowHostPty toggles the dev-mode fallback in handleShell that
// spawns a pty on the loom-server host when the NATS exec relay
// fails. Default false : in production a relay failure surfaces
// to chat and the session ends. Dev mode (Auth=nil) ignores this
// gate and keeps the fallback for local iteration.
AllowHostPty bool
// Git contains git remote SSRF guards.
Git GitSecurityConfig
}
SecurityConfig groups runtime security knobs surfaced to the server (kept distinct from internal/config.Config so the cmd/ binary can translate operator HCL into this struct without dragging the HCL types into the server package).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the HTTP handler tree, built once at startup.
Source Files
¶
- api.go
- api_admin.go
- api_admin_oci.go
- api_arxiv.go
- api_bib.go
- api_chat.go
- api_compile.go
- api_doi.go
- api_events.go
- api_files.go
- api_git.go
- api_git_helpers.go
- api_git_log.go
- api_history.go
- api_lint.go
- api_lsp.go
- api_notebook.go
- api_notify.go
- api_project_export.go
- api_project_import.go
- api_project_templates.go
- api_projects.go
- api_publicshare.go
- api_seed.go
- api_settings_email.go
- api_sharing.go
- api_shell.go
- api_snippets.go
- api_workspace_tar.go
- api_zotero.go
- collab.go
- compress.go
- devagent_bridge.go
- handlers.go
- prespawn.go
- ratelimit.go
- server.go
- shell_relay.go
- shutdown.go
- sidecar_lock.go
- tool_warmup.go
- toolshare_boot.go
- workspace_adapter.go