/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to clients.conf

  • Committer: Teddy Hogeborn
  • Date: 2008-07-29 03:35:39 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080729033539-08zecoj3jwlkpjhw
* server.conf: New file.

* mandos-clients.conf: Renamed to clients.conf.

* Makefile (FORTIFY): New.
  (CFLAGS): Include $(FORTIFY).

* plugins.d/mandosclient.c (main): New "if_index" variable.  Bug fix:
                                   check if interface exists.  New
                                   "--connect" option.

* server.py (serviceInterface): Removed; replaced by
                                "AvahiService.interface".  All users
                                changed.
  (AvahiError, AvahiServiceError, AvahiGroupError): New exception
                                                    classes.
  (AvahiService): New class.
  (serviceName): Removed; replaced by "AvahiService.name".  All users
                 changed.
  (serviceType): Removed; replaced by "AvahiService.type".  All users
                 changed.
  (servicePort): Removed; replaced by "AvahiService.port".  All users
                 changed.
  (serviceTXT): Removed; replaced by "AvahiService.TXT".  All users
                changed.
  (domain): Removed; replaced by "AvahiService.domain".  All users
            changed.
  (host): Removed; replaced by "AvahiService.host".  All users
          changed.
  (rename_count): Removed; replaced by "AvahiService.rename_count" and
                 "AvahiService.max_renames".  All users changed.
  (Client.__init__): If no secret or secfile, raise TypeError instead
                     of RuntimeError.
  (Client.last_seen): Renamed to "Client.last_checked_ok".  All users
                      changed.
  (Client.stop, Client.stop_checker): Use "getattr" with default value
                                      instead of "hasattr".
  (Client.still_valid): Removed "now" argument.
  (Client.handle): Separate the "no client found" and "client invalid"
                   cases for clearer code.
  (IPv6_TCPServer.__init__): "options" argument replaced by
                             "settings".  All callers changed.
  (IPv6_TCPServer.options): Replaced by "IPv6_TCPServer.settings".
                            All users changed.
  (IPv6_TCPServer.server_bind): Use getattr instead of hasattr.
  (add_service): Removed; replaced by "AvahiService.add".  All callers
                 changed.
  (remove_service): Removed; replaced by "AvahiService.remove".  All
                    callers changed.
  (entry_group_state_changed): On entry group collision, call the new
                               AvahiService.rename method.  Raise
                               AvahiGroupError on group error.
  (if_nametoindex): Use ctypes.utils.find_library to locate the C
                    library.  Cache the result.  Loop on EINTR.
  (daemon): Use os.path.devnull to locate "/dev/null".
  (killme): Removed.  All callers changed to do "sys.exit()" instead,
            except where stated otherwise.
  (main): Removed "exitstatus".  Removed all default values from all
          non-bool options.  New option "--configdir".  New variables
          "server_defaults" and "server_settings", read from
          "%(configdir)s/server.conf".  Let any supplied command line
          options override server settings.   Variable "defaults"
          renamed to "client_defaults", which is read from
          "clients.conf" instead of "mandos-clients.conf".  New global
          AvahiService object "service" replaces old global variables.
          Catch AvahiError and exit with error if caught.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Default settings for all clients.  These values are the default
2
 
# values, so uncomment and change them if you want different ones.
3
1
[DEFAULT]
4
 
 
5
 
# How long until a client is disabled and not be allowed to get the
6
 
# data this server holds.
7
 
;timeout = PT5M
8
 
 
9
 
# How often to run the checker to confirm that a client is still up.
10
 
# Note: a new checker will not be started if an old one is still
11
 
# running.  The server will wait for a checker to complete until the
12
 
# above "timeout" occurs, at which time the client will be disabled,
13
 
# and any running checker killed.
14
 
;interval = PT2M
15
 
 
16
 
# Extended timeout is an added timeout that is given once after a
17
 
# password has been sent sucessfully to a client.  This allows for
18
 
