NM.SettingWirelessSecurity¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
[ |
r/w |
||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
[ |
r/w |
||
r/w/en |
|||
[ |
r/w |
||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class NM.SettingWirelessSecurity(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Wi-Fi Security Settings
- classmethod new()¶
- Returns:
the new empty
NM.SettingWirelessSecurity
object- Return type:
Creates a new
NM.SettingWirelessSecurity
object with default values.
- add_group(group)¶
- Parameters:
group (
str
) – the encryption algorithm to add, one of “wep40”, “wep104”, “tkip”, or “ccmp”- Returns:
True
if the algorithm was added to the list,False
if it was already in the list- Return type:
Adds an encryption algorithm to the list of allowed groupwise encryption algorithms. If the list is not empty, then only access points that support one or more of the encryption algorithms in the list will be considered compatible with this connection.
- add_pairwise(pairwise)¶
- Parameters:
pairwise (
str
) – the encryption algorithm to add, one of “tkip” or “ccmp”- Returns:
True
if the algorithm was added to the list,False
if it was already in the list- Return type:
Adds an encryption algorithm to the list of allowed pairwise encryption algorithms. If the list is not empty, then only access points that support one or more of the encryption algorithms in the list will be considered compatible with this connection.
- add_proto(proto)¶
- Parameters:
proto (
str
) – the protocol to add, one of “wpa” or “rsn”- Returns:
True
if the protocol was new and was added to the allowed protocol list, orFalse
if it was already in the list- Return type:
Adds a Wi-Fi security protocol (one of “wpa” or “rsn”) to the allowed list; only protocols in this list will be used when finding and connecting to the Wi-Fi network specified by this connection. For example, if the protocol list contains only “wpa” but the access point for the SSID specified by this connection only supports WPA2/RSN, the connection cannot be used with the access point.
- clear_groups()¶
Removes all algorithms from the allowed list. If there are no algorithms specified then all groupwise encryption algorithms are allowed.
- clear_pairwise()¶
Removes all algorithms from the allowed list. If there are no algorithms specified then all pairwise encryption algorithms are allowed.
- clear_protos()¶
Removes all protocols from the allowed list. If there are no protocols specified then all protocols are allowed.
- get_auth_alg()¶
- Returns:
the
NM.SettingWirelessSecurity
:auth-alg
property of the setting- Return type:
- get_fils()¶
- Returns:
the
NM.SettingWirelessSecurity
:fils
property of the setting- Return type:
New in version 1.12.
- get_group(i)¶
- Parameters:
i (
int
) – index of an item in the allowed groupwise encryption algorithm list- Returns:
the groupwise encryption algorithm at index i
- Return type:
Returns the allowed groupwise encryption algorithm from allowed algorithm list.
- get_key_mgmt()¶
- Returns:
the
NM.SettingWirelessSecurity
:key-mgmt
property of the setting- Return type:
- get_leap_password()¶
- Returns:
the
NM.SettingWirelessSecurity
:leap-password
property of the setting- Return type:
- get_leap_password_flags()¶
- Returns:
the
NM.SettingSecretFlags
pertaining to theNM.SettingWirelessSecurity
:leap-password
- Return type:
- get_leap_username()¶
- Returns:
the
NM.SettingWirelessSecurity
:leap-username
property of the setting- Return type:
- get_num_groups()¶
- Returns:
the number of groupwise encryption algorithms in the allowed list
- Return type:
- get_num_pairwise()¶
- Returns:
the number of pairwise encryption algorithms in the allowed list
- Return type:
- get_num_protos()¶
- Returns:
the number of security protocols this connection allows when connecting to secure Wi-Fi networks
- Return type:
- get_pairwise(i)¶
- Parameters:
i (
int
) – index of an item in the allowed pairwise encryption algorithm list- Returns:
the pairwise encryption algorithm at index i
- Return type:
Returns the allowed pairwise encryption algorithm from allowed algorithm list.
- get_pmf()¶
- Returns:
the
NM.SettingWirelessSecurity
:pmf
property of the setting- Return type:
New in version 1.10.
- get_proto(i)¶
- get_psk()¶
- Returns:
the
NM.SettingWirelessSecurity
:psk
property of the setting- Return type:
- get_psk_flags()¶
- Returns:
the
NM.SettingSecretFlags
pertaining to theNM.SettingWirelessSecurity
:psk
- Return type:
- get_wep_key(idx)¶
- get_wep_key_flags()¶
- Returns:
the
NM.SettingSecretFlags
pertaining to the all WEP keys- Return type:
- get_wep_key_type()¶
- Returns:
the
NM.SettingWirelessSecurity
:wep-key-type
property of the setting- Return type:
- get_wep_tx_keyidx()¶
- Returns:
the
NM.SettingWirelessSecurity
:wep-tx-keyidx
property of the setting- Return type:
- get_wps_method()¶
- Returns:
the
NM.SettingWirelessSecurity
:wps-method
property of the setting- Return type:
New in version 1.10.
- remove_group(i)¶
- Parameters:
i (
int
) – the index of an item in the allowed groupwise encryption algorithm list
Removes an encryption algorithm from the allowed groupwise encryption algorithm list.
- remove_group_by_value(group)¶
- Parameters:
group (
str
) – the encryption algorithm to remove, one of “wep40”, “wep104”, “tkip”, or “ccmp”- Returns:
True
if the algorithm was found and removed;False
if it was not.- Return type:
Removes an encryption algorithm from the allowed groupwise encryption algorithm list.
- remove_pairwise(i)¶
- Parameters:
i (
int
) – the index of an item in the allowed pairwise encryption algorithm list
Removes an encryption algorithm from the allowed pairwise encryption algorithm list.
- remove_pairwise_by_value(pairwise)¶
- Parameters:
pairwise (
str
) – the encryption algorithm to remove, one of “tkip” or “ccmp”- Returns:
True
if the encryption algorithm was found and removed;False
if it was not.- Return type:
Removes an encryption algorithm from the allowed pairwise encryption algorithm list.
- remove_proto(i)¶
- Parameters:
i (
int
) – index of the protocol to remove
Removes a protocol from the allowed protocol list.
- remove_proto_by_value(proto)¶
- Parameters:
proto (
str
) – the protocol to remove, one of “wpa” or “rsn”- Returns:
True
if the protocol was found and removed;False
if it was not.- Return type:
Removes a protocol from the allowed protocol list.
- set_wep_key(idx, key)¶
- Parameters:
idx (
int
) – the index of the key (0..3 inclusive)key (
str
) – the WEP key as a string, in either hexadecimal, ASCII, or passphrase form as determined by the value of theNM.SettingWirelessSecurity
:wep-key-type
property.
Sets a WEP key in the given index.
Property Details¶
- NM.SettingWirelessSecurity.props.auth_alg¶
- Name:
auth-alg
- Type:
- Default Value:
- Flags:
When WEP is used (ie, key-mgmt = “none” or “ieee8021x”) indicate the 802.11 authentication algorithm required by the AP here. One of “open” for Open System, “shared” for Shared Key, or “leap” for Cisco LEAP. When using Cisco LEAP (ie, key-mgmt = “ieee8021x” and auth-alg = “leap”) the “leap-username” and “leap-password” properties must be specified.
- NM.SettingWirelessSecurity.props.fils¶
- Name:
fils
- Type:
- Default Value:
0
- Flags:
Indicates whether Fast Initial Link Setup (802.11ai) must be enabled for the connection. One of
NM.SettingWirelessSecurityFils.DEFAULT
(use global default value),NM.SettingWirelessSecurityFils.DISABLE
(disable FILS),NM.SettingWirelessSecurityFils.OPTIONAL
(enable FILS if the supplicant and the access point support it) orNM.SettingWirelessSecurityFils.REQUIRED
(enable FILS and fail if not supported). When set toNM.SettingWirelessSecurityFils.DEFAULT
and no global default is set, FILS will be optionally enabled.New in version 1.12.
- NM.SettingWirelessSecurity.props.group¶
-
A list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of “wep40”, “wep104”, “tkip”, or “ccmp”.
- NM.SettingWirelessSecurity.props.key_mgmt¶
- Name:
key-mgmt
- Type:
- Default Value:
- Flags:
Key management used for the connection. One of “none” (WEP or no password protection), “ieee8021x” (Dynamic WEP), “owe” (Opportunistic Wireless Encryption), “wpa-psk” (WPA2 + WPA3 personal), “sae” (WPA3 personal only), “wpa-eap” (WPA2 + WPA3 enterprise) or “wpa-eap-suite-b-192” (WPA3 enterprise only).
This property must be set for any Wi-Fi connection that uses security.
- NM.SettingWirelessSecurity.props.leap_password¶
- Name:
leap-password
- Type:
- Default Value:
- Flags:
The login password for legacy LEAP connections (ie, key-mgmt = “ieee8021x” and auth-alg = “leap”).
- NM.SettingWirelessSecurity.props.leap_password_flags¶
- Name:
leap-password-flags
- Type:
- Default Value:
- Flags:
Flags indicating how to handle the
NM.SettingWirelessSecurity
:leap-password
property.
- NM.SettingWirelessSecurity.props.leap_username¶
- Name:
leap-username
- Type:
- Default Value:
- Flags:
The login username for legacy LEAP connections (ie, key-mgmt = “ieee8021x” and auth-alg = “leap”).
- NM.SettingWirelessSecurity.props.pairwise¶
-
A list of pairwise encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of “tkip” or “ccmp”.
- NM.SettingWirelessSecurity.props.pmf¶
- Name:
pmf
- Type:
- Default Value:
0
- Flags:
Indicates whether Protected Management Frames (802.11w) must be enabled for the connection. One of
NM.SettingWirelessSecurityPmf.DEFAULT
(use global default value),NM.SettingWirelessSecurityPmf.DISABLE
(disable PMF),NM.SettingWirelessSecurityPmf.OPTIONAL
(enable PMF if the supplicant and the access point support it) orNM.SettingWirelessSecurityPmf.REQUIRED
(enable PMF and fail if not supported). When set toNM.SettingWirelessSecurityPmf.DEFAULT
and no global default is set, PMF will be optionally enabled.New in version 1.10.
- NM.SettingWirelessSecurity.props.proto¶
-
List of strings specifying the allowed WPA protocol versions to use. Each element may be one “wpa” (allow WPA) or “rsn” (allow WPA2/RSN). If not specified, both WPA and RSN connections are allowed.
- NM.SettingWirelessSecurity.props.psk¶
- Name:
psk
- Type:
- Default Value:
- Flags:
Pre-Shared-Key for WPA networks. For WPA-PSK, it’s either an ASCII passphrase of 8 to 63 characters that is (as specified in the 802.11i standard) hashed to derive the actual key, or the key in form of 64 hexadecimal character. The WPA3-Personal networks use a passphrase of any length for SAE authentication.
- NM.SettingWirelessSecurity.props.psk_flags¶
- Name:
psk-flags
- Type:
- Default Value:
- Flags:
Flags indicating how to handle the
NM.SettingWirelessSecurity
:psk
property.
- NM.SettingWirelessSecurity.props.wep_key0¶
- Name:
wep-key0
- Type:
- Default Value:
- Flags:
Index 0 WEP key. This is the WEP key used in most networks. See the “wep-key-type” property for a description of how this key is interpreted.
- NM.SettingWirelessSecurity.props.wep_key1¶
- Name:
wep-key1
- Type:
- Default Value:
- Flags:
Index 1 WEP key. This WEP index is not used by most networks. See the “wep-key-type” property for a description of how this key is interpreted.
- NM.SettingWirelessSecurity.props.wep_key2¶
- Name:
wep-key2
- Type:
- Default Value:
- Flags:
Index 2 WEP key. This WEP index is not used by most networks. See the “wep-key-type” property for a description of how this key is interpreted.
- NM.SettingWirelessSecurity.props.wep_key3¶
- Name:
wep-key3
- Type:
- Default Value:
- Flags:
Index 3 WEP key. This WEP index is not used by most networks. See the “wep-key-type” property for a description of how this key is interpreted.
- NM.SettingWirelessSecurity.props.wep_key_flags¶
- Name:
wep-key-flags
- Type:
- Default Value:
- Flags:
Flags indicating how to handle the
NM.SettingWirelessSecurity
:wep-key0
,NM.SettingWirelessSecurity
:wep-key1
,NM.SettingWirelessSecurity
:wep-key2
, andNM.SettingWirelessSecurity
:wep-key3
properties.
- NM.SettingWirelessSecurity.props.wep_key_type¶
- Name:
wep-key-type
- Type:
- Default Value:
- Flags:
Controls the interpretation of WEP keys. Allowed values are
NM.WepKeyType.KEY
, in which case the key is either a 10- or 26-character hexadecimal string, or a 5- or 13-character ASCII password; orNM.WepKeyType.PASSPHRASE
, in which case the passphrase is provided as a string and will be hashed using the de-facto MD5 method to derive the actual WEP key.
- NM.SettingWirelessSecurity.props.wep_tx_keyidx¶
- Name:
wep-tx-keyidx
- Type:
- Default Value:
0
- Flags:
When static WEP is used (ie, key-mgmt = “none”) and a non-default WEP key index is used by the AP, put that WEP key index here. Valid values are 0 (default key) through 3. Note that some consumer access points (like the Linksys WRT54G) number the keys 1 - 4.
- NM.SettingWirelessSecurity.props.wps_method¶
- Name:
wps-method
- Type:
- Default Value:
0
- Flags:
Flags indicating which mode of WPS is to be used if any.
There’s little point in changing the default setting as NetworkManager will automatically determine whether it’s feasible to start WPS enrollment from the Access Point capabilities.
WPS can be disabled by setting this property to a value of 1.
New in version 1.10.