Allow setting OpenVPN client credentials
Add a way to set/update/delete OpenVPN client credentials from reForis.
UI
Based on the discussion, I would propose something similar to how we are handling DHCP static leases. I.e. something like following wireframes:
The same modal could be also used for adding new VPN client configuration, but I am not sure how to make the UI of "upload config and optionally set the client credentials".
Feel free to change the design to be aligned with reForis style ;-)
JSON messages
Changes in request sent from reforis.
Adding new client
Before
{
"config": {"type": "string"}
}
New
{
"config": {"type": "string"},
"credentials": { <-- this is optional attribute
"username": {"type": "string"},
"password": {"type": "string"}
}
}
Set/Update client
Before
{
"id": {"$ref": "#/definitions/client_id"},
"enabled": {"type": "boolean"}
}
New
{
"id": {"$ref": "#/definitions/client_id"},
"enabled": "type": "boolean"},
"credentials": { <-- this is optional attribute
"username": {"type": "string"},
"password": {"type": "string"}
}
}
Depends on: turris/foris-controller/foris-controller-openvpn_client-module#5 (closed)