{"record":{"id":"1db674ac0c580f1d","repo":"yudai/gotty","slug":"tls-client-authentication-is-enabled-but-tls-is-n","errorCode":null,"errorMessage":"TLS client authentication is enabled, but TLS is not enabled","messagePattern":"TLS client authentication is enabled, but TLS is not enabled","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/options.go","lineNumber":39,"sourceCode":"\tTitleFormat         string           `hcl:\"title_format\" flagName:\"title-format\" flagSName:\"\" flagDescribe:\"Title format of browser window\" default:\"{{ .command }}@{{ .hostname }}\"`\n\tEnableReconnect     bool             `hcl:\"enable_reconnect\" flagName:\"reconnect\" flagDescribe:\"Enable reconnection\" default:\"false\"`\n\tReconnectTime       int              `hcl:\"reconnect_time\" flagName:\"reconnect-time\" flagDescribe:\"Time to reconnect\" default:\"10\"`\n\tMaxConnection       int              `hcl:\"max_connection\" flagName:\"max-connection\" flagDescribe:\"Maximum connection to gotty\" default:\"0\"`\n\tOnce                bool             `hcl:\"once\" flagName:\"once\" flagDescribe:\"Accept only one client and exit on disconnection\" default:\"false\"`\n\tTimeout             int              `hcl:\"timeout\" flagName:\"timeout\" flagDescribe:\"Timeout seconds for waiting a client(0 to disable)\" default:\"0\"`\n\tPermitArguments     bool             `hcl:\"permit_arguments\" flagName:\"permit-arguments\" flagDescribe:\"Permit clients to send command line arguments in URL (e.g. http://example.com:8080/?arg=AAA&arg=BBB)\" default:\"true\"`\n\tPreferences         *HtermPrefernces `hcl:\"preferences\"`\n\tWidth               int              `hcl:\"width\" flagName:\"width\" flagDescribe:\"Static width of the screen, 0(default) means dynamically resize\" default:\"0\"`\n\tHeight              int              `hcl:\"height\" flagName:\"height\" flagDescribe:\"Static height of the screen, 0(default) means dynamically resize\" default:\"0\"`\n\tWSOrigin            string           `hcl:\"ws_origin\" flagName:\"ws-origin\" flagDescribe:\"A regular expression that matches origin URLs to be accepted by WebSocket. No cross origin requests are acceptable by default\" default:\"\"`\n\tTerm                string           `hcl:\"term\" flagName:\"term\" flagDescribe:\"Terminal name to use on the browser, one of xterm or hterm.\" default:\"xterm\"`\n\n\tTitleVariables map[string]interface{}\n}\n\nfunc (options *Options) Validate() error {\n\tif options.EnableTLSClientAuth && !options.EnableTLS {\n\t\treturn errors.New(\"TLS client authentication is enabled, but TLS is not enabled\")\n\t}\n\treturn nil\n}\n\ntype HtermPrefernces struct {\n\tAltGrMode                     *string                      `hcl:\"alt_gr_mode\" json:\"alt-gr-mode,omitempty\"`\n\tAltBackspaceIsMetaBackspace   bool                         `hcl:\"alt_backspace_is_meta_backspace\" json:\"alt-backspace-is-meta-backspace,omitempty\"`\n\tAltIsMeta                     bool                         `hcl:\"alt_is_meta\" json:\"alt-is-meta,omitempty\"`\n\tAltSendsWhat                  string                       `hcl:\"alt_sends_what\" json:\"alt-sends-what,omitempty\"`\n\tAudibleBellSound              string                       `hcl:\"audible_bell_sound\" json:\"audible-bell-sound,omitempty\"`\n\tDesktopNotificationBell       bool                         `hcl:\"desktop_notification_bell\" json:\"desktop-notification-bell,omitempty\"`\n\tBackgroundColor               string                       `hcl:\"background_color\" json:\"background-color,omitempty\"`\n\tBackgroundImage               string                       `hcl:\"background_image\" json:\"background-image,omitempty\"`\n\tBackgroundSize                string                       `hcl:\"background_size\" json:\"background-size,omitempty\"`\n\tBackgroundPosition            string                       `hcl:\"background_position\" json:\"background-position,omitempty\"`\n\tBackspaceSendsBackspace       bool                         `hcl:\"backspace_sends_backspace\" json:\"backspace-sends-backspace,omitempty\"`\n\tCharacterMapOverrides         map[string]map[string]string `hcl:\"character_map_overrides\" json:\"character-map-overrides,omitempty\"`\n\tCloseOnExit                   bool                         `hcl:\"close_on_exit\" json:\"close-on-exit,omitempty\"`","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/yudai/gotty/blob/a080c85cbc59226c94c6941ad8c395232d72d517/server/options.go#L21-L57","documentation":"Sentinel-style config validation error in Options.Validate: tls_client_ca was supplied (client certificate authentication requested) but the server itself is not running with TLS enabled, so client certificates could never be requested or verified. The inconsistent flag combination is the fault.","triggerScenarios":"Thrown at server/options.go:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable TLS (--tls-cert/--tls-key) whenever client CA auth is configured","Or drop the client CA setting if plaintext operation is intended","Add a startup config lint so mutually exclusive flag states fail with a clear message"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a080c85cbc59226c94c6941ad8c395232d72d517","analyzedAt":"2026-09-02T16:42:38.150Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}