Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log Wi-Fi state changes to the audit log #311

Merged
merged 5 commits into from
Jul 16, 2024

Conversation

corbin-phipps
Copy link
Contributor

@corbin-phipps corbin-phipps commented Jul 11, 2024

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

To log Wi-Fi state changes to the audit log. This is done at the neutral Ieee80211* layer in AccessPointControllerLinux for most of the Set* functions.

A debug ( AUDITD ) line is added to log which neutral type values will be attempted to be set, then after the values are set, the updated changes are validated. If successful, an info ( AUDITI ) line is added to log the successful changes. If unsuccessful (usually meaning the value retrieved by hostapd is not what was set), then a debug line is added to log the value that was retrieved.

Technical Details

  • Added several AUDITD and AUDITI lines in AccessPointControllerLinux.cxx as described above.
  • Added various Ieee80211*ToString() functions to Ieee80211.*xx.

Test Results

Verified that the following changes show up in the audit log:

  • Setting operational state
  • Setting PHY type
  • Setting SSID

Have not been able to verify that setting AKM suites and pairwise cipher suites works.

Tested these changes with netremote-cli wifi ap-enable wlo1 --phy 3 --akms 1027080 --sae password, netremote-cli wifi ap-disable wlo1, and netremote-cli wifi set-ssid wlo1 netremote2-ap-wlo1.

Reviewer Focus

None.

Future Work

  • Add WPA events to audit log (via OnWpaEvent callback).
  • Add access point events (such as AP added, removed, etc.) to audit log (via AccessPointManager).
  • Need to update HostapdBssConfiguration to use std::vector<WpaCipher for WpaPairwiseCipher and RsnPairwiseCipher. Currently, there is only a single WpaCipher for each.

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@corbin-phipps corbin-phipps changed the base branch from develop to user/corbinphipps/setup-audit-log July 12, 2024 16:12
Base automatically changed from user/corbinphipps/setup-audit-log to develop July 15, 2024 22:35
src/common/net/wifi/core/Ieee80211.cxx Show resolved Hide resolved
src/common/net/wifi/core/Ieee80211.cxx Outdated Show resolved Hide resolved
src/linux/net/wifi/core/AccessPointControllerLinux.cxx Outdated Show resolved Hide resolved
src/linux/net/wifi/core/AccessPointControllerLinux.cxx Outdated Show resolved Hide resolved
src/linux/net/wifi/core/AccessPointControllerLinux.cxx Outdated Show resolved Hide resolved
…m::enum_name; Use string_view; Move validation out of try/catch; Use aggregated string for key_mgmt log line; Use .back() = ';'
@corbin-phipps corbin-phipps marked this pull request as ready for review July 15, 2024 23:48
@corbin-phipps corbin-phipps requested a review from a team as a code owner July 15, 2024 23:48
@abeltrano abeltrano merged commit ae0d354 into develop Jul 16, 2024
1 of 4 checks passed
@abeltrano abeltrano deleted the user/corbinphipps/log-state-changes branch July 16, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants