Skip to content
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

Parser only returns one client if login/pass authentication is used insteat of client certificates #4

Open
N-Mi opened this issue Dec 16, 2021 · 0 comments

Comments

@N-Mi
Copy link

N-Mi commented Dec 16, 2021

openvpn-status-parser uses the "Common Name" as the dict key in the connected_clients attributes.

This leads to a problem when no client certificate is used to authenticate users, but only login/pass, as the "Common Name" field is "UNDEF" for all connected users.

A consequence of this is that when iterating through all connected clients, the same key is used, and its value is overwritten each time, resulting in a list containing only one client.
Another consequence (not yet tested but supposed), is that even if client certificates are used, if the same user has multiple active sessions on the same VPN server (because he has several terminals, or connection issue), only one active connection will be seen.

A fix for this would be to use "Client ID" (which is supposed to be unique) instead of "Common Name" as the key to the connected_clients attribute.

I'll send a PR implementing this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant