-
Notifications
You must be signed in to change notification settings - Fork 313
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(nm): 802.1x TLS Private Key encryption #5099
fix(nm): 802.1x TLS Private Key encryption #5099
Conversation
TestsPerformed connection tests on both platforms ( Additional tests to be performed: verify keys cleanup/duplication. What happens when Kura reconfigure the network? A new key gets created and saved on disk by NetworkManager? Test performed: a series of test were performed monitoring the
It appears that NetworkManager just updates the key:
|
Currently, when connecting to a WPA Enterprise Access Point using EAP-TLS, we're providing the client private key in clear text which is not recommended as per the NetworkManager documentation..
This PR addresses the issue by passing NetworkManager encrypted private keys.
Implementation: since the Kura Keystore only supports not password-protected keys, we need to encrypt the key before sending it to NetworkManager. We chose to use the base64-encoded sha-256 hash of the private key as password so that, even when sending the configuration multiple times, the encrypted key and password stays the same.
Note about key duplication
NetworkManager saves the keys used in the 802.1x TLS authentication on disk inside the
/etc/NetworkManager/system-connection
folder. It appears that it doesn't perform a cleanup after the connection associated with a particular set of keys gets deleted (i.e. the keys stays there).Kura re-applies/updated network configuration every time it starts/there's a network configuration updates. Since the keys encryption has a random component (i.e. for the same password the encrypted key will differ every time it gets encrypted) I was worried about key duplication on disk.
This appears to be not a problem: NetworkManager is smart enough to update the key associated with a particular connection