Stared at code ("straight-forward enough"), tested v8, made it crash :-) -
fixed in v9. Does what it says on the lid.
Note that there are two ways this can be used
- "auth-gen-token" in use in the server, and "override-username foo"
in ccd/script -> in this case the server will generate the necessary
"push auth-token-user $base64(foo)" + a corresponding "push auth-token",
and will also do the token verification on TLS renegotiation
- no "auth-gen-token" in the server config, and tokens generated by
a ccd script (or plugin), to be consumed by an external auth-verify
script (or plugin). In this case the OpenVPN server doesn't know
anything about tokens, and *will not* auto-generate the push command
for "auth-token-user". So the ccd script needs to, basically, generate
3 commands
push "auth-token MyMagicScheme"
push "auth-token-user $base64($username)"
override-username $username
which is a bit awkward. I assume I could talk Arne into generating the
"auth-token-user" push automatically in this case as well (it's a
fairly trivial change) - but this is a particularily small niche case,
and it's easy enough to do from the script. Especially as it's documented
now what needs to be done :-)
I've added a github reference to issue #299 to the commit message.
Your patch has been applied to the master branch.
commit ebd433bd1e40917793903f76883d114d820e992d
Author: Arne Schwabe
Date: Tue Mar 11 16:59:04 2025 +0100
Implement override-username
Signed-off-by: Arne Schwabe <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL:
https://www.mail-archive.com/[email protected]/msg31091.html
Signed-off-by: Gert Doering <[email protected]>
--
kind regards,
Gert Doering
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel