summaryrefslogtreecommitdiff
path: root/docs/systems/test.rst
blob: b33cea94d303d652fb6d422a4971a6ec043eab50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
.. index::
   single: Systems; test

====
Test
====

Purpose
=======

This is a test system for the software from cacertgit:`cacert-devel`'s
*release* branch running on www.cacert.org.

Application Links
-----------------

Application
     https://test.cacert.org/

Administration
==============

System Administration
---------------------

* Primary: :ref:`people_wytze`
* Secondary: :ref:`people_jandd`


Application Administration
--------------------------

+------------------------+---------------------------------------+
| Application            | Administrator(s)                      |
+========================+=======================================+
| CAcert web application | :ref:`people_dirk`, :ref:`people_ted` |
+------------------------+---------------------------------------+

Contact
-------

* test-admin@cacert.org

Additional People
-----------------

:ref:`people_dirk`, :ref:`people_gukk`, :ref:`people_mario`,
:ref:`people_mendel`, :ref:`people_neo` and :ref:`people_ted` have
:program:`sudo` access on that machine too.

Basics
======

Physical Location
-----------------

This system is located in an :term:`LXC` container on physical machine
:doc:`infra02`.

Logical Location
----------------

:IP Internet: :ip:v4:`213.154.225.248`
:IP Intranet: :ip:v4:`172.16.2.248`
:IP Internal: :ip:v4:`10.0.0.248`
:IPv6:        :ip:v6:`2001:7b8:616:162:2::248`
:MAC address: :mac:`00:ff:91:10:5d:cd` (eth0)

.. seealso::

   See :doc:`../network`

.. index::
   single: Monitoring; Test

Monitoring
----------

:internal checks: :monitor:`test.infra.cacert.org`

DNS
---

.. index::
   single: DNS records; Test

====================== ======== ============================================
Name                   Type     Content
====================== ======== ============================================
test.cacert.org.       IN A     213.154.225.248
test.cacert.org.       IN SSHFP 1 1 11BCB0AB4D1FD39547426D9527B88AFB8FF85209
test.cacert.org.       IN SSHFP 2 1 3414C17E5AE898B2F5DB7B3DDF9E34C2F5E816AC
test.intra.cacert.org. IN A     172.16.2.248
test.infra.cacert.org. IN A     10.0.0.248
====================== ======== ============================================

.. todo:: add AAAA record for IPv6 address

.. seealso::

   See :wiki:`SystemAdministration/Procedures/DNSChanges`

Operating System
----------------

.. index::
   single: Debian GNU/Linux; Jessie
   single: Debian GNU/Linux; 8.11

* Debian GNU/Linux 8.11

Services
========

Listening services
------------------

+----------+---------+---------+-------------------------------------------+
| Port     | Service | Origin  | Purpose                                   |
+==========+=========+=========+===========================================+
| 22/tcp   | ssh     | ANY     | admin console access                      |
+----------+---------+---------+-------------------------------------------+
| 25/tcp   | smtp    | local   | mail delivery to local MTA                |
+----------+---------+---------+-------------------------------------------+
| 80/tcp   | http    | ANY     | Apache httpd for http://test.cacert.org/  |
+----------+---------+---------+-------------------------------------------+
| 123/tcp  | ntp     | local   | network time protocol server              |
| 123/udp  |         |         |                                           |
+----------+---------+---------+-------------------------------------------+
| 143/tcp  | imap    | testmgr | Dovecot IMAP server                       |
+----------+---------+---------+-------------------------------------------+
| 443/tcp  | https   | ANY     | Apache httpd for https://test.cacert.org/ |
+----------+---------+---------+-------------------------------------------+
| 993/tcp  | imaps   | testmgr | Dovecot IMAP server                       |
+----------+---------+---------+-------------------------------------------+
| 3306/tcp | mysql   | local   | MySQL database for ...                    |
+----------+---------+---------+-------------------------------------------+
| 5666/tcp | nrpe    | monitor | remote monitoring service                 |
+----------+---------+---------+-------------------------------------------+

Running services
----------------

.. index::
   single: Apache
   single: MySQL
   single: Postfix
   single: atop
   single: client.pl
   single: cron
   single: dovecot
   single: nrpe
   single: ntpd
   single: openssh
   single: rsyslog
   single: signer.pl
   single: socat

