Wireless-Innovation-Forum / 6-GHz-AFC

This repository contains code and data for testing the compliance of Automated Frequency Coordinator (AFC) software. The AFC is defined by the FCC in proceeding 18-295 on Unlicensed Use of the 6 GHz Band. This repository contains procedures, documentation, and tests for such software, and for the devices authorized by it. To contribute, please first read the CONTRIBUTING file in the repository for instructions.
14 stars 3 forks source link

Add options for client authentication, harness configuration #20

Closed AEgbert closed 1 year ago

AEgbert commented 1 year ago

This PR replaces the existing PycURL AFC communication implementation derived from the CBRS test harness with a new version built on the Requests library. The new implementation supports using no client authentication, client certificates, and custom client authentication methods implementing the Request library's AuthBase interface. The new implementation can be configured using the new cfg/afc.toml file, which replaces the original afc.cfg file. An example custom method is provided in auth/custom_auth.py for reference.

This PR also introduces additional configuration options for the test harness, allowing the tests_to_run() function and input/output directories to be overridden (cfg/harness.toml). Alternate locations of the harness and afc configuration files can be passed as command-line parameters to test_main.py (--harness_cfg and --sut_cfg respectively).

The new configuration files use the TOML specification and are parsed using tomli. Note: while a standard TOML parser based on tomli was added to Python 3.11, it is unavailable in Python 3.10. If the harness requirements are updated to Python 3.11 in the future, I recommend modifying the harness to use the standard tomllib.

Documentation of the changes is provided in the updated README and in the newly added configuration and implementation files.

AEgbert commented 1 year ago

Note that the current implementation does not impose non-default constraints on the TLS version or cipher suites used for communication. If desired, these can be added: see 1, 2, 3.

My recommendation would be to add these constraints to a later PR if desired, so that others can begin using the new configuration sooner rather than later.

AEgbert commented 1 year ago

Merged in #20 for visibility purposes