You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Martin Lichtin (JIRA)" <ji...@apache.org> on 2017/11/30 08:32:00 UTC

[jira] [Created] (KARAF-5511) Proper Provide-Capability for org.apache.karaf.jaas.modules.EncryptionService

Martin Lichtin created KARAF-5511:
-------------------------------------

             Summary: Proper Provide-Capability for org.apache.karaf.jaas.modules.EncryptionService
                 Key: KARAF-5511
                 URL: https://issues.apache.org/jira/browse/KARAF-5511
             Project: Karaf
          Issue Type: Improvement
    Affects Versions: 4.0.10
            Reporter: Martin Lichtin
            Priority: Minor


I'd like to use the "org.apache.karaf.jaas.modules.EncryptionService" via Blueprint as follows:
{noformat}
  <reference id="encryptionService" interface="org.apache.karaf.jaas.modules.EncryptionService" filter="(name=basic)" />
{noformat}
But Karaf complains at startup:
{noformat}
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))"]]
{noformat}
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'):
{noformat}
[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)
{noformat}
Could the JAAS :: Modules be exporting the service (via provide-capability) with the 'name' property?
Currently in the MANIFEST it is only saying:
{noformat}
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"
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)