+----------------+--------------------------------+----------------------------------------+
| Service        | Usage                          | Start mechanism                        |
+================+================================+========================================+
| Apache httpd   | Webserver for the CAcert       | init script                            |
|                | web application                | :file:`/etc/init.d/apache2`            |
+----------------+--------------------------------+----------------------------------------+
| MySQL          | MySQL database server          | init script                            |
|                | for the CAcert web application | :file:`/etc/init.d/mysql`              |
+----------------+--------------------------------+----------------------------------------+
| Postfix        | SMTP server for local mail     | init script                            |
|                | submission                     | :file:`/etc/init.d/postfix`            |
+----------------+--------------------------------+----------------------------------------+
| atop           | atop process accounting top    | init script                            |
|                |                                | :file:`/etc/init.d/atop`               |
+----------------+--------------------------------+----------------------------------------+
| client.pl      | CAcert signer client           | init script                            |
|                |                                | :file:`/etc/init.d/commmodule`         |
+----------------+--------------------------------+----------------------------------------+
| cron           | job scheduler                  | init script                            |
|                |                                | :file:`/etc/init.d/cron`               |
+----------------+--------------------------------+----------------------------------------+
| dovecot        | Dovecot IMAP server            | init script                            |
|                |                                | :file:`/etc/init.d/dovecot`            |
+----------------+--------------------------------+----------------------------------------+
| Nagios NRPE    | remote monitoring              | init script                            |
| server         | service queried by             | :file:`/etc/init.d/nagios-nrpe-server` |
|                | :doc:`monitor`                 |                                        |
+----------------+--------------------------------+----------------------------------------+
| ntpd           | Network time protocol server   | init script                            |
|                |                                | :file:`/etc/init.d/ntp`                |
+----------------+--------------------------------+----------------------------------------+
| openssh server | ssh daemon for remote          | init script :file:`/etc/init.d/ssh`    |
|                | administration                 |                                        |
+----------------+--------------------------------+----------------------------------------+
| rsyslog        | syslog daemon                  | init script                            |
|                |                                | :file:`/etc/init.d/syslog`             |
+----------------+--------------------------------+----------------------------------------+
| server.pl      | CAcert signer server           | init script                            |
|                |                                | :file:`/etc/init.d/commmodule-signer`  |
+----------------+--------------------------------+----------------------------------------+
| socat          | Emulate serial connection      | entry in                               |
|                | between CAcert signer          | :file:`/etc/rc.local` that executes    |
|                | client and server              | :file:`/usr/local/sbin/socat-signer`   |
|                |                                | inside a :program:`screen` session     |
+----------------+--------------------------------+----------------------------------------+

Databases
---------

+-------+--------+------------------------+
| RDBMS | Name   | Used for               |
+=======+========+========================+
| MySQL | cacert | CAcert web application |
+-------+--------+------------------------+

Connected Systems
-----------------

* :doc:`monitor`
* :doc:`testmgr` has access to imap and MySQL

Outbound network connections
----------------------------

* :doc:`infra02` as resolving nameserver
* :doc:`proxyout` as HTTP proxy for APT and Github
* crl.cacert.org (rsync) for getting CRLs
* ocsp.cacert.org (HTTP and HTTPS) for OCSP queries
* arbitrary Internet SMTP servers for outgoing mail

Security
========

.. todo:: add the SHA-256 fingerprints of the SSH host keys

.. sshkeys::
   :RSA:   fd:19:a1:64:ae:ef:c2:50:a2:be:a4:c5:9f:f7:9d:98
   :DSA:   1c:8c:39:5e:9e:0b:db:8e:c3:66:89:e3:3d:94:5e:13
   :ECDSA: ac:fb:c8:88:d1:dd:e5:38:99:34:7b:29:54:e1:f2:f1

.. todo:: add ED25519 key for test

Dedicated user roles
--------------------

.. If the system has some dedicated user groups besides the sudo group used for
   administration it should be documented here Regular operating system groups
   should not be documented

+--------------+----------------------------+
| User         | Purpose                    |
+==============+============================+
| cacertmail   | IMAP mailbox user          |
+--------------+----------------------------+
| cacertsigner | User for the CAcert signer |
+--------------+----------------------------+

.. todo::

   clarify why the signer software on test is currently running as the root
   user