# additional delays caused by file system checks and quota checks.
19
 
;extended_timeout = PT15M
20
 
 
21
 
# What command to run as "the checker".
22
 
;checker = fping -q -- %%(host)s
23
 
 
24
 
# Whether to approve a client by default after the approval delay.
25
 
;approved_by_default = True
26
 
 
27
 
# How long to wait for approval.
28
 
;approval_delay = PT0S
29
 
 
30
 
# How long one approval will last.
31
 
;approval_duration = PT1S
32
 
 
33
 
# Whether this client is enabled by default
34
 
;enabled = True
35
 
 
36
 
 
37
 
;####
38
 
;# Example client
39
 
;[foo]
40
 
;
41
 
;# TLS public key ID
42
 
;key_id = f33fcbed11ed5e03073f6a55b86ffe92af0e24c045fb6e3b40547b3dc0c030ed
43
 
;
44
 
;# OpenPGP key fingerprint
45
 
;fingerprint =  7788 2722 5BA7 DE53 9C5A  7CFA 59CF F7CD BD9A 5920
46
 
;
47
 
;# This is base64-encoded binary data.  It will be decoded and sent to
48
 
;# the client matching the above fingerprint.  This should, of course,
49
 
;# be OpenPGP encrypted data, decryptable only by the client.
50
 
;secret =
51
 
;        hQIOA6QdEjBs2L/HEAf/TCyrDe5Xnm9esa+Pb/vWF9CUqfn4srzVgSu234
52
 
;        REJMVv7lBSrPE2132Lmd2gqF1HeLKDJRSVxJpt6xoWOChGHg+TMyXDxK+N
53
 
;        Xl89vGvdU1XfhKkVm9MDLOgT5ECDPysDGHFPDhqHOSu3Kaw2DWMV/iH9vz
54
 
;        3Z20erVNbdcvyBnuojcoWO/6yfB5EQO0BXp7kcyy00USA3CjD5FGZdoQGI
55
 
;        Tb8A/ar0tVA5crSQmaSotm6KmNLhrFnZ5BxX+TiE+eTUTqSloWRY6VAvqW
56
 
;        QHC7OASxK5E6RXPBuFH5IohUA2Qbk5AHt99pYvsIPX88j2rWauOokoiKZo
57
 
;        t/9leJ8VxO5l3wf/U64IH8bkPIoWmWZfd/nqh4uwGNbCgKMyT+AnvH7kMJ
58
 
;        3i7DivfWl2mKLV0PyPHUNva0VQxX6yYjcOhj1R6fCr/at8/NSLe2OhLchz
59
 
;        dC+Ls9h+kvJXgF8Sisv+Wk/1RadPLFmraRlqvJwt6Ww21LpiXqXHV2mIgq
60
 
;        WnR98YgSvUi3TJHrUQiNc9YyBzuRo0AjgG2C9qiE3FM+Y28+iQ/sR3+bFs
61
 
;        zYuZKVTObqiIslwXu7imO0cvvFRgJF/6u3HNFQ4LUTGhiM3FQmC6NNlF3/
62
 
;        vJM2hwRDMcJqDd54Twx90Wh+tYz0z7QMsK4ANXWHHWHR0JchnLWmenzbtW
63
 
;        5MHdW9AYsNJZAQSOpirE4Xi31CSlWAi9KV+cUCmWF5zOFy1x23P6PjdaRm
64
 
;        4T2zw4dxS5NswXWU0sVEXxjs6PYxuIiCTL7vdpx8QjBkrPWDrAbcMyBr2O
65
 
;        QlnHIvPzEArRQLo=
66
 
;
67
 
;# Host name; used only by the checker, not used by the server itself.
68
 
;host = foo.example.org
69
 
;####
70
 
 
71
 
;####
72
 
;# Another example client, named "bar".
73
 
;[bar]
74
 
;# The key ID is not space or case sensitive
75
 
