Skip to content

Commit

Permalink
doc: fix envvar documentation, fix references
Browse files Browse the repository at this point in the history
Fix duplicate envvar documentation (envvars can only have one definition
in rst), and expand the description. Consistent formatting for envvar
documentation.
Move the description of the duration string format to the common
section, as it's referenced by multiple components (currently control
service and router).

Fix reference to spao.
  • Loading branch information
matzf committed Oct 10, 2023
1 parent a2e449b commit c8ba430
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 37 deletions.
22 changes: 22 additions & 0 deletions doc/manuals/common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,28 @@ of the individual fields below.
.. option:: addr = <ip:port>, required

See ``control_service.addr``, above.

.. _common-conf-duration:

Duration Format
===============

Where duration values are loaded from configuration options, the following format is expected:

.. code-block::
[\-0-9]+(y|w|d|h|m|s|ms|us|µs|ns)
The unit suffixes have their usual meaning of ``y`` year, ``w`` week, ``d`` day, ``h`` hour,
``m`` minute, ``s`` second, ``ms`` millisecond, ``us`` or ``µs`` microsecond, and ``ns`` nanosecond.

Mixed unit durations are not supported (e.g. ``1h10m10s`` is not supported).
The long duration units are simple factors, not calendar offsets:

- ``d`` is always 24 hours
- ``w`` is always 7 days
- ``y`` is always 365 days

.. _common-http-api:

HTTP API
Expand Down
29 changes: 3 additions & 26 deletions doc/manuals/control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Environment variables
This can only work correctly if the same value is set for all connected control services in the
test network.

The format is a :ref:`duration <control-conf-duration>` with unit suffix (e.g. ``10s``).
:Type: :ref:`duration <common-conf-duration>`

Configuration
=============
Expand Down Expand Up @@ -264,7 +264,7 @@ considers the following options.

.. option:: ca.service.lifetime = <duration> (Default: "10m")

Validity period (a :ref:`duration <control-conf-duration>`) of JWT authorization tokens
Validity period (a :ref:`duration <common-conf-duration>`) of JWT authorization tokens
for the CA service.

.. option:: ca.service.client_id = <string> (Default: general.id)
Expand Down Expand Up @@ -315,7 +315,7 @@ considers the following options.

Expiration of cached entries in nanoseconds.

**TODO:** this should be changed to accept values in :ref:`duration format <control-conf-duration>`.
**TODO:** this should be changed to accept values in :ref:`duration format <common-conf-duration>`.

.. object:: drkey

Expand Down Expand Up @@ -775,29 +775,6 @@ There is one top-level entry for each type of metadata, all of which are optiona

A free form string to communicate interesting/important information to other network operators.


.. _control-conf-duration:

Duration Format
---------------

Where duration values are loaded from configuration options, the following format is expected:

.. code-block::
[\-0-9]+(y|w|d|h|m|s|ms|us|µs|ns)
The unit suffixes have their usual meaning of ``y`` year, ``w`` week, ``d`` day, ``h`` hour,
``m`` minute, ``s`` second, ``ms`` millisecond, ``us`` or ``µs`` microsecond, and ``ns`` nanosecond.

Mixed unit durations are not supported (e.g. ``1h10m10s`` is not supported).
The long duration units are simple factors, not calendar offsets:

- ``d`` is always 24 hours
- ``w`` is always 7 days
- ``y`` is always 365 days


Port table
==========

Expand Down
41 changes: 31 additions & 10 deletions doc/manuals/router.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,40 +62,61 @@ Environment Variables
Can be overridden for specific inter-AS BFD sessions with :option:`bfd.disable <topology-json disable>`
in an interface entry in the ``topology.json`` configuration.

:Type: bool (``0``/``f``/``F``/``FALSE``/``false``/``False``, ``1``/``t``/``T``/``TRUE``/``true``/``True``)
:Default: ``false``

.. envvar:: SCION_EXPERIMENTAL_BFD_DETECT_MULT

Set the :term:`BFD` detection time multiplier.

Default 3

Same applicability as above; can be overridden for specific inter-AS BFD sessions with
:option:`bfd.detect_mult <topology-json detect_mult>`.

:Type: unsigned integer
:Default: ``3``

.. envvar:: SCION_EXPERIMENTAL_BFD_DESIRED_MIN_TX

Defines the frequence at which this router should send :term:`BFD` control messages.

Default 200ms

Same applicability as above; can be overridden for specific inter-AS BFD sessions with
:option:`bfd.desired_min_tx_interval <topology-json desired_min_tx_interval>`.

:Type: :ref:`duration <common-conf-duration>`
:Default: ``200ms``

.. envvar:: SCION_EXPERIMENTAL_BFD_REQUIRED_MIN_RX

Defines an frequence at which this router should send :term:`BFD` control messages.

Default 200ms

Same applicability as above; can be overridden for specific inter-AS BFD sessions with
:option:`bfd.required_min_rx_interval <topology-json required_min_rx_interval>`.
.. envvar:: SCION_TESTING_DRKEY_EPOCH_DURATION

Defines the global DRKey :ref:`Epoch<drkey-epoch>` duration that the border router
assumes.
:Type: :ref:`duration <common-conf-duration>`
:Default: ``200ms``

.. object:: SCION_TESTING_DRKEY_EPOCH_DURATION

For **testing only**.
This option relates to :ref:`DRKey-based authentication of SCMPs <scmp-authentication>` in the
router, which is **experimental** and currently **incomplete**.

Override the global duration for :doc:`/cryptography/drkey` epochs.
This environment variable also applies to :program:`control`, see :envvar:`SCION_TESTING_DRKEY_EPOCH_DURATION`.

:Type: :ref:`duration <common-conf-duration>`

.. envvar:: SCION_TESTING_ACCEPTANCE_WINDOW

Defines the acceptance window following the :ref:`SPAO specification<spao-absTime>`.
For **testing only**.
This option relates to :ref:`DRKey-based authentication of SCMPs <scmp-authentication>` in the
router, which is **experimental** and currently **incomplete**.

Defines the length of the window around the current time for which SCMP authentication timestamps
are accepted. See :ref:`SPAO specification <spao-absTime>`.

:Type: :ref:`duration <common-conf-duration>`
:Default: 5m

Configuration
=============
Expand Down
2 changes: 1 addition & 1 deletion doc/protocols/authenticator-option.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Timestamp / Sequence Number:
(See :ref:`Appendix<spao-appendix>` for a more detailed explanation about the field interpretation).
The timestamp MAY be used to compute the absolute time (*AbsTime*) value,
which corresponds to the time when the packet was sent.
The section :ref:`Absolute time derivation<spao-timestamp>` describes the derivation of *AbsTime* and
The section :ref:`Absolute time derivation<spao-absTime>` describes the derivation of *AbsTime* and
the associated DRKey.

The receiver SHOULD drop packets with *AbsTime* outside of a locally chosen
Expand Down

0 comments on commit c8ba430

Please sign in to comment.