mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix!: validate HostnameSuffix and SSHConfigOptions' (#26154)
- Adds server-side and client-side validation for CODER_CONFIGSSH_HOSTNAME_SUFFIX and CODER_SSH_CONFIG_OPTIONS. - **Server-side breaking change:** invalid values for either of these will cause `coderd` to exit with an error. - Client-side: `coder config-ssh` will exit with an error if it detects invalid config. - Adds tests for the above Local smoke-testing: ran `develop.sh --env-file <path to an env file containing badness>`. Validated that server startup failed as expected. > 🤖 Generated by Coder Agents with supervision from a human. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
1dc12f8ae7
commit
a26c46a3bf
+8
-3
@@ -288,8 +288,12 @@ Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
|
||||
--ssh-config-options string-array, $CODER_SSH_CONFIG_OPTIONS
|
||||
These SSH config options will override the default SSH config options.
|
||||
Provide options in "key=value" or "key value" format separated by
|
||||
commas.Using this incorrectly can break SSH to your deployment, use
|
||||
cautiously.
|
||||
commas. Using this incorrectly can break SSH to your deployment, use
|
||||
cautiously. The following options are not allowed: Host, Match,
|
||||
Include, ProxyCommand, ProxyJump, LocalCommand, PermitLocalCommand,
|
||||
RemoteCommand, KnownHostsCommand, PKCS11Provider, SecurityKeyProvider,
|
||||
SmartcardDevice, XAuthLocation. Option values must not contain
|
||||
newline, carriage return, or NUL characters.
|
||||
|
||||
--web-terminal-renderer string, $CODER_WEB_TERMINAL_RENDERER (default: canvas)
|
||||
The renderer to use when opening a web terminal. Valid values are
|
||||
@@ -298,7 +302,8 @@ Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
|
||||
--workspace-hostname-suffix string, $CODER_WORKSPACE_HOSTNAME_SUFFIX (default: coder)
|
||||
Workspace hostnames use this suffix in SSH config and Coder Connect on
|
||||
Coder Desktop. By default it is coder, resulting in names like
|
||||
myworkspace.coder.
|
||||
myworkspace.coder. The suffix must not start with a dot, and must not
|
||||
contain spaces, newlines, or glob characters (* and ?).
|
||||
|
||||
CONFIG OPTIONS:
|
||||
Use a YAML configuration file when your server launch become unwieldy.
|
||||
|
||||
+9
-3
@@ -542,12 +542,18 @@ client:
|
||||
# (default: coder., type: string)
|
||||
sshHostnamePrefix: coder.
|
||||
# Workspace hostnames use this suffix in SSH config and Coder Connect on Coder
|
||||
# Desktop. By default it is coder, resulting in names like myworkspace.coder.
|
||||
# Desktop. By default it is coder, resulting in names like myworkspace.coder. The
|
||||
# suffix must not start with a dot, and must not contain spaces, newlines, or glob
|
||||
# characters (* and ?).
|
||||
# (default: coder, type: string)
|
||||
workspaceHostnameSuffix: coder
|
||||
# These SSH config options will override the default SSH config options. Provide
|
||||
# options in "key=value" or "key value" format separated by commas.Using this
|
||||
# incorrectly can break SSH to your deployment, use cautiously.
|
||||
# options in "key=value" or "key value" format separated by commas. Using this
|
||||
# incorrectly can break SSH to your deployment, use cautiously. The following
|
||||
# options are not allowed: Host, Match, Include, ProxyCommand, ProxyJump,
|
||||
# LocalCommand, PermitLocalCommand, RemoteCommand, KnownHostsCommand,
|
||||
# PKCS11Provider, SecurityKeyProvider, SmartcardDevice, XAuthLocation. Option
|
||||
# values must not contain newline, carriage return, or NUL characters.
|
||||
# (default: <unset>, type: string-array)
|
||||
sshConfigOptions: []
|
||||
# The upgrade message to display to users when a client/server mismatch is
|
||||
|
||||
Reference in New Issue
Block a user