Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-648

Document Spring-WS Security exception handling

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.5.7, 2.0 M3
    • Fix Version/s: 2.0 RC1, 1.5.10
    • Component/s: Security
    • Labels:
      None

      Description

      In SWS-549, the exceptionHandler property was introduced into the AbstractWSSecurityInterceptor.
      This creates an inconsistency with the overall exceptionhandling architecture in Spring WS.

      Instead of introducing the EndpointExceptionResolver in this Interceptor, would it not be better to just let the exception flow up to the MessageDispatcher, where the resolvers already are configured (with sensible defaults)

      And as this is not documented anywhere unlike the exception resolving in the MessageDispatcher (http://static.springsource.org/spring-ws/sites/1.5/reference/html/server.html#server-endpoint-exception-resolver), it is too easy to miss out on or forget this extra configuration step.

      In my opinion this could be done for both the client and endpoint handleRequest/handleResponse methods by just removing the catch clauses.
      I would be happy to contribute a patch for this if needed.

        Activity

        hurragutt Paul Nyheim created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Assignee Arjen Poutsma [ arjen.poutsma ] Tareq Abedrabbo [ tareq ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        The problem here is that we'd like any security exception to result in a security-specific SOAP Fault by default. We can't do that in the default configuration of the MessageDispatcher (or exception resolvers), since the specific exceptions (WsSecurityValidationException and WsSecurityFaultException) are part of the spring-ws-security module.

        So I agree that this is architecturally inconsistent, but I don't see any nice way out. Also note that we can't break backwards compatibility here.

        Show
        arjen.poutsma Arjen Poutsma added a comment - The problem here is that we'd like any security exception to result in a security-specific SOAP Fault by default. We can't do that in the default configuration of the MessageDispatcher (or exception resolvers), since the specific exceptions (WsSecurityValidationException and WsSecurityFaultException) are part of the spring-ws-security module. So I agree that this is architecturally inconsistent, but I don't see any nice way out. Also note that we can't break backwards compatibility here.
        arjen.poutsma Arjen Poutsma made changes -
        Assignee Tareq Abedrabbo [ tareq ] Arjen Poutsma [ arjen.poutsma ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing as Won't Fix for now.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing as Won't Fix for now.
        arjen.poutsma Arjen Poutsma made changes -
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        hurragutt Paul Nyheim added a comment -

        In that case, I suggest that the documentation around exception handling should be improved.

        Show
        hurragutt Paul Nyheim added a comment - In that case, I suggest that the documentation around exception handling should be improved.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Updated issue to reflect documentation is required.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Updated issue to reflect documentation is required.
        arjen.poutsma Arjen Poutsma made changes -
        Summary Fix architectural inconsistency in Spring-WS exception handling Document Spring-WS exception handling
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Agreed, I've reopened the issue (& edited it accordingly).

        Show
        arjen.poutsma Arjen Poutsma added a comment - Agreed, I've reopened the issue (& edited it accordingly).
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Reopened [ 4 ]
        Resolution Won't Fix [ 2 ]
        arjen.poutsma Arjen Poutsma made changes -
        Fix Version/s 2.0 M4 [ 11626 ]
        Fix Version/s 1.5.10 [ 11497 ]
        arjen.poutsma Arjen Poutsma made changes -
        Summary Document Spring-WS exception handling Document Spring-WS Security exception handling
        arjen.poutsma Arjen Poutsma made changes -
        Fix Version/s 2.0 RC1 [ 11392 ]
        Fix Version/s 2.0 M4 [ 11626 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Reopened [ 4 ] In Progress [ 3 ]
        arjen.poutsma Arjen Poutsma logged work - 10/Nov/10 2:23 AM
        • Time Spent:
          34m
           
          <No comment>
        arjen.poutsma Arjen Poutsma made changes -
        Time Spent 34m [ 2040 ]
        Remaining Estimate 0d [ 0 ]
        arjen.poutsma Arjen Poutsma logged work - 10/Nov/10 2:27 AM
        • Time Spent:
          38m
           
          <No comment>
        arjen.poutsma Arjen Poutsma made changes -
        Time Spent 34m [ 2040 ] 0.15d [ 4320 ]
        arjen.poutsma Arjen Poutsma made changes -
        Resolution Complete [ 8 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        31m 17s 1 Arjen Poutsma 01/Nov/10 3:09 AM
        Resolved Resolved Reopened Reopened
        1h 2m 1 Arjen Poutsma 01/Nov/10 4:11 AM
        Reopened Reopened In Progress In Progress
        8d 21h 37m 1 Arjen Poutsma 10/Nov/10 1:49 AM
        In Progress In Progress Resolved Resolved
        37m 57s 1 Arjen Poutsma 10/Nov/10 2:27 AM
        Resolved Resolved Closed Closed
        541d 4h 36m 1 Arjen Poutsma 04/May/12 7:03 AM

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            hurragutt Paul Nyheim
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 0.15d
              0.15d