The directory :file:`/home/cacert/` is owned by root. The signer is running
from :file:`/home/signer/cacert-devel/CommModule/server.pl` the client is
running from :file:`/home/cacert/www/CommModule/client.pl`. Both are running as
root. Currently no process uses the *cacertsigner* user.

Non-distribution packages and modifications
-------------------------------------------

Apache httpd is running in a chroot :file:`/home/cacert/`, the configuration in
:file:`/etc/apache2` as well as the system binaries are not used. The Apache
httpd binary seems to be relatively up-to-date.

The CAcert web application code as well as the CAcert signer client code come
from :cacertgit:`cacert-devel`'s *release* branch.

The signer in :file:`/home/signer/cacert-devel/CommModule/server.pl` has a few
uncommitted manual modifications. And the whole working copy in
`/home/signer/cacert-devel` is based on an old repository at
git://git-cacert.it-sls.de/cacert-devel.git that is no longer available. The
last commit in the working copy is::

   commit 2262fe14e4bf1e0afb4ab7f9340e18a9f281ddfe
   Merge: c33bbc5 a3d0b8a
   Author: Michael Tänzer <neo@nhng.de>
   Date:   Wed Apr 10 00:03:42 2013 +0200

       Merge branch 'bug-1159' into signer

.. todo::

   integrate or revert the changes to server.pl on test, use the current
   *release* branch version from :cacertgit:`cacert-devel`

Risk assessments on critical packages
-------------------------------------

The operating system on this container is no longer supported. The PHP version
in the file:`/home/cacert/` chroot is 5.6.38 which is no longer supported
upstream

Critical Configuration items
============================

Keys and X.509 certificates
---------------------------

.. sslcert:: cats.test.cacert.org
   :altnames:   DNS:cats.test.cacert.org
   :certfile:   /home/cacert/etc/ssl/certs/cats_test_cacert_org.crt
   :keyfile:    /home/cacert/etc/ssl/private/cats_test_cacert_org.pem
   :serial:     50DD
   :expiration: Oct  4 07:07:08 2020 GMT
   :sha1fp:     3C:93:F3:83:25:AA:99:7A:65:A0:69:EF:41:FE:DF:EB:01:F1:2F:6F
   :issuer:     CAcert Testserver Root

.. sslcert:: mgr.test.cacert.org
   :altnames:   DNS:mgr.test.cacert.org
   :certfile:   /home/cacert/etc/ssl/certs/mgr_test_cacert_org.crt
   :keyfile:    /home/cacert/etc/ssl/private/mgr_test_cacert_org.pem
   :serial:     50DC
   :expiration: Oct  4 07:07:08 2020 GMT
   :sha1fp:     ED:44:E6:4C:C2:D3:E1:32:3D:2F:03:9F:19:DD:F3:B1:18:32:60:F6
   :issuer:     CAcert Testserver Root

.. sslcert:: secure.test.cacert.org
   :altnames:   DNS:secure.test.cacert.org
   :certfile:   /home/cacert/etc/ssl/certs/secure_test_cacert_org.crt
   :keyfile:    /home/cacert/etc/ssl/private/secure_test_cacert_org.pem
   :serial:     50DB
   :expiration: Oct  4 07:07:08 2020 GMT
   :sha1fp:     FB:83:D6:AF:6E:12:C7:94:D5:5A:2C:27:28:49:D3:65:6E:AE:90:FA
   :issuer:     CAcert Testserver Root

.. sslcert:: test.cacert.org (dovecot)
   :certfile:   /etc/dovecot/dovecot.pem
   :keyfile:    /etc/dovecot/private/dovecot.pem
   :serial:     C362AEFE86DA5BFE
   :expiration: Jun 26 12:38:31 2024 GMT
   :sha1fp:     1E:60:68:36:53:BC:95:A8:35:AC:A0:38:09:69:29:74:10:52:04:1A
   :issuer:     test.cacert.org

.. sslcert:: test.cacert.org
   :altnames:   DNS:test.cacert.org
   :certfile:   /home/cacert/etc/ssl/certs/test_cacert_org.crt
   :keyfile:    /home/cacert/etc/ssl/private/cacert.pem
   :serial:     50DA
   :expiration: Oct  4 07:07:08 2020 GMT
   :sha1fp:     86:A9:00:E3:31:96:B9:8A:FC:83:00:F0:AE:02:8A:20:57:2D:8F:A1
   :issuer:     CAcert Testserver Root

