Metadata-Version: 2.5
Name: trytond_mute
Version: 8.0.0.4
Summary: Category taxonomy and provenance registry of the mute DNS filtering group
Author: Clemens Hupka
Maintainer-email: Clemens Hupka <issues@tryton-erp.eu>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: blocklist,category,dns,filtering,provenance,tryton
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Description-Content-Type: text/x-rst

Category Taxonomy and Provenance Registry
=========================================

The ``mute`` module is the foundation of the mute group, the category
based DNS filtering suite of the deployment.  It carries no domain, no
evidence and no verdict of its own: it holds the *category taxonomy* a
domain is filed under, the *provenance registry* the rest of the family
reads to know where a fact about a domain came from, and the mapping
between the labels a third party uses and the categories of the
taxonomy.  Every other module of the group reads these two registries
instead of inventing its own, so that one verdict has one provenance and
one place in the taxonomy.

Features
--------

- **Category taxonomy**: ``mute.category`` is a hierarchy of the
  categories a domain is filed under.  A category carries the stable code
  the policy, the reports and the exports of the family refer to it by,
  the category it belongs to, the place it takes among its siblings and
  the action its domains fall under.  The rows are versioned, so a
  curator reads who moved a category, renamed it or changed its action,
  and when.
- **Configurable action**: the verdict a category implies is configured
  from the root of the tree down.  A category that names no action
  inherits the action of the nearest ancestor that names one, so the
  taxonomy is tuned at the level a deployment thinks in, and the family
  warns when the whole taxonomy names no action at all.
- **Source registry**: ``mute.source`` is the provenance of every fact
  the family holds.  A source names its kind - a community feed, the
  tags of OpenDNS, a list vendored into a module, a classifier, a
  heuristic, a curator, the suite itself - where it is fetched from, the
  licence its data is used under, how long its data may be old before it
  is stale, and who answers for it.
- **Trust weight**: how much the evidence of a source counts when the
  confidence of a domain is aggregated is the one figure of the registry
  a curation must not be able to turn.  It is read and written by the
  administration group of the module and by the built-in administrator
  of the deployment alone, and it is absent from the screens of the
  other two groups.
- **Mirror families**: the mirrors of one list name the same family, so
  that the aggregation saturates the family instead of adding its
  members up and a list that is fetched from three hosts does not count
  three times.  A source that names no family is a family of its own.
- **Source labels**: ``mute.source.category`` maps the label a source
  files a name under - an OpenDNS tag, the category of a community list -
  onto one category of the taxonomy, so that an import files what it
  reads without the taxonomy of the family following the vocabulary of
  every list.

Dependencies
------------

- Tryton modules: ``ir``, ``res``.

The module is a leaf of the group: it depends on ``ir`` and ``res`` and
on nothing else, because it is the data spine and not a consumer.  What
a domain is, how its evidence is combined into a confidence and what a
resolver is fed belong to the other modules of the group, which read the
taxonomy and the provenance registry from here.

Models
------

- ``mute.category``: one node of the taxonomy, with its code, its name,
  its parent, its sequence, its description and the action its domains
  fall under.
- ``mute.source``: one provenance, with its kind, its name, its URL, its
  licence, its trust weight, its mirror family, its staleness and its
  owner.
- ``mute.source.category``: the mapping of one label of one source onto
  one category of the taxonomy.

Access
------

- **Mute** (``group_mute_viewer``): reads the taxonomy and the registry
  and changes neither.
- **Mute Curation** (``group_mute_curator``): maintains the taxonomy,
  the sources and the mapping between them, and removes no registry row.
- **Mute Administration** (``group_mute_admin``): owns the module and
  sets the trust weight of a source.

The built-in administrator of the deployment (``res.group_admin``) holds
the module as well, so that a deployment whose administration carries
none of the three groups is never locked out of it.
