Skip to content

Commit e842de9

Browse files
committed
SWS-648 - Document Spring-WS Security exception handling
1 parent cfef1c6 commit e842de9

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

src/docbkx/security.xml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
<formalpara>
1414
<title>Authentication</title>
1515
<para>
16-
This is the process of determining whether a
17-
<emphasis>principal</emphasis>
18-
is who they claim to be.
16+
This is the process of determining whether a <emphasis>principal</emphasis> is who they claim to be.
1917
In this context, a "principal" generally means a user, device or some other system which can perform
2018
an action in your application.
2119
</para>
@@ -31,12 +29,10 @@
3129
<formalpara>
3230
<title>Encryption and Decryption</title>
3331
<para>
34-
<emphasis>Encryption</emphasis>
35-
is the process of transforming data into a form that is impossible to
32+
<emphasis>Encryption</emphasis> is the process of transforming data into a form that is impossible to
3633
read without the appropriate key. It is mainly used to keep information hidden from anyone for whom it
3734
is not intended.
38-
<emphasis>Decryption</emphasis>
39-
is the reverse of encryption; it is the process of transforming of
35+
<emphasis>Decryption</emphasis> is the reverse of encryption; it is the process of transforming of
4036
encrypted data back into an readable form.
4137
</para>
4238
</formalpara>
@@ -1092,6 +1088,36 @@
10921088
</section>
10931089
</section>
10941090
</section>
1091+
<section id="security-xws-exception-handling">
1092+
<title>Security Exception Handling</title>
1093+
<para>
1094+
When an securement or validation action fails, the <classname>XwsSecurityInterceptor</classname>
1095+
will throw a <exceptionname>WsSecuritySecurementException</exceptionname> or
1096+
<exceptionname>WsSecurityValidationException</exceptionname> respectively.
1097+
These exceptions bypass the <link linkend="server-endpoint-exception-resolver">standard
1098+
exception handling mechanism</link>, but are handled in the interceptor itself.
1099+
</para>
1100+
<para>
1101+
<exceptionname>WsSecuritySecurementException</exceptionname> exceptions are handled in the
1102+
<methodname>handleSecurementException</methodname> method of the
1103+
<classname>XwsSecurityInterceptor</classname>.
1104+
By default, this method will simply log an error, and stop further processing of the message.
1105+
</para>
1106+
<para>
1107+
Similarly, <exceptionname>WsSecurityValidationException</exceptionname> exceptions are handled in the
1108+
<methodname>handleValidationException</methodname> method of the
1109+
<classname>XwsSecurityInterceptor</classname>.
1110+
By default, this method will create a SOAP 1.1 Client or SOAP 1.2 Sender Fault, and send that back as
1111+
a response.
1112+
</para>
1113+
<note>
1114+
<para>
1115+
Both <methodname>handleSecurementException</methodname> and
1116+
<methodname>handleValidationException</methodname> are protected methods, which you can override
1117+
to change their default behavior.
1118+
</para>
1119+
</note>
1120+
</section>
10951121
</section>
10961122
<section id="security-wss4j-security-interceptor">
10971123
<title>
@@ -1939,5 +1965,13 @@
19391965
</para>
19401966
</section>
19411967
</section>
1968+
<section>
1969+
<title>Security Exception Handling</title>
1970+
<para>
1971+
The exception handling of the <classname>Wss4jSecurityInterceptor</classname> is identical to that of
1972+
the <classname>XwsSecurityInterceptor</classname>. See <xref linkend="security-xws-exception-handling"/>
1973+
for more information.
1974+
</para>
1975+
</section>
19421976
</section>
19431977
</chapter>

0 commit comments

Comments
 (0)