<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2011 Progress Software, Inc. All rights reserved.
    http://fusesource.com

    The software in this package is published under the terms of the AGPL license
    a copy of which has been included with this distribution in the license.txt file.

-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">

    <cm:property-placeholder persistent-id="com.fusesource.fmc.ldap.jaas" update-strategy="reload">
        <cm:default-properties>
            <cm:property name="ldap.url" value="ldap://localhost:10389" />
        </cm:default-properties>
    </cm:property-placeholder>

    <jaas:config name="karaf" rank="1">
        <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="required">
            connection.url = ${ldap.url}
            user.base.dn = ou=users,dc=fon
            user.filter = (uid=%u)
            user.search.subtree = true
            role.base.dn = ou=groups,dc=fon
            role.filter = (uniqueMember=uid=%u)
            role.name.attribute = cn
            role.search.subtree = true
            authentication = simple
        </jaas:module>
    </jaas:config>

</blueprint>
