# RFC 9946 §11: Security Considerations

The 8 Requirements of RFC 9946 §11, each quoted from the RFC with its state and the tests that prove it. [Conformance](index.md) explains the states.

| State | Requirements |
|---|--:|
| Tested | 6 |
| Deviation | 1 |
| Operational | 1 |

## RFC9946-11-1 {#RFC9946-11-1}

**Operational**

> Cooperating client and server hosts and agreements to test the path between the hosts are REQUIRED.

Note: Agreements between the parties; authentication (Section 5.3) is one way to assure them.

## RFC9946-11-2 {#RFC9946-11-2}

**Tested**

> It is REQUIRED to have a user client-initiated setup handshake between cooperating hosts that allows firewalls to control inbound unsolicited UDP traffic that goes to either a control port or ephemeral ports that are only created as needed.

Note: Test Setup exchange (Section 6); Ephemeral Ports opened per Test Connection.

Proving tests:

- [`crates/udpstp/tests/loopback.rs::test_connections_use_ports_from_the_configured_range`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp/tests/loopback.rs)
- [`crates/udpstp-core/tests/setup_exchange.rs::unauthenticated_setup_ends_in_ack_with_a_test_port_when_both_ends_opt_in`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/setup_exchange.rs)

## RFC9946-11-3 {#RFC9946-11-3}

**Tested**

> Client-server authentication and integrity protection for feedback messages conveying measurements is RECOMMENDED.

Note: authMode 2 (Section 5.3.2).

Proving tests:

- [`crates/udpstp-core/tests/auth_mode_default.rs::a_server_without_mode_2_is_reported_and_the_client_does_not_fall_back`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/auth_mode_default.rs)
- [`crates/udpstp-core/tests/mode2_status.rs::each_status_pdu_is_signed_with_its_sender_s_key`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/mode2_status.rs)

## RFC9946-11-4 {#RFC9946-11-4}

**Tested**

> Hosts MUST limit the number of simultaneous tests to avoid resource exhaustion and inaccurate results.

Note: Server limits on Tests and Test Connections.

Conformance Records: [per-test-cap-over-the-tests-life](../conformance/interpretations.md#per-test-cap-over-the-tests-life), [admitted-rate-reserved-at-activation](../conformance/interpretations.md#admitted-rate-reserved-at-activation), [max-test-share-of-the-rate-cap](../conformance/interpretations.md#max-test-share-of-the-rate-cap), [unactivated-test-connection-share](../conformance/interpretations.md#unactivated-test-connection-share).

Proving tests:

- [`crates/udpstp-core/src/admission.rs::a_cap_full_of_activated_tests_still_refuses`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/src/admission.rs)
- [`crates/udpstp-core/tests/admission_limits.rs::a_test_connection_over_the_per_test_cap_is_refused_with_connfail`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/admission_limits.rs)
- [`crates/udpstp-core/tests/admission_limits.rs::a_test_connection_over_the_global_cap_is_refused_with_connfail`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/admission_limits.rs)
- [`crates/udpstp-core/tests/unactivated_share.rs::a_new_setup_evicts_the_oldest_unactivated_test_connection`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/unactivated_share.rs)

## RFC9946-11-5 {#RFC9946-11-5}

**Tested**

> Senders MUST be rate-limited.

Note: The Sending Rate Table bounds every rate.

Conformance Records: [search-capped-at-stated-max-bandwidth](../conformance/interpretations.md#search-capped-at-stated-max-bandwidth), [consumer-start-row-capped](../conformance/interpretations.md#consumer-start-row-capped).

Proving tests:

- [`crates/udpstp-core/tests/algorithm_capped.rs::a_cap_above_1_gbps_stops_at_the_row_within_it`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/algorithm_capped.rs)
- [`crates/udpstp-core/tests/upstream.rs::a_client_keeps_to_its_max_bandwidth_against_a_server_that_assigns_more`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/upstream.rs)

## RFC9946-11-6 {#RFC9946-11-6}

**Deviation**

> Testing with the Service Provider's measurement hosts SHOULD be limited in frequency and/or overall volume of test traffic (for example, the range of test interval duration values should be limited).

Recorded in [no-frequency-or-volume-quotas](../conformance/deviations.md#no-frequency-or-volume-quotas).

Proving tests:

- [`crates/udpstp-core/src/admission.rs::the_quota_refills_over_the_quota_period`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/src/admission.rs)
- [`crates/udpstp-core/tests/quotas.rs::a_source_past_its_quota_of_tests_is_refused_with_connfail`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/quotas.rs)
- [`crates/udpstp-core/tests/quotas.rs::a_source_past_its_quota_of_bytes_is_refused`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/quotas.rs)
- [`crates/udpstp-core/tests/quotas.rs::tests_set_up_together_past_the_quota_are_refused_at_activation`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/quotas.rs)
- [`crates/udpstp-core/tests/quotas.rs::a_key_past_its_quota_is_refused`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/quotas.rs)
- [`crates/udpstp-core/tests/test_interval_limits.rs::an_ordinary_key_gets_at_most_60_s`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/test_interval_limits.rs)

## RFC9946-11-L1 {#RFC9946-11-L1}

**Tested**

> This can be accomplished using a pre-built table defining all the offered sending rates that will be supported.

Note: The Sending Rate Table.

Proving tests:

- [`crates/udpstp-core/tests/sending_rate_table.rs::row_n_is_n_mbps_up_to_1_gbps`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/sending_rate_table.rs)

## RFC9946-11-L2 {#RFC9946-11-L2}

**Tested**

> Optionally, the server could utilize the maxBandwidth field (and the CHSR_USDIR_BIT bit) in the Setup Request from the client to limit the maximum that it will attempt to achieve.

Note: maxBandwidth field (Section 6.1).

Conformance Records: [search-capped-at-stated-max-bandwidth](../conformance/interpretations.md#search-capped-at-stated-max-bandwidth).

Proving tests:

- [`crates/udpstp-core/tests/algorithm_capped.rs::fast_mode_stops_at_the_row_matching_max_bandwidth`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/algorithm_capped.rs)
- [`crates/udpstp-core/tests/algorithm_capped.rs::the_cap_masks_the_direction_bit`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/algorithm_capped.rs)
- [`crates/udpstp-core/tests/algorithm_capped.rs::single_steps_stop_at_the_cap`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/algorithm_capped.rs)
- [`crates/udpstp-core/tests/algorithm_capped.rs::a_start_row_above_the_cap_is_coerced_to_it`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/algorithm_capped.rs)
- [`crates/udpstp-core/tests/algorithm_capped.rs::a_fixed_rate_above_the_cap_is_coerced_to_it`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/algorithm_capped.rs)
- [`crates/udpstp-core/tests/algorithm_capped.rs::a_cap_above_1_gbps_stops_at_the_row_within_it`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/algorithm_capped.rs)
- [`crates/udpstp-core/tests/test_share.rs::a_consumer_s_test_may_hold_half_the_cap`](https://github.com/pederbe/udpstp/blob/c88fe32e0973594682a069c58de24fd703714277/crates/udpstp-core/tests/test_share.rs)

