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

fix: optional fields wpa enterprise #5043

Merged

Conversation

GregoryIvo
Copy link
Contributor

@GregoryIvo GregoryIvo commented Dec 4, 2023

This PR aims to fix the optional bug, where when clearing and applying a field, the original value persists.

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
image
now able to clear fields after applying

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 draft December 5, 2023 01:35
@GregoryIvo GregoryIvo force-pushed the fix-wpa-enterprise-optionals branch from 337ce11 to d33f5b4 Compare December 7, 2023 20:48
@GregoryIvo GregoryIvo marked this pull request as ready for review December 7, 2023 21:19
@MMaiero
Copy link
Contributor

MMaiero commented Dec 11, 2023

It is not working for me.
In the console I see errors like these:
image

and the apply button does nothing:
image

@MMaiero
Copy link
Contributor

MMaiero commented Dec 14, 2023

I have recreated the error above in the following way:

Screen.Recording.2023-12-14.at.10.32.28.mov

I have noticed, few more things that I believe are not working in the form. Please tell me if those do not fit with this PR.

Required fields are not marked as such and not highlighted when clicking apply
image

For example this happens when doing a similar step with the IPv4 tab:
image

The validation seems to not be always on point:
image

Finally, I seem not to be able to select the TTLS None Phase2 Auth

Screen.Recording.2023-12-14.at.10.35.10.mov

@GregoryIvo
Copy link
Contributor Author

Hi @MMaiero, when I do the same on my end I get the following
image

I believe in your screenshots, the dialogue you are seeing is caused by the IPv4 page.

IE
image
is caused by
image

it appears the IPv4 checking occurs first, and it takes precedent before the 802.1x tab. Will see if there is a way to make this more straightforward for the end user.

@GregoryIvo GregoryIvo force-pushed the fix-wpa-enterprise-optionals branch from d33f5b4 to 5ee6de4 Compare December 18, 2023 14:18
@GregoryIvo
Copy link
Contributor Author

Added error highlighting to the tabs
image
image
image

@GregoryIvo
Copy link
Contributor Author

changed around the way validation occurs, so you can see multiple errors instead of one at a time.
image

Highlighted tabs will also clear as you correct and apply settings:
image

@MMaiero
Copy link
Contributor

MMaiero commented Dec 20, 2023

Hi, thanks for the update. I still see this from a clean installation of the OS (bookworm 32 bits) and Kura

Screen.Recording.2023-12-20.at.10.05.06.mov

@MMaiero MMaiero force-pushed the fix-wpa-enterprise-optionals branch from d5c8ea6 to c078804 Compare January 5, 2024 08:24
@MMaiero MMaiero requested a review from mattdibi January 5, 2024 17:39
@mattdibi
Copy link
Contributor

mattdibi commented Jan 8, 2024

Tested on RPi OS... connecting fine to the WPA Enterprise Access Point.

Issue 1

There's still an issue with the CA-Cert: it's tagged as "Optional" but the backend will refuse to work if there's no cert set throwing the following error.

2024-01-08T10:36:57,284 [ConfigurationListener Event Queue] ERROR o.e.k.n.c.NMConfigurationServiceImpl - Unable to decode key/certificate net.interface.wlan0.config.802-1x.ca-cert-name from keystore.
org.eclipse.kura.KuraException: Configuration Error: Certificate "" is not of the expected key type or not found.
	at org.eclipse.kura.nm.configuration.NMConfigurationServiceImpl.getTrustedCertificateFromKeystore(NMConfigurationServiceImpl.java:382)
	at org.eclipse.kura.nm.configuration.NMConfigurationServiceImpl.findAndDecodeCertificatesForInterface(NMConfigurationServiceImpl.java:358)
	at org.eclipse.kura.nm.configuration.NMConfigurationServiceImpl.lambda$0(NMConfigurationServiceImpl.java:329)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at org.eclipse.kura.nm.configuration.NMConfigurationServiceImpl.decryptAndConvertCertificatesProperties(NMConfigurationServiceImpl.java:320)
	at org.eclipse.kura.nm.configuration.NMConfigurationServiceImpl.update(NMConfigurationServiceImpl.java:242)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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)

... but it's outside the scope of this PR.

Issue 2

Identity can be set as blank and it gets highlight with error... but you can still submit the form.

image

image

After submitting it gets restored to the previous value.

image

I don't know if it's worth fixing it.

Issue 3

When switching EAP type the populated field stay blue...

image

Weird glitch... but again: not a deal breaker.

Issue 4

Inner Authentication is a drop down but is always disabled. Is this expected?

Copy link
Contributor

@mattdibi mattdibi left a comment

Choose a reason for hiding this comment

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

IMO it could be OK as is (the only doubt I have is on Issue 2)...

Our UI is a weird beast...

@MMaiero
Copy link
Contributor

MMaiero commented Jan 8, 2024

Issue 2 should be fixed now. I broke the check during the refactoring.

@mattdibi
Copy link
Contributor

mattdibi commented Jan 8, 2024

Issue 2 should be fixed now. I broke the check during the refactoring.

Did you push some additional changes? I can't see them and the CI wasn't triggered.

@MMaiero
Copy link
Contributor

MMaiero commented Jan 8, 2024

Sorry, I pushed on origin instead of doing that in Greg's fork

Copy link
Contributor

@mattdibi mattdibi left a comment

Choose a reason for hiding this comment

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

Issue 2 resolution confirmed. LGTM

@mattdibi mattdibi merged commit 9b371f4 into eclipse-kura:develop Jan 8, 2024
3 checks passed
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