fix(web2): 802.1x CA cert should not be "Optional" #5092
Closed
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.
Brief description: CA cert parameter was wrongly set as "Optional". This PR removes the "Optional" qualifier from the UI and adds some additional UI validation so that the parameter is not left blank.
Background: When submitting a configuration for the 802.1x tab and the Certificate Authority Certificate is not set, the following error is thrown:
The error is due to a wrong implementation of the Certificate decryption stage in the NMConfigurationServiceImpl.
In the findAndDecodeCertificatesForInterface, the case in which the ca-cert-name is an empty string, was not taken into account. Leaving the field blank falls into this case and result in the error reported.
According to the NM documentation, the property can be unset but it is recommended to set a CA cert for security reasons
We decided to follow our "secure by default" policy and have the parameter mandatory. This PR updates the code to enforce that in our Web UI.
This PR supersedes #5088 by only focusing on the Web UI