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

feat: add front end support for WPA Enterprise #4852

Conversation

GregoryIvo
Copy link
Contributor

Note: We are using the Conventional Commits convention for our pull request titles. Please take a look at the PR title format document for the supported types and scopes.

Brief description of the PR. [e.g. Added null check on object to avoid NullPointerException]

Related Issue: This PR fixes/closes {issue number}

Description of the solution adopted: A more detailed description of the changes made to solve/close one or more issues. If the PR is simple and easy to understand this section can be skipped

Screenshots: If applicable, add screenshots to help explain your solution

Manual Tests: Optional description of the tests performed to check correct functioning of changes, useful for an efficient review

Any side note on the changes made: Description of any other change that has been made, which is not directly linked to the issue resolution [e.g. Code clean up/Sonar issue resolution]

@GregoryIvo GregoryIvo marked this pull request as ready for review September 12, 2023 15:56
@GregoryIvo GregoryIvo force-pushed the wpa-enterprise-client-support-on-nm-frontend-rebase-2 branch from 5033589 to 3e8549a Compare September 13, 2023 12:13
Copy link
Contributor

@marcellorinaldo marcellorinaldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this configuration:

  • Enterprise EAP = any value TLS/TTLS/PEAP
  • Inner Authentication = NONE
  • Identity = test
  • Password = hellotesttest

I get the following stacktrace:

2023-09-14T09:58:09,736 [ConfigurationListener Event Queue] ERROR o.e.k.n.NMDbusConnector - Unable to apply configuration to the device path /org/freedesktop/NetworkManager/Devices/3
java.util.NoSuchElementException: The "net.interface.wlan0.config.802-1x.client-cert" key is missing.
	at org.eclipse.kura.nm.NetworkProperties.get(NetworkProperties.java:41)
	at org.eclipse.kura.nm.configuration.NMSettingsConverter.create8021xTls(NMSettingsConverter.java:169)
	at org.eclipse.kura.nm.configuration.NMSettingsConverter.build8021xSettings(NMSettingsConverter.java:126)
	at org.eclipse.kura.nm.configuration.NMSettingsConverter.buildSettings(NMSettingsConverter.java:97)
	at org.eclipse.kura.nm.NMDbusConnector.enableInterface(NMDbusConnector.java:443)
	at org.eclipse.kura.nm.NMDbusConnector.manageConfiguredInterface(NMDbusConnector.java:422)
	at org.eclipse.kura.nm.NMDbusConnector.doApply(NMDbusConnector.java:381)
	at org.eclipse.kura.nm.NMDbusConnector.lambda$0(NMDbusConnector.java:366)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at org.eclipse.kura.nm.NMDbusConnector.doApply(NMDbusConnector.java:363)
	at org.eclipse.kura.nm.NMDbusConnector.apply(NMDbusConnector.java:322)
	at org.eclipse.kura.nm.configuration.NMConfigurationServiceImpl.writeNetworkConfigurationSettings(NMConfigurationServiceImpl.java:317)
	at org.eclipse.kura.nm.configuration.NMConfigurationServiceImpl.update(NMConfigurationServiceImpl.java:218)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510)
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317)
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:836)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:791)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:709)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:673)
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:435)
	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:316)
	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:118)
	at org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:92)
	at org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:40)

Maybe such combination is not allowed? If not allowed, we should prevent the user from setting it by disabling some fields.

Setting Inner Authentication to MSCHAPv2 does not cause issues.

@GregoryIvo
Copy link
Contributor Author

@marcellorinaldo The new commits add the following validation
image
image
image
image

@GregoryIvo
Copy link
Contributor Author

I also hid the check button for now:
image

@GregoryIvo GregoryIvo force-pushed the wpa-enterprise-client-support-on-nm-frontend-rebase-2 branch from 64cb601 to 3ec6c9b Compare September 15, 2023 12:26
@MMaiero MMaiero merged commit 9c91aa2 into eclipse-kura:develop Sep 19, 2023
4 checks passed
pierantoniomerlino pushed a commit that referenced this pull request Sep 26, 2023
* feat: add front end support for WPA Enterprise

* fix: constrain net.wifi version

* fix: copyright header

* fix: copyright header

* fix: copyright header

* refactor: removed char

* feat: conditionally enable and disable UI elements

* feat: added password validation

* fix: hid check password button
GregoryIvo added a commit to GregoryIvo/kura that referenced this pull request Sep 28, 2023
* feat: add front end support for WPA Enterprise

* fix: constrain net.wifi version

* fix: copyright header

* fix: copyright header

* fix: copyright header

* refactor: removed char

* feat: conditionally enable and disable UI elements

* feat: added password validation

* fix: hid check password button
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.

3 participants