Skip to content

Commit 10fad90

Browse files
authored
Merge pull request #340 from atomicturtle/docs/issue-2137-gpg-verify
Fix for OSSEC issue #2137
2 parents 46ca83f + 0e3f1eb commit 10fad90

2 files changed

Lines changed: 53 additions & 2 deletions

File tree

docs/faq/installation.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,17 @@ The Windows GUI is asking me for a key, where do I get it?
3030
The Windows version of OSSEC is agent only, it cannot work without a server.
3131
The key can be obtained from the server using `manage_agents`.
3232

33+
34+
.. _faq_gpg_verify:
35+
36+
How do I verify the release tarball GPG signature?
37+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+
39+
Tarballs from `https://www.ossec.net/download-ossec/ <https://www.ossec.net/download-ossec/>`_
40+
and `GitHub Releases <https://github.com/ossec/ossec-hids/releases>`_ ship with a detached
41+
``.asc`` signature file. Import the public key published at
42+
`https://www.ossec.net/files/OSSEC-ARCHIVE-KEY.asc <https://www.ossec.net/files/OSSEC-ARCHIVE-KEY.asc>`_,
43+
then run ``gpg --verify`` on the tarball before installing.
44+
45+
Full step-by-step commands are in :ref:`install_source` under "Verify the tarball signature".
46+

docs/manual/installation/install-source.rst

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ More information on them can be found on the `OSSEC Architecture page <../ossec-
1616
Everything else is either comments or output.
1717

1818

19-
1. Download the latest version and verify its signature. Github releases may change the actual
20-
tarball downloads, so a checksum isn't a great way to verify it.
19+
1. Download the latest version and verify its GPG signature (see below).
2120

2221
2. Verify the requirements listed in :ref:`install_req` are installed or available.
2322

@@ -68,3 +67,41 @@ After the source tarball is downloaded and extracted:
6867
6968
Build options can still be passed to `make` (`USE_ZEROMQ`, `USE_GEOIP`, etc.).
7069

70+
71+
Verify the tarball signature
72+
============================
73+
74+
Release tarballs are signed with a GPG key. The detached signature file (``.asc``)
75+
is published alongside each release on `GitHub Releases <https://github.com/ossec/ossec-hids/releases>`_
76+
and on `https://www.ossec.net/download-ossec/ <https://www.ossec.net/download-ossec/>`_.
77+
78+
Import the signing key from the official OSSEC site (do not rely on keyservers;
79+
``gpg --recv-key`` may fail for this key with a "contains no user ID" error):
80+
81+
.. code-block:: console
82+
83+
curl -O https://www.ossec.net/files/OSSEC-ARCHIVE-KEY.asc
84+
gpg --import OSSEC-ARCHIVE-KEY.asc
85+
86+
Download the tarball and matching signature for the release you are installing.
87+
Replace ``VERSION`` with the release tag (for example ``4.1.0``):
88+
89+
.. code-block:: console
90+
91+
curl -LO https://github.com/ossec/ossec-hids/releases/download/VERSION/ossec-hids-VERSION.tar.gz
92+
curl -LO https://github.com/ossec/ossec-hids/releases/download/VERSION/ossec-hids-VERSION.tar.gz.asc
93+
gpg --verify ossec-hids-VERSION.tar.gz.asc ossec-hids-VERSION.tar.gz
94+
95+
A successful verification prints ``Good signature`` from
96+
``Scott R. Shinn <scott@atomicorp.com>``. GPG may also warn that the key is
97+
not certified with a trusted signature until you assign trust locally; that
98+
warning is expected on a first import.
99+
100+
The signing key fingerprint is:
101+
102+
.. code-block:: console
103+
104+
B50F B194 7A0A E311 45D0 5FAD EE1B 0E6B 2D83 87B7
105+
106+
Only proceed with ``install.sh`` or ``make install`` after the signature verifies.
107+
See also :ref:`faq_gpg_verify`.

0 commit comments

Comments
 (0)