Skip to content

Commit

Permalink
fixes WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
matzf committed Oct 6, 2023
1 parent ac43775 commit 794e1da
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 33 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``).
Format: 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
34 changes: 28 additions & 6 deletions doc/manuals/router.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Environment Variables

Disable :term:`BFD`, unconditionally consider the connection alive.

Format: bool

Applies to BFD sessions to all sibling routers (other routers in the same AS).
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.
Expand All @@ -66,7 +68,13 @@ Environment Variables

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

Default 3

TODO Format this nicely, and make it consistent (also with control.rst, other?).


Format: unsigned integer

Default: 3

Same applicability as above; can be overridden for specific inter-AS BFD sessions with
:option:`bfd.detect_mult <topology-json detect_mult>`.
Expand All @@ -75,7 +83,10 @@ Environment Variables

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

Default 200ms
Format:
ref:`duration <common-conf-duration>`
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>`.
Expand All @@ -88,14 +99,25 @@ Environment Variables

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.
.. 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.

.. 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**.

Default 5m

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

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 794e1da

Please sign in to comment.