**CA certificates on test**:

.. sslcert:: CAcert Testserver Root
   :certfile:   /etc/ssl/CA/cacert.crt
   :keyfile:    /etc/ssl/CA/cacert.pem
   :serial:     00
   :expiration: Mar 26 20:45:20 2021 GMT
   :sha1fp:     5B:26:E7:61:8C:C1:A1:EB:F3:E1:28:22:03:7A:D6:9B:55:53:C3:9B
   :issuer:     CAcert Testserver Root

.. sslcert:: CAcert Testserver Root
   :certfile:   /etc/ssl/CA/root_256.crt
   :keyfile:    /etc/ssl/CA/cacert.pem
   :serial:     0F
   :expiration: Mar 26 20:45:20 2021 GMT
   :sha1fp:     5E:7E:EE:06:07:0A:F6:A1:49:F9:E1:B1:13:14:D8:C2:A3:3C:07:52
   :issuer:     CAcert Testserver Root

.. sslcert:: CAcert Testserver Class 3
   :altnames:
   :certfile:   /etc/ssl/class3/cacert.md5.crt
   :keyfile:    /etc/ssl/class3/cacert.pem
   :serial:     01
   :expiration: Mar 26 22:06:10 2021 GMT
   :sha1fp:     F5:72:FF:19:C8:B5:3C:7C:29:1A:8D:90:92:09:5F:DD:24:C6:F8:41
   :issuer:     CAcert Testserver Root

.. sslcert:: CAcert Testserver Class 3
   :altnames:
   :certfile:   /etc/ssl/class3/cacert.crt
   :keyfile:    /etc/ssl/class3/cacert.pem
   :serial:     101B
   :expiration: Apr 28 18:25:09 2021 GMT
   :sha1fp:     52:F9:80:58:5F:55:A0:F6:51:F0:A2:BC:75:20:FE:2C:48:96:79:55
   :issuer:     CAcert Testserver Root

.. note::

   There are two directories :file:`/etc/root3/` and :file:`/etc/root4/` that
   are supported by the signer but do not contain actual keys and certificates.

.. seealso::

   * :wiki:`SystemAdministration/CertificateList`

openssl configuration for the signer server
-------------------------------------------

There are some openssl configuration files that are used by the server.pl
signer that are stored in :file:`/etc/ssl/{caname}-{purpose}.cnf`.

.. todo::

   check whether the openssl configuration files on test are equal to those in
   http://svn.cacert.org/CAcert/SystemAdministration/signer/ssl/

Apache httpd configuration
--------------------------

Apache httpd is running in a chroot :file:`/home/cacert/` its configuration is
stored in :file:`/home/cacert/etc/apache2`.

Postfix configuration
---------------------

Postfix configuration is stored in :file:`/etc/postfix`.

Postfix is configured to accept mail for ``test.cacert.org`` and ``localhost``
all mail is delivered to the mailbox of the *cacertmail* user in
:file:`/var/mail/cacertmail` via :file:`/etc/postfix/virtual.regexp`.

Dovecot configuration
---------------------

Dovecot is configured to use pam for authentication and to support SSL and IMAP
and to use mbox style mailboxes in /var/mail/%u in the following files:

- :file:`/etc/dovecot/conf.d/10-auth.conf`
- :file:`/etc/dovecot/conf.d/10-mail.conf`
- :file:`/etc/dovecot/conf.d/20-imap.conf`
- :file:`/etc/dovecot/conf.d/auth-system.conf`

.. note::

   dovecot uses an old self-signed certificate for test.cacert.org

Tasks
=====

Changes
=======

Planned
-------

.. todo::

   Upgrade test to Debian Stretch when the software is ready.


System Future
-------------

.. * No plans

Additional documentation
========================

.. seealso::

   * :wiki:`PostfixConfiguration`
   * https://codedocs.cacert.org/

References
----------

Apache httpd documentation
  http://httpd.apache.org/docs/2.4/
Apache Debian wiki page
  https://wiki.debian.org/Apache
Dovecot documentation
  https://wiki2.dovecot.org/FrontPage
openssl documentation
  https://www.openssl.org/docs/
Postfix documentation
  http://www.postfix.org/documentation.html
Postfix Debian wiki page
  https://wiki.debian.org/Postfix