Debian Codegraph @

doc/modules/man/pages/cockpit.conf.5.adoc

raw
1 = cockpit.conf(5)
2
3 == Name
4
5 cockpit.conf - Cockpit configuration file
6
7 == Description
8
9 Cockpit can be configured via /etc/cockpit/cockpit.conf. If
10 *$XDG_CONFIG_DIRS* is set, then the first path containing a
11 *../cockpit/cockpit.conf* is used instead. Other configuration files
12 and directories are searched for in the same way.
13
14 This file is not required and may need to be created manually. The file
15 has a INI file syntax and thus contains key / value pairs, grouped into
16 topical groups. See the examples below for details.
17
18 Note: The port that cockpit listens on cannot be changed in this file.
19 To change the port change the systemd *cockpit.socket* file.
20
21 == WebService
22
23 *Origins*::
24 By default cockpit will not accept crossdomain websocket connections.
25 Use this setting to allow access from alternate domains. Origins
26 should include scheme, host and port, if necessary. Wildcards and glob
27 expressions are permitted. IPv6 addresses must have their brackets escaped
28 with backslashes (e.g. `+\[::1\]+`) as they are matched using `+fnmatch()+`.
29 +
30 [source,ini]
31 ----
32 [WebService]
33 Origins = https://somedomain1.com https://somedomain2.com:9090 https://*.somedomain3.com https://\[::1\]:9090
34 ----
35 *ProtocolHeader*::
36 Configure cockpit to look at the contents of this header to determine
37 if a connection is using tls. This should only be used when cockpit is
38 behind a reverse proxy, and care should be taken to make sure that
39 incoming requests cannot set this header.
40 +
41 [source,ini]
42 ----
43 [WebService]
44 ProtocolHeader = X-Forwarded-Proto
45 ----
46 *ForwardedForHeader*::
47 Configure cockpit to look at the contents of this header to determine
48 the real origin of a connection. This should only be used when cockpit
49 is behind a reverse proxy, and care should be taken to make sure that
50 incoming requests cannot set this header.
51 +
52 [source,ini]
53 ----
54 [WebService]
55 ForwardedForHeader = X-Forwarded-For
56 ----
57 *LoginTitle*::
58 Set the browser title for the login screen.
59 *LoginTo*::
60 When set to `+true+` the _Connect to_ option on the login screen is
61 visible and allows logging into another server. When set to `+false+`,
62 direct remote logins are disallowed. If this option is not specified
63 then it will be automatically detected based on whether the
64 *cockpit-bridge* package is installed and the *ssh* program is
65 available. +
66 +
67 If cockpit-ws is exposed to the public internet, and also has access
68 to a private internal network, it is recommended to explicitly set
69 *LoginTo=false*. This prevents unauthenticated remote attackers from
70 scanning the internal network for existing machines and open ports.
71 *RequireHost*::
72 When set to `+true+` cockpit will require users to use the _Connect
73 to_ option to specify the host to log into.
74 *AllowMultiHost*::
75 When set to `+true+`, cockpit will allow users to connect to multiple
76 hosts in one session. The default is OS specific. +
77 +
78 When connecting to multiple servers, JavaScript runs without
79 isolation. All systems will be vulnerable to potential attacks from
80 other connected hosts. Enable this option _only_ when all hosts are
81 trusted.
82 *MaxStartups*::
83 Same as the *sshd* configuration option by the same name. Specifies
84 the maximum number of concurrent login attempts allowed. Additional
85 connections will be dropped until authentication succeeds or the
86 connections are closed. Defaults to 10. +
87 +
88 Alternatively, random early drop can be enabled by specifying the
89 three colon separated values *start:rate:full* (e.g. "10:30:60").
90 Cockpit will start refusing authentication attempts with a probability
91 of *rate/100* (30%) if there are currently *start* (10)
92 unauthenticated connections. The probability increases linearly and
93 all connection attempts are refused if the number of unauthenticated
94 connections reaches *full* (60).
95 *MaxConcurrentConnections*::
96 Limits the number of concurrent HTTP connections on the Cockpit port.
97 Connection attempts that exceed this limit are rejected early on
98 without reading a single byte. This can be used during brute-force
99 attacks. It differs from *MaxStartups*, which protects against too
100 many concurrent authentication attempts. Defaults to 500.
101 *AllowUnencrypted*::
102 If true, cockpit will accept unencrypted HTTP connections. Otherwise,
103 it redirects all HTTP connections to HTTPS. Exceptions are connections
104 from localhost and for certain URLs (like */ping*). Defaults to
105 false.
106 *UrlRoot*::
107 The root URL where you will be serving cockpit. When provided cockpit
108 will expect all requests to be prefixed with the given url. This is
109 mostly useful when you are using cockpit behind a reverse proxy, such
110 as nginx. `+/cockpit/+` and `+/cockpit++` are reserved and should not
111 be used. For example `+/cockpit-new/+` is ok. `+/cockpit/+` and
112 `+/cockpit+new/+` are not.
113 *ClientCertAuthentication*::
114 If true, enable TLS client certificates for authenticating users.
115 Commonly these are provided by a smart card, but it's equally possible
116 to import certificates directly into the web browser. Please see the
117 https://docs.cockpit-project.org/cockpit-guide/latest/guide/cert-authentication.html[Certificate/smart
118 card authentication] section in the Cockpit guide for details.
119 *Shell*::
120 The relative URL to top level component to display in Cockpit once
121 logged in. Defaults to `+/shell/index.html+`
122 *CustomLoginPage*::
123 Load the login page from an alternative directory. The directory must
124 contain a `+login.html+` and optionally a `+po.js+` file for translations.
125 When not set, the hardcoded `+$prefix/share/cockpit/static+` directory is used.
126
127 == Log
128
129 *Fatal*::
130 The kind of log messages in the bridge to treat as fatal. Separate
131 multiple values with spaces. Relevant values are: *criticals* and
132 *warnings*.
133
134 == OAuth
135
136 Cockpit can be configured to support the
137 https://tools.ietf.org/html/rfc6749#section-4.2[implicit grant] OAuth
138 authorization flow. When successful the resulting oauth token will be
139 passed to cockpit-ws using the *Bearer* auth-scheme. For a login to be
140 successful, cockpit will also need a to be configured to verify and
141 allow *Bearer* tokens.
142
143 *URL*::
144 This is the url that cockpit will redirect the users browser to when
145 it needs to obtain an oauth token. Cockpit will add a redirect_uri
146 parameter to the url with the location of where the oauth provider
147 should redirect to once a token has been obtained.
148 *ErrorParam*::
149 When a oauth provider redirects a user back to cockpit, look for this
150 parameter in the querystring or fragment portion of the url to find a
151 error message. When not provided it will default to
152 *error_description*
153 *TokenParam*::
154 When a oauth provider redirects a user back to cockpit, look for this
155 parameter in the querystring or fragment portion of the url to find
156 the access token. When not provided it will default to
157 *access_token*
158
159 == Session
160
161 *Banner*::
162 The contents of the specified file (commonly */etc/issue*) are shown
163 on the login page. By default, no banner is displayed.
164 *IdleTimeout*::
165 Time in minutes after which session expires and user is logged out if
166 no user action has been performed in the given time. This idle timeout
167 only applies to interactive password logins. With non-interactive
168 authentication methods like Kerberos, OAuth, or certificate login, the
169 browser cannot forget credentials, and thus automatic logouts are not
170 useful for protecting credentials of forgotten sessions. Set to *0*
171 to disable session timeout.
172 +
173 [source,ini]
174 ----
175 [Session]
176 IdleTimeout=15
177 ----
178
179 {empty}::
180 When not specified, there is no idle timeout by default.
181
182 *WarnBeforeConnecting*::
183 Whether to warn before connecting to remote hosts from the Shell.
184 Defaults to true.
185 +
186 [source,ini]
187 ----
188 [Session]
189 WarnBeforeConnecting=false
190 ----
191
192 == Bugs
193
194 include::../partials/bugs.adoc[]
195
196 == Author
197
198 include::../partials/author.adoc[]
199
200 == See also
201
202 man:cockpit-ws[8], man:cockpit-tls[8]