Skip to contentSkip to conversation

Announcing OpenVPN Auth-LDAP 2.0-beta2

Openvpn-devel Landon Fuller 1 participant 2 messages Aug 23, 2006 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]...

A message that is not in the archive (sent off-list or not yet received): [email protected]...

#2 lore raw
Quoted 4 lines · Pasi Kärkkäinen

Hi!

Nice work. Need to test it someday..

Thanks.

Quoted 3 lines

Please consider adding a feature which enables administrator to specify DNS- and WINS-addresses per group.. that would be really useful to some people (like me).

I'd like to be able to specify arbitrary per-group OpenVPN configuration options, in a manner similar to the client-config-dir. The easiest configuration would probably be something like:

<Authorization>

	...
	<Group>
		...
		# OpenVPN Client Configuration
		ClientConfig		/usr/local/etc/openvpn/client/engineering.conf
	</Group>

</Authorization>

In terms of the existing plugin interface, however, this is not currently feasible. There is no obvious way for the plugin to return a path / setting to the openvpn instance from within openvpn_plugin_func_v1().

-landonf

Quoted 39 lines · Landon Fuller
Quoted 36 lines

I'd like to announce the first public beta release of version 2.0 of our LDAP authentication plugin for OpenVPN[1] :
http://dpw.threerings.net/projects/openvpn-auth-ldap/

This release is a vast improvement on the rudimentary 1.0 plugin -- new features include:
- Full support for LDAP search filters -- no more DN templates
required.
- Group-based access control. (rfc2307bis / LDAP)
- Integration with the OpenBSD Packet Filter. Can add and remove VPN
clients to PF tables on connect/disconnect -- even on the basis of group membership. Tested on FreeBSD.
- Easy to understand Apache-style configuration file.

I hope that this plugin will serve as a solid base for adding additional OpenVPN-specific LDAP features, such as the PF firewall integration.

This code should be fairly solid -- it has near 100% unit test coverage, has been subject to full regression testing, and has been rigorously tested for code errors and memory leaks under valgrind. The code also operates flawlessly inside of chrooted OpenVPN instance. We are currently using the module on our production VPN server.

Built with the distribution is an independent plugin driver that can be used to test the plugin and your configuration outside of OpenVPN. After you have built the plugin, the driver can be run as follows:
./src/testplugin <config file>

Cheers,
Landon Fuller
Three Rings Design, Inc.

[1] Version 1.0 of this plugin was hosted on the OpenDarwin website:
http://www.opendarwin.org/~landonf/software/openvpn-auth-ldap/

A message that is not in the archive (sent off-list or not yet received): [email protected]...

#4 lore raw
Quoted 6 lines · Charles Duffy
Quoted 4 lines · Landon Fuller

In terms of the existing plugin interface, however, this is not currently feasible. There is no obvious way for the plugin to return a path / setting to the openvpn instance from within openvpn_plugin_func_v1().

Quoted 6 lines

I'm under the impression that the plugin interface allows one to hook into client-connect and return client-specific directives via writing them to a file (the name of which is passed in the argv array), similar to the mechanism used by regular hook scripts. Indeed, in OpenVPN-2.0.7's multi.c:1273, it appears to be creating a temporary filename for precisely that use.

Whoops, I totally missed that:
--client-connect script
Run script on client connection. The script is
passed the com-
mon name and IP address of the just-authenticated
client as en-
vironmental variables (see environmental variable
section be-
low). The script is also passed the pathname of a
not-yet-cre-
ated temporary file as $1 (i.e. the first command
line argu-
ment), to be used by the script to pass dynamically
generated
config file directives back to OpenVPN.

That's very handy. When I next have some free time, I'll take a look at adding support for specifying configuration directives on the basis of LDAP group membership.

Thanks!
-landonf