11---
2- # Debug mode
32debug : true
4-
5- # Where logs will be written.
6- # Default is empty but it can either be "syslog" if you want to use syslog or a
7- # filename where the pattern '{user}' which will be replaced by the user login
8- # (e.g. "/var/log/sshproxy/{user}.log").
93log : " /var/log/sshproxy/{user}.log"
10-
11- # Minimum interval for checking if an host is alive.
12- # Empty by default (i.e. always check host).
13- # The string can contain a unit suffix such as 'h', 'm' and 's' (e.g. "2m30s").
144check_interval : " 2m30s"
15-
16- # Banner displayed to the client when no backend can be reached (more
17- # precisely, when all backends are either down or disabled in etcd). This
18- # message can be multiline.
195error_banner : " an error banner"
20-
21- # Where raw dumps are written. Only interactive sessions are dumped.
22- # Default is empty.
23- # It can be a path which can (and should) contain one or more of the following
24- # patterns:
25- # - '{user}' replaced by the user login
26- # - '{sid}' replaced by the unique session id
27- # - '{time}' replaced by the connection starting time (e.g.
28- # "2006-01-02T15:04:05.999999999Z07:00").
29- # The subdirectories will be created if needed.
30- # For example: "/var/lib/sshproxy/dumps/{user}/{time}-{sid}.dump"
31- # It can also be "etcd", in order to store stats into etcd.
32- # It can also be a network address where to send dumps if specified as
33- # 'TCP:host:port' (the TCP is case sensitive), e.g. 'TCP:collector:5555'.
346dump : " /var/lib/sshproxy/dumps/{user}/{time}-{sid}.dump"
35-
36- # Maximum amount of bytes of a dump. Setting the 'dump_limit_window' option
37- # will limit the amount of bytes per window. This option is only useful if the
38- # 'dump' option is set to a file or to a network address. Defaults to 0 (no
39- # limit).
407dump_limit_size : 10
41-
42- # Duration of a dump measurement window. "0" by default, the string can contain
43- # a unit suffix such as 'h', 'm' and 's' (e.g. "2m30s"). When set to "0", a
44- # dump will stop once it's too big (and the dump's file descriptor will be
45- # closed. When set to a duration, the dump will pause when there is too much
46- # data transferred in the current window (or the previous), and will resume
47- # when few enough data are transferred during the previous window and the
48- # current one. This option is only useful when the 'dump_limit_size' option is
49- # set.
508dump_limit_window : " 2m31s"
51-
52- # Interval at which basic statistics of transferred bytes are logged.
53- # "0" by default (i.e. disabled), the string can contain a unit suffix such as
54- # 'h', 'm' and 's' (e.g. "2m30s"). These statistics are only available when the
55- # 'dump' option is set.
569log_stats_interval : " 2m32s"
57-
58- # Interval at which bandwidth is updated in etcd. "0" by default (i.e.
59- # disabled), the string can contain a unit suffix such as 'h', 'm' and 's'
60- # (e.g. "2m30s"). These statistics are only available when the 'dump' option is
61- # set.
6210etcd_stats_interval : " 2m33s"
63-
64- # Commands can be translated between what is received by sshproxy and what is
65- # executed by the ssh forked by sshproxy. The keys are strings containing the
66- # exact user command. ssh_args contains an optional list of options that will
67- # be passed to ssh. command is a mandatory string, the actual executed command.
68- # disable_dump is false by default. If true, no dumps will be done for this
69- # command.
7011translate_commands :
7112 " internal-sftp " :
7213 ssh_args :
@@ -78,27 +19,6 @@ translate_commands:
7819 - " -s"
7920 command : " sftp"
8021 disable_dump : true
81-
82- # A command can be launched before the bg_command and before connecting to the
83- # destination. The standard and error outputs are displayed to the user. If the
84- # return code of the blocking command is not 0, sshproxy will abort the
85- # session.
86- # blocking_command: ""
87-
88- # A command can be launched in the background for the session duration.
89- # The standard and error outputs are only logged in debug mode.
90- # bg_command: ""
91-
92- # etcd configuration. Associative array whose keys are:
93- # - endpoints: a list of etcd endpoints. Default is determined by the
94- # underlying library.
95- # - tls: TLS configuration if enabled on etcd endpoints. Default is no TLS.
96- # - username: username if basic authentication is enabled.
97- # - password: password if basic authentication is enabled.
98- # - keyttl: time to live in second for a connection stored in etcd after it has
99- # ended. Default is 5 seconds.
100- # - mandatory: if true, connections will be allowed only if etcd is available.
101- # Default is false.
10222etcd :
10323 endpoints :
10424 - " host1:port1"
@@ -111,76 +31,15 @@ etcd:
11131 password : " pass"
11232 keyttl : 5
11333 mandatory : true
114-
115- # Environment variables can be set if needed. The '{user}' pattern will be
116- # replaced with the user login.
11734environment :
11835 XAUTHORITY : /tmp/.Xauthority_{user}
119-
120- # Global SSH options.
121- # ssh:
122- # exe: ssh
123- # args: ["-q", "-Y"]
124-
125- # Maximum number of connections allowed per user. Connections are counted in
126- # the etcd database. If set to 0, there is no limit number of connections per
127- # user. Default is 0.
12836max_connections_per_user : 50
129-
130- # The service name is used for display. It's also used as a key in order to
131- # check in etcd if a user already has active connections. The default service
132- # name is "default".
133- # service: default
134-
135- # The dest value is an array of destination hosts (with an optional port). Each
136- # host can be a nodeset (eg. "host[5-6]"). If libnodeset.so is available,
137- # clustershell groups can also be used (eg. "@hosts").
13837dest : ["host5:4222"]
139-
140- # The route_select value defines how the host destination will be chosen. It
141- # can be "ordered" (the default), "random", "connections" or "bandwidth". If
142- # "ordered", the hosts are tried in the order listed until a successful
143- # connection is made. The list is first randomly sorted if "random" is
144- # specified (i.e. a poor-man load-balancing algorithm). If "connections", the
145- # hosts with less connections from the user have priority, then the hosts with
146- # less global connections, and in case of a draw, the selection is random. For
147- # "bandwidth", it's the same as "connections", but based on the bandwidth used,
148- # with a rollback on connections (which is frequent for new simultaneous
149- # connections).
150- # route_select: ordered
151-
152- # The mode value defines the stickiness of a connection. It can be "sticky" or
153- # "balanced" (defaults to sticky). If "sticky", then all connections of a user
154- # will be made on the same destination host. If "balanced", the route_select
155- # algorithm will be used for every connection.
156- # mode: sticky
157-
158- # The force_command can be set to override the command asked by the user.
159- # force_command: "internal-sftp"
160-
161- # If command_must_match is set to true, then the connection is closed if the
162- # original command is not the same as the force_command. command_must_match
163- # defaults to false.
16438command_must_match : true
165-
166- # etcd_keyttl defaults to
167- # 0. If a value is set (in seconds), the chosen backend will be remembered for
168- # this amount of time.
16939etcd_keyttl : 3600
170-
171- # Each option can be overridden for specific sources (IP address or DNS name of
172- # the listening SSH daemon, with an optional port), for specific users and/or
173- # Unix groups of users (eg. for debugging purpose). Multiple sources, users
174- # and/or groups can be defined. Each element of the "match" array is treated as
175- # an "or" statement. If an element of the "match" array contains multiple
176- # keys, they are treated as an "and" statement. If multiple overrides match,
177- # they will be applied in the order they are defined. In the following example:
178- # alice, bob and any user in the group foo will have the debug set to true. But
179- # if any of those are also in the groups bar AND baz, debug will be set to
180- # false, as the last override takes precedence.
18140overrides :
18241 - match :
183- - sources : [127.0.0.1 ]
42+ - sources : [' 127.0.0.[1-3]' ]
18443 environment :
18544 XAUTHORITY : /dev/shm/.Xauthority_{user}
18645 - match :
0 commit comments