Details
Description
I'd like to use the "org.apache.karaf.jaas.modules.EncryptionService" via Blueprint as follows:
<reference id="encryptionService" interface="org.apache.karaf.jaas.modules.EncryptionService" filter="(name=basic)" />
But Karaf complains at startup:
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; [...] osgi.service; effective:=active; filter:="(&(objectClass=org.apache.karaf.jaas.modules.EncryptionService)(name=basic))"]]
Using the filter "name=basic" seems to be the problem. However I want to use the 'basic' encryption in this case, so need to set the filter.
The service is exported twice, by two different bundles (one as 'basic', one as 'jasypt'):
[org.apache.karaf.jaas.modules.EncryptionService] ------------------------------------------------- name = basic service.bundleid = 35 service.id = 81 service.ranking = -1 service.scope = singleton Provided by : Apache Karaf :: JAAS :: Modules (35) [org.apache.karaf.jaas.modules.EncryptionService] ------------------------------------------------- name = jasypt service.bundleid = 265 service.id = 123 service.scope = singleton Provided by : Apache Karaf :: JAAS :: Jasypt Encryption (265)
Could the JAAS :: Modules be exporting the service (via provide-capability) with the 'name' property?
Currently in the MANIFEST it is only saying:
Provide-Capability: osgi.service;effective:=active;objectClass="org.ap ache.karaf.jaas.config.JaasRealm",osgi.service;effective:=active;obje ctClass="org.apache.karaf.jaas.modules.BackingEngineFactory",osgi.ser vice;effective:=active;objectClass="org.apache.karaf.jaas.modules.Enc ryptionService"