Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-464

JSPWiki authentication support for TextOutputCallback (display login messages on Login.jsp)

Bulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0
    • 3.0
    • None
    • JSPWiki 3.0

    Description

      The current version of the JSPWiki JAAS implementation does not support TextOutputCallback's.
      JAAS offers several types of Callbacks, JSPWiki's CallbackHandler currently only uses the NameCallback and PasswordCallback.
      As a result the following scenario:
      Users try to login, the login fails but the user is not told for what reason.

      I have had lots of complaints about this behavior, especially from users who do not login very often but use the wiki mostly for reading.
      When they try to login, it fails, but the Login.jsp does not tell anything at all, not even that is has failed (C.M.A.).
      In most cases because either the userid has become inactive, is revoked, or the password is expired. The net effect is that the wiki is often not usable for updates.

      Now I know that giving this information (the failure reason) to the user is often considered a security trade off.
      But in an intranet environment this is very acceptable.

      I will attach a patch that solves this in the following way :

      • AuthenticationManager keeps a Hashtable of last loginMessages for each user.
      • The WikiCallbackHandler now also handles TextOutputCallbacks and sets the login result
      • If the login fails, the LoginActionBean first reads the loginMessage for the user, if it is not null, it is displayed, else you get the old behavior.

      The exploitation of TextOutputCallbacks is optional, the default LoginModule (supplied with JSPWiki) does not use them, and therefore it's behavior is unchanged.
      The installer has to supply a LoginModule that uses the TextOutputCallback to store the loginResult. (And off course we have one that uses it).

      (Andrew), can we take this patch in the trunk ?

      regards,
      Harry

      Attachments

        1. jspwiki-login-3.0.patch
          6 kB
          Harry Metske
        2. JSPWIKI-464.patch
          3 kB
          Harry Metske

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            metskem Harry Metske
            metskem Harry Metske
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment