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

Custom realm undeploying corrupts default realm

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1.3
    • 2.2.0
    • karaf
    • None
    • ServiceMix 4.3

    Description

      I define a minimal custom realm (see attachment), hot-deploy it, then hot-undeploy it.
      Afterwards I cannot ssh anymore to the Karaf Console, the error message says that the password is wrong.

      Impact : it is not possible to change realm parameters on-the-fly, and it is even dangerous to do so when the server is running. To avoid the problem, we configured the XML file with the realm definition as read-only.

      Subsequent calls to the custom realm gives the following stack trace (caught in the Eclipse debugger).

       
      Thread [camel-jetty:9020-129] (Suspended (exception org.osgi.service.blueprint.container.ServiceUnavailableException))	
      org.apache.aries.blueprint.container.ReferenceListRecipe$ServiceDispatcher.call() line: 201	
      org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$CgLibProxyFactory$1.loadObject() line: 652	
      org.apache.karaf.jaas.config.JaasRealm$$EnhancerByCGLIB$$fea986d0.getName() line: not available	
      org.apache.karaf.jaas.config.impl.OsgiConfiguration.getAppConfigurationEntry(java.lang.String) line: 54	
      javax.security.auth.login.LoginContext.init(java.lang.String) line: 243	
      javax.security.auth.login.LoginContext.<init>(java.lang.String, javax.security.auth.Subject) line: 367	
      javax.security.auth.login.LoginContext.<init>(java.lang.String, javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler) line: 444	
      com.mycompany.OsgiJAASLoginService(org.eclipse.jetty.plus.jaas.JAASLoginService).login(java.lang.String, java.lang.Object) line: 201	
      com.mycompany.OsgiJAASLoginService.login(java.lang.String, java.lang.Object) line: 52	
      org.eclipse.jetty.security.authentication.BasicAuthenticator.validateRequest(javax.servlet.ServletRequest, javax.servlet.ServletResponse, boolean) line: 77	
      org.eclipse.jetty.security.ConstraintSecurityHandler(org.eclipse.jetty.security.SecurityHandler).handle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 439	
      org.eclipse.jetty.server.Server(org.eclipse.jetty.server.handler.HandlerWrapper).handle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 114	
      org.eclipse.jetty.server.Server.handle(org.eclipse.jetty.server.HttpConnection) line: 352	
      org.eclipse.jetty.server.nio.SelectChannelConnector$3(org.eclipse.jetty.server.HttpConnection).handleRequest() line: 596	
      org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete() line: 1051	
      org.eclipse.jetty.http.HttpParser.parseNext() line: 590	
      org.eclipse.jetty.http.HttpParser.parseAvailable() line: 212	
      org.eclipse.jetty.server.nio.SelectChannelConnector$3(org.eclipse.jetty.server.HttpConnection).handle() line: 426	
      org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle() line: 508	
      org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(org.eclipse.jetty.io.nio.SelectChannelEndPoint) line: 34	
      org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run() line: 40	
      org.eclipse.jetty.util.thread.QueuedThreadPool$2.run() line: 451	
      java.lang.Thread.run() line: 662	
      

      Moved from ARIES-789.

      Attachments

        1. my-realm.xml
          0.7 kB
          metatech

        Issue Links

          Activity

            People

              Unassigned Unassigned
              metatech metatech
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 4h
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified