Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21685

Realtime possibly breaking authenticator when active during an xwiki restart

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • None
    • 13.10.7
    • Realtime, WebSocket
    • None
    • Unknown

    Description

      When a realtime session is active on a subwiki (not sure it if matters), and an xwiki has a custom authenticator, if xwiki is restarted, the realtime session might be the first to call xwiki and initialize it.

      This exception is then visible in the logs:

      2023-12-08 13:57:18,098 [http-nio-8080-exec-9 - https://projects.xwikisas.com/xwiki/websocket/projects/netflux] WARN  .x.w.i.DefaultWebSocketContext        - Failed to authenticate the user for [wss://projects.xwikisas.com/xwiki/websocket/projects/netflux]. Root cause is:
      388721 com.xpn.xwiki.XWikiException: Error number 8001 in 8: Cannot initialize authentication system for wiki [<nameofwiki>]
      388722     at com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl.getAuthenticator(XWikiAuthServiceImpl.java:213)
      388723     at com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl.checkAuth(XWikiAuthServiceImpl.java:235)
      388724     at com.xpn.xwiki.XWiki.checkAuth(XWiki.java:4336)
      388725     at org.xwiki.websocket.internal.DefaultWebSocketContext.createExecutionContext(DefaultWebSocketContext.java:149)
      388726     at org.xwiki.websocket.internal.DefaultWebSocketContext.initialize(DefaultWebSocketContext.java:78)
      388727     at org.xwiki.websocket.internal.XWikiEndpointConfigurator.modifyHandshake(XWikiEndpointConfigurator.java:68)
      388728     at org.apache.tomcat.websocket.server.UpgradeUtil.doUpgrade(UpgradeUtil.java:206)
      388729   
      

      and it seems to cause a breakage of the custom authenticator for any follow up request. XWiki will fallback to it's default authenticator.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              ludovic Ludovic Dubost
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: