Configure the PeSIT protocol settings of Gateway servers and partners
Proposed evolution
Let Manager carry the PeSIT protocol settings of Gateway servers and external PeSIT partners, so that a Gateway configuration managed by Manager can use the non-standard compatibility mode and the checkpoint, message size and TLS settings agreed with each partner.
Current behaviour (measured on 1.3.1)
Manager generates neither compatibilityMode, checkpointSize, checkpointWindow, maxMessageSize nor minTLSVersion for PeSIT local agents and remote agents. The constant PesitCompatibility is declared in pkg/integrations/gateway/config.go but never used.
The Gateway then applies its own defaults (Gateway 0.16.6, pkg/protocols/modules/pesit/proto_config.go): standard mode, 65535-byte checkpoints, a window of 2, 65535-byte messages, TLS 1.2 minimum.
Comparison of a production-like Gateway configuration (9 PeSIT-TLS servers, 28 partners) with the configuration generated by Manager for the same objects: 45 differences on servers and 140 on partners, all on these five settings. With a partner that requires the non-standard mode, the generated configuration cannot be used as is.
In addition, the configuration map of PeSIT local agents is never initialized (pkg/push/caches.go, addLocalAgent), which makes the generation panic as soon as a value is written in it (pesitPreConnectionUsage set to false on a Gateway interface).
Proposal
- New keys in the configuration of PeSIT and PeSIT-TLS interfaces:
pesitCompatibilityMode,pesitCheckpointSize,pesitCheckpointWindow,pesitMaxMessageSize, andpesitMinTLSVersion(PeSIT-TLS only). - Generation: the values of a Gateway server interface go to the configuration of the local agent; the values of an external partner's server interface go to the configuration of the remote agent, with the types expected by the Gateway. Empty values are not generated, so the Gateway defaults still apply.
- Validation when the interface is saved: compatibility mode
standardornon-standard; checkpoint size from 1 to 4294967295; checkpoint window from 1 to 255; message size from 1 to 65535; minimum TLS versionv1.0tov1.3, on PeSIT-TLS only. - The configuration map of local agents is initialized.
- Web interface: the five fields on PeSIT and PeSIT-TLS interfaces (fr and en). Documentation and changelog.
Acceptance criteria
- A Gateway PeSIT-TLS server interface with the five settings generates a local agent carrying them, with numeric values as numbers.
-
An external PeSIT-TLS server partner with the five settings generates a remote agent carrying them, next to
loginanduseNSDU. - Without settings, the generated configuration is unchanged.
- An invalid value is refused by the API with a field error.
-
Setting
pesitPreConnectionUsagetofalseon a Gateway interface no longer makes the generation panic.