Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-5511

Proper Provide-Capability for org.apache.karaf.jaas.modules.EncryptionService

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.10
    • 4.0.11, 4.1.5, 4.2.0.M2
    • None
    • None

    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"
      

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            lichtin Martin Lichtin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: