Passing a data source as an OSGi ldap filter
To use an OSGi ldap filter, the prefix osgi: needs to be provided. See the example below:
<jaas:config name="karaf">
<jaas:module
className="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule"
flags="required">
datasource = osgi:javax.sql.DataSource/ \\
(osgi.jndi.service.name=jdbc/karafdb)
query.password = SELECT PASSWORD FROM USERS WHERE USERNAME=?
query.role = SELECT ROLE FROM ROLES WHERE USERNAME=?
</jaas:module>
</jaas:config>