-
Notifications
You must be signed in to change notification settings - Fork 41
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
Implement 802.1x (EAP) in network settings #1597
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,50 @@ impl Default for BondSettings { | |
} | ||
} | ||
|
||
/// IEEE 802.1x (EAP) settings | ||
#[derive(Clone, Debug, Serialize, Deserialize)] | ||
pub struct IEEE8021XSettings { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, write some description. It will appear in our OpenAPI documentation. |
||
/// List of EAP methods used | ||
#[serde(skip_serializing_if = "Vec::is_empty", default)] | ||
pub eap: Vec<String>, | ||
/// Phase 2 inner auth method | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub phase2_auth: Option<String>, | ||
/// Identity string, often for example the user's login name | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub identity: Option<String>, | ||
/// Password string used for EAP authentication | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub password: Option<String>, | ||
/// Path to CA certificate | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub ca_cert: Option<String>, | ||
/// Password string for CA certificate if it is encrypted | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub ca_cert_password: Option<String>, | ||
/// Path to client certificate | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub client_cert: Option<String>, | ||
/// Password string for client certificate if it is encrypted | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub client_cert_password: Option<String>, | ||
/// Path to private key | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub private_key: Option<String>, | ||
/// Password string for private key if it is encrypted | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub private_key_password: Option<String>, | ||
/// Anonymous identity string for EAP authentication methods | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub anonymous_identity: Option<String>, | ||
/// Which PEAP version is used when PEAP is set as the EAP method in the 'eap' property | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub peap_version: Option<String>, | ||
/// Force the use of the new PEAP label during key derivation | ||
#[serde(skip_serializing_if = "std::ops::Not::not")] | ||
pub peap_label: bool, | ||
} | ||
|
||
#[derive(Clone, Debug, Serialize, Deserialize)] | ||
pub struct NetworkDevice { | ||
pub id: String, | ||
|
@@ -106,6 +150,8 @@ pub struct NetworkConnection { | |
pub status: Option<Status>, | ||
#[serde(skip_serializing_if = "is_zero", default)] | ||
pub mtu: u32, | ||
#[serde(rename = "ieee-8021x", skip_serializing_if = "Option::is_none")] | ||
pub ieee_8021x: Option<IEEE8021XSettings>, | ||
} | ||
|
||
fn is_zero(u: &u32) -> bool { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to describe each element of this section. For instance,
ca_cert
is described butidentity
is not.