;key_id = F33FCBED11ED5E03073F6A55B86FFE92 AF0E24C045FB6E3B40547B3DC0C030ED
76
 
;
77
 
;# The fingerprint is not space or case sensitive
78
 
;fingerprint = 3e393aeaefb84c7e89e2f547b3a107558fca3a27
79
 
;
80
 
;# If "secret" is not specified, a file can be read for the data.
81
 
;secfile = /etc/keys/mandos/bar-secret.bin
82
 
;
83
 
;# An IP address for host is also fine, if the checker accepts it.
84
 
;host = 192.0.2.3
85
 
;
86
 
;# Parameters from the [DEFAULT] section can be overridden per client.
87
 
;interval = PT1M
88
 
;
89
 
;# This client requires manual approval before it receives its secret.
90
 
;approved_by_default = False
91
 
;# Require approval within 30 seconds.
92
 
;approval_delay = PT30S
93
 
;####
 
2
timeout = 1h
 
3
interval = 5m
 
4
checker = fping -q -- %%(fqdn)s
 
5
 
 
6
# Example
 
7
[foo]
 
8
fingerprint = 3e393aeaefb84c7e89e2f547b3a107558fca3a27
 
9
secret = Base+64+encoded+OpenPGP+encrypted+data/=
 
10
# secfile = /etc/mandos/foo-secret.txt.asc
 
11
fqdn = foo.example.org
 
12
checker = fping -q -- %%(fqdn)s
 
13
timeout = 10m
 
14
 
 
15
[braxen_client]
 
16
fingerprint =  7788 2722 5BA7 DE53 9C5A  7CFA 59CF F7CD BD9A 5920
 
17
secret =
 
18
        hQIOA6QdEjBs2L/HEAf/TCyrDe5Xnm9esa+Pb/vWF9CUqfn4srzVgSu234REJMVv
 
19
        7lBSrPE2132Lmd2gqF1HeLKDJRSVxJpt6xoWOChGHg+TMyXDxK+NXl89vGvdU1Xf
 
20
        hKkVm9MDLOgT5ECDPysDGHFPDhqHOSu3Kaw2DWMV/iH9vz3Z20erVNbdcvyBnuoj
 
21
        coWO/6yfB5EQO0BXp7kcyy00USA3CjD5FGZdoQGITb8A/ar0tVA5crSQmaSotm6K
 
22
        mNLhrFnZ5BxX+TiE+eTUTqSloWRY6VAvqWQHC7OASxK5E6RXPBuFH5IohUA2Qbk5
 
23
        AHt99pYvsIPX88j2rWauOokoiKZot/9leJ8VxO5l3wf/U64IH8bkPIoWmWZfd/nq
 
24
        h4uwGNbCgKMyT+AnvH7kMJ3i7DivfWl2mKLV0PyPHUNva0VQxX6yYjcOhj1R6fCr
 
25
        /at8/NSLe2OhLchzdC+Ls9h+kvJXgF8Sisv+Wk/1RadPLFmraRlqvJwt6Ww21Lpi
 
26
        XqXHV2mIgqWnR98YgSvUi3TJHrUQiNc9YyBzuRo0AjgG2C9qiE3FM+Y28+iQ/sR3
 
27
        +bFszYuZKVTObqiIslwXu7imO0cvvFRgJF/6u3HNFQ4LUTGhiM3FQmC6NNlF3/vJ
 
28
        M2hwRDMcJqDd54Twx90Wh+tYz0z7QMsK4ANXWHHWHR0JchnLWmenzbtW5MHdW9AY
 
29
        sNJZAQSOpirE4Xi31CSlWAi9KV+cUCmWF5zOFy1x23P6PjdaRm4T2zw4dxS5NswX
 
30
        WU0sVEXxjs6PYxuIiCTL7vdpx8QjBkrPWDrAbcMyBr2OQlnHIvPzEArRQLo=
 
31
        =iHhv
 
32
fqdn = localhost
 
33
interval = 5m