Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6786

avoid Error log from NamePasswordCallbackHandler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1.6, 3.0.9, 3.2.0
    • None
    • None
    • Unknown

    Description

      If we deploy a cxf rest endpoint in karaf with JAAS enabled, we get Error message like

      2016-02-09T09:05:26.515-0600 | ERROR | qtp1245173695-70 | NamePasswordCallbackHandler | 74 - org.apache.cxf.cxf-core - 3.0.4 | ... | Unsupported callback type org.apache.karaf.jaas.modules.publickey.PublickeyCallback
      

      This is because by default Karaf enable multiple jaas modules, like

      <jaas:config name="karaf">
              <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule" flags="optional">
                  users = $[karaf.etc]/users.properties
                  detailed.login.exception = ${detailed.login.exception}
                  encryption.name = ${encryption.name}
                  encryption.enabled = ${encryption.enabled}
                  encryption.prefix = ${encryption.prefix}
                  encryption.suffix = ${encryption.suffix}
                  encryption.algorithm = ${encryption.algorithm}
                  encryption.encoding = ${encryption.encoding}
              </jaas:module>
              <jaas:module className="org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule" flags="optional">
                  users = $[karaf.etc]/keys.properties
                  detailed.login.exception = ${detailed.login.exception}
              </jaas:module>
              <jaas:module className="org.apache.karaf.jaas.modules.audit.FileAuditLoginModule" flags="optional">
                  enabled = ${audit.file.enabled}
                  file = ${audit.file.file}
              </jaas:module>
              <jaas:module className="org.apache.karaf.jaas.modules.audit.EventAdminAuditLoginModule" flags="optional">
                  enabled = ${audit.eventadmin.enabled}
                  topic = ${audit.eventadmin.topic}
              </jaas:module>
          </jaas:config>
      

      So when the JAAS try the PublickeyLoginModule, the org.apache.karaf.jaas.modules.publickey.PublickeyCallback would be passed into CXF NamePasswordCallbackHandler which cause this Error log. As this is actually harmless because the "AA" passed using PropertiesLoginModule, we should lower this message level

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            ffang Freeman Yue Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: