Skip to content

Commit

Permalink
Update docs after the changes
Browse files Browse the repository at this point in the history
- iqdisc for 2 modules
- updated option format
  • Loading branch information
chrzaszcz committed Feb 7, 2022
1 parent 6106cbf commit 4bb0778
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 18 deletions.
1 change: 0 additions & 1 deletion doc/configuration/Modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ There are some modules that don't support dynamic domains for now.
These must **not** be enabled when using host types in `modules` or [`host_config.modules`](./host_config.md#host_configmodules) sections:

* [mod_event_pusher](../modules/mod_event_pusher.md)
* [mod_extdisco](../modules/mod_extdisco.md)
* [mod_global_distrib](../modules/mod_global_distrib.md)
* [mod_jingle_sip](../modules/mod_jingle_sip.md)
* [mod_pubsub](../modules/mod_pubsub.md)
Expand Down
4 changes: 4 additions & 0 deletions doc/migrations/5.0.0_5.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ See the [auth configuration](../configuration/auth.md) for details.

The rules for overriding global options in the `host_config` section have been simplified. The `auth` section and the `s2s.address` and `s2s.host_policy` options now completely override the corresponding general settings instead of being merged with them.

### Extension modules

* `mod_auth_token` has a new configuration format - if you are using this module, amend the [`validity_period`](../modules/mod_auth_token.md#modulesmod_auth_tokenvalidity_period) option.

## Async workers

The `async_writer` flag of MAM is now a section on its own, that absorbs previous flags related to it: `flush_interval`, `max_batch_size` and `pool_size` now become subelements of the `async_writer` section, with one more parameter, `enabled`. Below an example:
Expand Down
21 changes: 13 additions & 8 deletions doc/modules/mod_auth_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@ Generation of keys necessary to sign binary tokens is delegated to module `mod_k

## Options

### `modules.mod_auth_token.iqdisc.type`
* **Syntax:** string, one of `"one_queue"`, `"no_queue"`, `"queues"`, `"parallel"`
* **Default:** `"no_queue"`

Strategy to handle incoming IQ stanzas. For details, please refer to
[IQ processing policies](../configuration/Modules.md#iq-processing-policies).

### `modules.mod_auth_token.validity_period`
* **Syntax:** Array of TOML tables with the following keys: `token`, `value`, `unit` and following values: {token = `values: "access", "refresh", "provision"`, value = `non-negative integer`, unit = `values: "days", "hours", "minutes", "seconds"`}.
* **Default:** `[{token = "access", value = 1, unit = "hours"}, {token = "refresh", value = 25, unit = "days"}]`
* **Example:** `[{token = "access", value = 13, unit = "minutes"}, {token = "refresh", value = 13, unit = "days"}]`
* **Syntax:** TOML table. Each key is either `access` or `refresh`. Each value is a nested TOML table with the following mandatory keys: `value` (non-negative integer) and `unit` (`"days"`, `"hours"`, `"minutes"` or `"seconds"`).
* **Default:** `{access = {value = 1, unit = "hours"}, refresh = {value = 25, unit = "days"}}`
* **Example:** `validity_period.access = {value = 30, unit = "minutes"}`

Validity periods of access and refresh tokens can be defined independently.
Validity periods of access and refresh tokens can be defined independently - specifying one of them does not change the default value for the other one.
Validity period configuration for provision tokens happens outside the module since the server does not generate provision tokens - it only validates them.

### Required keys
Expand Down Expand Up @@ -156,8 +163,6 @@ Access token validity can't be sidestepped right now.

```toml
[modules.mod_auth_token]
validity_period = [
{token = "access", value = 13, unit = "minutes"},
{token = "refresh", value = 13, unit = "days"}
]
validity_period.access = {value = 13, unit = "minutes"}
validity_period.refresh = {value = 13, unit = "days"}
```
33 changes: 24 additions & 9 deletions doc/modules/mod_extdisco.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,59 @@
Implements [XEP-0215: External Service Discovery](http://xmpp.org/extensions/xep-0215.html) for discovering information about services external to the XMPP network.
The main use-case is to help discover STUN/TURN servers to allow for negotiating media exchanges.

!!! warning
This module does not support [dynamic domains](../configuration/general.md#generalhost_types).

## Options

### `modules.mod_extdisco.service.type`
### `modules.mod_extdisco.iqdisc.type`
* **Syntax:** string, one of `"one_queue"`, `"no_queue"`, `"queues"`, `"parallel"`
* **Default:** `"no_queue"`

Strategy to handle incoming IQ stanzas. For details, please refer to
[IQ processing policies](../configuration/Modules.md#iq-processing-policies).

### `modules.mod_extdisco.service`
* **Syntax:** TOML array with one table for each advertised service - see below for details.
* **Default:** `[]` - no services advertised

### Service options

Each advertised service is specified as a TOML table containing the following options listed below.

#### `modules.mod_extdisco.service.type`
* **Syntax:** string
* **Default:** none, this option is required
* **Example:** `type = "stun"`

Service type, common values are `"stun"`, `"turn"`, `"ftp"`.

### `modules.mod_extdisco.service.host`
#### `modules.mod_extdisco.service.host`
* **Syntax:** string
* **Default:** none, this option is required
* **Example:** `host = "192.168.0.2"`

Hostname or an IP address where the service is hosted.

### `modules.mod_extdisco.service.port`
#### `modules.mod_extdisco.service.port`
* **Syntax:** string
* **Default:** none, this option is recommended
* **Example:** `port = "3478"`

The communications port to be used at the host.

### `modules.mod_extdisco.service.transport`
#### `modules.mod_extdisco.service.transport`
* **Syntax:** string, one of `"udp"`, `"tcp"`
* **Default:** none, this option is optional
* **Example:** `transport = "udp"`

The underlying transport protocol to be used when communicating with the service.

### `modules.mod_extdisco.service.username`
#### `modules.mod_extdisco.service.username`
* **Syntax:** string
* **Default:** none, this option is optional
* **Example:** `username = "username"`

A service-generated username for use at the service.

### `modules.mod_extdisco.service.password`
#### `modules.mod_extdisco.service.password`
* **Syntax:** string
* **Default:** none, this option is optional
* **Example:** `password = "password"`
Expand All @@ -53,20 +65,23 @@ A service-generated password for use at the service.

```toml
[modules.mod_extdisco]

[[modules.mod_extdisco.service]]
type = "stun"
host = "127.0.0.1"
port = 3478
transport = "udp"
username = "username"
password = "password"

[[modules.mod_extdisco.service]]
type = "stun"
host = "stun.host.com"
port = 3478
transport = "tcp"
username = "username2"
password = "password2"

[[modules.mod_extdisco.service]]
type = "turn"
host = "turn.host.com"
Expand Down

0 comments on commit 4bb0778

Please sign in to comment.