summaryrefslogtreecommitdiff
path: root/docs/systems/webstatic.rst
blob: 1e25064a7dfd31dba01d08a6f9b26b0ff91cbf11 (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
.. index::
   single: Systems; Webstatic

=========
Webstatic
=========

Purpose
=======

This system provides a web server for serving static content. HTTP requests
for this system are proxied through :doc:`web` which also handles TLS
termination and redirects from http scheme URLs to https.

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

Code Documentation
   https://codedocs.cacert.org/

Funding
   https://funding.cacert.org/

Infrastructure Documentation
   https://infradocs.cacert.org/

CAcert internal Debian repository
   https://webstatic.infra.cacert.org/

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

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

* Primary: :ref:`people_jandd`
* Secondary: None

.. todo:: find an additional admin

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

+---------------+---------------------+
| Application   | Administrator(s)    |
+===============+=====================+
| Apache httpd  | :ref:`people_jandd` |
+---------------+---------------------+

Contact
-------

* webstatic-admin@cacert.org

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

No additional people have access to this machine.

Basics
======

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

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

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

:IP Internet: reverse proxied from :doc:`web`
:IP Intranet: :ip:v4:`172.16.2.116`
:IP Internal: :ip:v4:`10.0.0.116`
:MAC address: :mac:`00:ff:67:39:23:f2` (eth0)

.. seealso::

   See :doc:`../network`

.. index::
   single: Monitoring; Webstatic

Monitoring
----------

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

DNS
---

.. index::
   single: DNS records; Webstatic

=========================== ======== ====================================================================
Name                        Type     Content
=========================== ======== ====================================================================
codedocs.cacert.org.        IN CNAME web.cacert.org.
funding.cacert.org.         IN CNAME web.cacert.org.
infradocs.cacert.org.       IN CNAME web.cacert.org.
webstatic.cacert.org.       IN A     213.154.225.242
webstatic.cacert.org.       IN SSHFP 1 1 30897A7A984D8350495946D54C6374E9331237EF
webstatic.cacert.org.       IN SSHFP 1 2 32BB10C5CF48532D077066E012230058DDF3CCE731C561F228E310EB7A546E3F
webstatic.cacert.org.       IN SSHFP 2 1 868361A51EC60607BFD964D0F8F3E4EE5E803FC6
webstatic.cacert.org.       IN SSHFP 2 2 A173BB85EC19F63ECB273BCA130EF63501FE1B89FD55B62997195E6816CAB547
webstatic.cacert.org.       IN SSHFP 3 1 7FC847CEC20B9D65296D4A0EDAFBA22A14EE9DC4
webstatic.cacert.org.       IN SSHFP 3 2 68879264E0ED5D0914797BF2292436FB32CCA24683DCF5D927A53589C1BFB6D7
webstatic.intra.cacert.org. IN A     172.16.2.116
=========================== ======== ====================================================================

.. seealso::

   See :wiki:`SystemAdministration/Procedures/DNSChanges`

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

.. index::
   single: Debian GNU/Linux; Buster
   single: Debian GNU/Linux; 10.4

* Debian GNU/Linux 10.4

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     | application                |
+----------+---------+---------+----------------------------+
| 5665/tcp | icinga2 | monitor | remote monitoring service  |
+----------+---------+---------+----------------------------+

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

.. index::
   single: apache httpd
   single: cron
   single: dbus
   single: exim
   single: icinga2
   single: openssh
   single: puppet
   single: rsyslog

+----------------+---------------------------------------+----------------------------------+
| Service        | Usage                                 | Start mechanism                  |
+================+=======================================+==================================+
| Apache httpd   | Webserver for static content          | systemd unit ``apache2.service`` |
+----------------+---------------------------------------+----------------------------------+
| cron           | job scheduler                         | systemd unit ``cron.service``    |
+----------------+---------------------------------------+----------------------------------+
| dbus-daemon    | System message bus daemon             | systemd unit ``dbus.service``    |
+----------------+---------------------------------------+----------------------------------+
| Exim           | SMTP server for local mail submission | systemd unit ``exim4.service``   |
+----------------+---------------------------------------+----------------------------------+
| icinga2        | Icinga2 monitoring agent              | systemd unit ``icinga2.service`` |
+----------------+---------------------------------------+----------------------------------+
| openssh server | ssh daemon for remote administration  | systemd unit ``ssh.service``     |
+----------------+---------------------------------------+----------------------------------+
| Puppet agent   | configuration management agent        | systemd unit ``puppet.service``  |
+----------------+---------------------------------------+----------------------------------+
| rsyslog        | syslog daemon                         | systemd unit ``rsyslog.service`` |
+----------------+---------------------------------------+----------------------------------+

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

* :doc:`jenkins` for publishing code documentation to codedocs.cacert.org and
  infrastructure documentation to infradocs.cacert.org
* :doc:`monitor`
* :doc:`web` as reverse proxy for hostnames funding.cacert.org and
  infradocs.cacert.org
* :doc:`email` as reverse proxy for the hostname community.cacert.org

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

* DNS (53) resolver at 10.0.0.1 (:doc:`infra02`)
* :doc:`emailout` as SMTP relay
* :doc:`puppet` (tcp/8140) as Puppet master
* :doc:`proxyout` as HTTP proxy for APT

Security
========

.. sshkeys::
   :RSA:     SHA256:MrsQxc9IUy0HcGbgEiMAWN3zzOcxxWHyKOMQ63pUbj8 MD5:da:e7:16:f9:98:b0:77:4f:38:a6:49:35:a5:5a:2a:c2
   :DSA:     SHA256:oXO7hewZ9j7LJzvKEw72NQH+G4n9VbYplxleaBbKtUc MD5:12:a5:87:27:6b:2f:e3:cd:d6:e5:fb:f2:43:2f:7c:be
   :ECDSA:   SHA256:aIeSZODtXQkUeXvyKSQ2+zLMokaD3PXZJ6U1icG/ttc MD5:5e:94:ad:e8:84:3b:e2:b0:0b:7f:44:ec:a9:99:95:b2
   :ED25519: SHA256:NC34l1qSufrBdjxjJk75oOnmhrQW1VkLILsOhJle77A MD5:da:58:d0:89:23:6f:ca:f7:b2:5f:a3:51:2f:6b:95:0d

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

+-------------------+---------------------------------------------------+
| Role              | Purpose                                           |
+===================+===================================================+
| jenkins-infradocs | Used by :doc:`jenkins` to upload documentation to |
|                   | :file:`/var/www/codedocs.cacert.org/html/` and    |
|                   | :file:`/var/www/infradocs.cacert.org/html/`       |
+-------------------+---------------------------------------------------+

.. todo:: manage ``jenkins-infradocs`` user via Puppet

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

The Puppet agent package and a few dependencies are installed from the official
Puppet APT repository because the versions in Debian are too old to use modern
Puppet features.

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

Apache httpd is configured with a minimum of enabled modules to allow serving
static content and nothing else to reduce potential security risks.

Access to the jenkins-infradocs user is gated by a defined ssh key.

The system uses third party packages with a good security track record and
regular updates. The attack surface is small due to the tightly restricted
access to the system. The puppet agent is not exposed for access from outside
the system.

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

The system configuration is managed via Puppet profiles. There should be no
configuration items outside of the :cacertgit:`cacert-puppet`.

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

The host does not provide own TLS services and therefore has no certificates.

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

Apache configuration is managed via the Puppet profile
``profiles::static_websites``.

Debian repository configuration
-------------------------------

The Debian repository is managed via the Puppet profile
``profiles::debarchive``. Packages that are uploaded to
:file:`/srv/upload/incoming` are automatically processed by
:program:`inoticoming` and :program:`reprepro`. Only packages signed by a known
PGP key (managed via Puppet) are accepted and provided at
https://webstatic.infra.cacert.org/.

The repository signing key is stored in
:file:`/srv/debarchive/.gnupg/private-keys-v1.d/223894064EE26851A245DE9208C5C0ABF772F7A7.key`.

Tasks
=====

Changes
=======

Planned
-------

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

* No plans

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

.. seealso::

   * :wiki:`Exim4Configuration`

References
----------

* http://httpd.apache.org/docs/2.4/
* https://manpages.debian.org/buster/inoticoming/inoticoming.1.en.html
* https://manpages.debian.org/buster/reprepro/reprepro.1.en.html