Username is not saved in openconnect VPN connection dialog
gnome-shell's network agent doesn't send all secrets returned by the openconnect authentication dialog to NM and so the username entered in the openconnect VPN dialog is not saved.
How to reproduce:
- Run a test server:
- Clone the openconnect repository: git://git.infradead.org/users/dwmw2/openconnect.git
- Build with: ./autogen.sh ; ./configure ; make check
- sudo dnf install ocserv
- sudo ocserv -f -c tests/configs/test-user-pass.config
- Connect first time:
- nmcli connection add type vpn con-name oc vpn.service-type openconnect vpn.data "gateway = 127.0.0.1"
- Connect to the 'oc' VPN through the GUI
- Enter 'test' username and 'test' password
- Disconnect from VPN
- Connect second time:
- Connect to the 'oc' VPN through the GUI
- Observe that the username was not saved
This is the connection returned from the gnome-shell agent to NM:
...
'vpn': {
...,
'secrets':
<{'gwcert': 'pin-sha256:xp3scfzy3rOQsv9NcOve/8YVVv+pHr4qNCXEXrNl5s8=',
'cookie': 'zfH/5JSKROo4SopwWdjnzslrBswZ3UHpSPIQEbi6kso=',
'lasthost': '127.0.0.1:443',
'gateway': '127.0.0.1:443'}>,
}
Compare it with from the connection returned by nm-applet:
'vpn': {
...,
'secrets':
<{'lasthost': '127.0.0.1:443',
'cookie': 'FS6LWmKlnvYgxpYaIQHTppbC6juk5dpT4Xmla6ccnos=',
'form:main:username': 'test',
'gwcert': 'pin-sha256:xp3scfzy3rOQsv9NcOve/8YVVv+pHr4qNCXEXrNl5s8=',
'gateway': '127.0.0.1:443',
'certificate:127.0.0.1:443': 'pin-sha256:xp3scfzy3rOQsv9NcOve/8YVVv+pHr4qNCXEXrNl5s8='}>,
}
NetworkManager bug report: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/328