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

Detail exceptions in JAASLoginInInterceptor (patch)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.5, 2.4.4
    • Core
    • None
    • Windows

    • Unknown

    Description

      Hi,
      I find one thing in JAASLoginInInterceptor a little bit dangerous from security perspective - exception handling.
      JAASLoginInInterceptor throws different exceptions with detail error messages in cases:

      • if user/password are not defined (SecurityException: NO_USER_PASSWORD)
      • and if authentication is failed (AuthenticationException: "Unauthorized : " + ex.getMessage())
        It is very practical for the development, but can give some advices to malicious application.
        I will prefere to throw generic security violation exception for both cases.

      Patch is attached

      Attachments

        1. JAASLoginInterceptor-patch.java
          2 kB
          Andrei Shakirin
        2. SAAJOutInterceptor-patch.java
          1 kB
          Andrei Shakirin

        Activity

          People

            Unassigned Unassigned
            ashakirin Andrei Shakirin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: