Skip to content

Commit d421e38

Browse files
amar-nordicnordicjm
authored andcommitted
wifi: Update the doc for enterprise mode
Update the documentation for the wifi for Enterprise-Mode security configuration Signed-off-by: Amit Arora <[email protected]>
1 parent 8c1c740 commit d421e38

File tree

2 files changed

+189
-0
lines changed

2 files changed

+189
-0
lines changed

doc/nrf/app_dev/device_guides/nrf70/wifi_advanced_security_modes.rst

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,194 @@ The client and the authentication server exchange certificates to authenticate e
2121
See `Zephyr Wi-Fi management`_ for more information on how to configure and use the Wi-Fi enterprise security mode.
2222

2323

24+
.. _ug_nrf70_wifi_enterprise_mode:
25+
26+
Enterprise mode testing on linux using hostapd
27+
==============================================
28+
29+
Enterprise mode for Wi-Fi is used in business environments or larger networks, which require enhanced security and centralized management of users by utilizing Public Key Infrastructure (PKI).
30+
31+
Prerequisites
32+
-------------
33+
34+
To use this mode, ensure that the following prerequisites are met:
35+
36+
* RADIUS server in addition to self-signed local certificate(s) and private key for both server-side and client-side (for EAP-TLS).
37+
* Wi-Fi Access Point (AP) that supports Enterprise mode.
38+
* nRF70 Series device with certificates for Enterprise mode available in the :file:`zephyr/samples/net/wifi/test_certs` folder.
39+
40+
RADIUS server configuration
41+
---------------------------
42+
43+
Hostapd is an open-source user space software that provides an integrated RADIUS server, which can be used to simplify the setup for Enterprise mode.
44+
Therefore, in the following example, hostapd is used as a RADIUS server (authentication server) to verify Enterprise mode functionality with the nRF7002 DK, along with commercial or test access points as the Authenticator.
45+
46+
Hostapd installation
47+
--------------------
48+
49+
To install hostapd, complete the following steps:
50+
51+
1. Install hostapd by using the following commands:
52+
53+
.. code-block:: console
54+
55+
git clone git://w1.fi/hostap.git
56+
57+
cd hostap/hostapd
58+
59+
cp defconfig .config
60+
61+
#. Edit the :file:`.config` file for hostapd to use it as a RADIUS server by using the following commands:
62+
63+
.. code-block:: console
64+
65+
Comment (by adding #) the following configurations
66+
#CONFIG_DRIVER_HOSTAP=y
67+
#CONFIG_DRIVER_NL80211=y
68+
#CONFIG_LIBNL32=y
69+
70+
Enable the following configurations (by removing # from the front)
71+
CONFIG_DRIVER_NONE=y
72+
CONFIG_RADIUS_SERVER=y
73+
CONFIG_EAP_PSK=y
74+
CONFIG_EAP_PWD=y
75+
CONFIG_EAP_GPSK_SHA256=y
76+
CONFIG_EAP_FAST=y
77+
78+
Add the following configurations
79+
CONFIG_PEERKEY=y
80+
CONFIG_IEEE80211W=y
81+
82+
Verify required EAP Types are enabled
83+
"CONFIG_EAP=y"
84+
"CONFIG_EAP_TLS=y"
85+
"CONFIG_EAP_PEAP=y"
86+
"CONFIG_EAP_TTLS=y"
87+
88+
Build the hostapd executable
89+
----------------------------
90+
91+
To build the hostapd executable, complete the following steps:
92+
93+
1. Build the hostapd executable by using the following commands:
94+
95+
.. code-block:: console
96+
97+
make clean ; make
98+
99+
#. Copy the certificates for EAP-TLS to the hostapd folder by using the following commands:
100+
101+
.. code-block:: bash
102+
103+
cp zephyr/samples/net/wifi/test_certs/* hostap/hostapd/
104+
105+
touch hostapd.eap_user_tls
106+
107+
vim hostapd.eap_user_tls
108+
109+
$ cat hostapd.eap_user_tls
110+
# Phase 1 users
111+
* TLS
112+
113+
touch tls.conf
114+
115+
vim tls.conf
116+
117+
$ cat tls.conf
118+
# Building hostapd as a standalone RADIUS server
119+
driver=none
120+
# RADIUS clients configuration
121+
radius_server_clients=hostapd.radius_clients
122+
radius_server_auth_port=1812
123+
# Enable eap_server when we use hostapd integrated EAP server instead of external RADIUS authentication
124+
eap_server=1
125+
# EAP server user database
126+
eap_user_file=hostapd.eap_user_tls
127+
# CA certificate
128+
ca_cert=ca.pem
129+
# Server certificate
130+
server_cert=server.pem
131+
# Private key matching with the server certificate
132+
private_key=server-key.pem
133+
# Passphrase for private key
134+
private_key_passwd=whatever
135+
logger_syslog=-1
136+
logger_syslog_level=2
137+
logger_stdout=-1
138+
logger_stdout_level=2
139+
ctrl_interface=/var/run/hostapd
140+
ctrl_interface_group=0
141+
142+
vim hostapd.radius_clients
143+
144+
$ cat hostapd.radius_clients
145+
RADIUS client configuration for the RADIUS server
146+
0.0.0.0/0 whatever
147+
148+
Run the hostapd
149+
---------------
150+
151+
Run hostapd by using the following commands, assuming that **eno1** is the laptop interface connected to the AP (Authenticator) through Ethernet.
152+
153+
.. code-block:: bash
154+
155+
./hostapd -i eno1 tls.conf
156+
157+
#To enable debug messages and Key data
158+
./hostapd -i eno1 tls.conf -ddK
159+
160+
161+
Wi-Fi access point configuration
162+
---------------------------------
163+
164+
Configure an access point with WPA2-Enterprise authentication method using the following parameters:
165+
166+
* Server IP address - IP address of the RADIUS (hostapd) server
167+
* Server port - 1812
168+
* Connection secret - whatever
169+
* Protected Management Frames (PMF) - Capable (for WPA2-Enterprise), Required (for WPA3-Enterprise)
170+
171+
Build the nRF70 Series DK for Shell sample with Enterprise mode
172+
----------------------------------------------------------------
173+
174+
To build the nRF70 Series DK for the :ref:`wifi_shell_sample` sample with Enterprise mode, complete the following steps:
175+
176+
1. Verify that the client-side certificates required for EAP-TLS are available by using the following commands:
177+
178+
.. code-block:: bash
179+
180+
ls -l zephyr/samples/net/wifi/test_certs
181+
182+
cd nrf/samples/wifi/shell
183+
184+
west build -p -b nrf7002dk/nrf5340/cpuapp -- -DEXTRA_CONF_FILE=overlay-enterprise.conf -DCONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_DBG=y -DCONFIG_LOG_MODE_IMMEDIATE=y
185+
186+
west flash
187+
188+
#. Connect to the WPA3-Enterprise AP by using the following commands:
189+
190+
.. code-block:: console
191+
192+
wifi connect -s <SSID> -k 7 -a anon -K whatever -S 2 -w 2
193+
194+
Example:
195+
196+
.. code-block:: console
197+
198+
wifi connect -s WPA3-ENT_ZEPHYR_5 -k 7 -a anon -K whatever -S 2 -w 2
199+
200+
#. Connect the DK to the WPA2-Enterprise AP by using the following command:
201+
202+
.. code-block:: console
203+
204+
wifi connect -s <SSID> -k 7 -a anon -K whatever
205+
206+
Example:
207+
208+
.. code-block:: console
209+
210+
wifi connect -s WPA2-ENT_ZEPHYR_2 -k 7 -a anon -K whatever
211+
24212
.. _ug_nrf70_developing_wifi_psa_support:
25213

26214
Platform Security Architecture (PSA) crypto support

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Developing with nRF70 Series
7878

7979
* Added support for the nRF7002 EB II (PCA63571) with the nRF54 Series DKs as detailed in :ref:`ug_nrf7002eb2_gs`.
8080
* Deprecated support for the nRF7002 EB (PCA63561) with the nRF54 Series DKs.
81+
* Added a new section :ref:`ug_nrf70_wifi_enterprise_mode` in the :ref:`ug_nrf70_wifi_advanced_security_modes` page.
8182
* Removed support for storing the nRF70 firmware patches in external flash without the :ref:`partition_manager`, as mentioned in :ref:`ug_nrf70_developing_fw_patch_ext_flash`.
8283

8384
Developing with nRF54L Series

0 commit comments

Comments
 (0)