Where the first stage primarily aims to keep the legacy handling of gateways intact, this stage does the conversion to MVC.
As part of the migration strategy, configured gateways will not be touched if the migration fails. This allows users to repair the gateways in the new situation.
This commit imports part of the changes from @swhite2 which will keep the legacy handling intact for the first stage of the migration. It should be backwards compatible with the previous (23.7.x) code.
Changes new in this commit which where not in the original PR:
1) dpinger_status() missed $gwitem which rendered gateways statusses down
2) Model version number set to 0.0.1 so we can use the migration later to step into 1.0.0
3) Gateways->gatewayIterator() do not yield MVC records ensuring we are still using legacy config data when being called.
The system wizard is IPv4 only but doesn't use the correct
function. It's debatable if we need to restrict DNS servers
but if all of this is only IPv4 we should stick to it in a
consistsent way.
This initial commit focusses on structuring the event flow around user and client registration, moving events to our new ovpn_event.py handler.
By supporting both deferred and direct authentication in user_pass_verify.php, we should be able to start with a cleanup patch for OpenVPN 2.5.x and work our way up to
a smaller fix for 2.6.x.
In preperation for 2.6, this commit also moves --cipher to --data-ciphers-fallback as suggested by the warning "DEPRECATED OPTION: --cipher set to '' but missing in --data-ciphers". Rename the option in the gui while there and add a note in the help text.
This allows us to remove all DH handling remnants. If people
want to use a separate content they will have to let us know,
but it seems unlikely. The only impact seems to be a security
bump from 2k to 4k default.
Learned this the hard way on macOS Catalina behaviour. Since this
is a new policy enforced since 2019 it's safe to increase the defaults
(which were 10 years before) as well. Likely makes a few users
happy that had VPN certificates run out over the years.
Unfortunately, <name/> generates the name from a label
into the form name= and id= attributes, which can utterly
break if the name is changed when there is custom code.
This conforms to current recommendations and best practices for a
128-bit security margin.
2048 is still the minimum recommended, but 2048-bit RSA only aligns to a
112-bit security margin, roughly analogous to 3DES. AES-128, the
minimum recommended cipher, requires a 3072-bit RSA key and a 256-bit digest
(SHA256) to provide an equivalent security level in all cryptographic
components.
Mostly prompted by the problem that mistyping the admin password
makes the form go boom. We cannot rely on the browser. While here
reformat and add copyright as various improvements have been made
here ever since 2015.