Metadata-Version: 2.4
Name: fingerhost
Version: 1.0.0
Summary: A library to gather and generate several fingerprints about the execution environment
Home-page: https://github.com/inab/fingerhost
Author: José Mª Fernández
Author-email: jose.m.fernandez@bsc.es
License: LGPL-2.1
Project-URL: Bug Tracker, https://github.com/inab/fingerhost/issues
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# fingerhost

Trying to find an easy and unprivileged way to obtain fingerprints from the
execution environments, I realised there was no single, easy way to obtain
those fingerprints.

This software project provides the machinery to gather several kind of 
host fingerprints:

* [gethostid](https://man7.org/linux/man-pages/man3/gethostid.3.html) / [hostid](https://man7.org/linux/man-pages/man1/hostid.1.html).
  This is the most ancient standardised method to obtain a host fingerprint,
  which is currently deprecated in favour of [machine-id](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html),
  so most of the hosts are returning `007f0100`.

* [machine-id](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html).
  The file `/etc/machine-id` contains the value initialised by either [systemd-machine-id-setup](https://www.freedesktop.org/software/systemd/man/latest/systemd-machine-id-setup.html)
  or [dbus-uuidgen](https://dbus.freedesktop.org/doc/dbus-uuidgen.1.html).
  There are more details available at https://wiki.debian.org/MachineId .
  This system is the current de-facto standard, but it is unreliable on containerised
  environments (like docker or singularity instances) and high availability
  host environments, where the hosts are cloned from a based one and the
  contents of the file are not re-generated.

* _Location_: in several scenarios executions can happen both at the host
  and singularity containerised environments, giving the very same values
  for the `machine-id`, so it is worth detecting whether the execution
  happened within a container instance.

* _Fingerprints derived from block devices and mounted filesystems_: These
  fingerprints are both cheap and accurate, because they are based on disk
  ids, disk uuids and partition uuids located at `/dev/disk/`. Depending
  on the isolation of the location, they could be unavailable.
