<?xml version="1.0" encoding="utf-8"?><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="serif,Symbol,ZapfDingbats" font-size="12pt" text-align="justify" line-height="1.3" font-selection-strategy="character-by-character" line-height-shift-adjustment="disregard-shifts" language="en"><fo:layout-master-set><fo:simple-page-master master-name="blank" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body display-align="center" margin-bottom="15mm" margin-top="10mm"/><fo:region-before region-name="xsl-region-before-blank" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-blank" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-first" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-odd" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-even" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-first" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-odd" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-even" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-first" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-odd" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-even" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-first" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-odd" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-even" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-first" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-odd" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-even" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-first" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="2"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-odd" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="2"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-even" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="2"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="blank-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-blank" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-blank" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-first-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-odd-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-even-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-first-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-odd-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-even-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-first-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-odd-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-even-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-first-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-odd-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-even-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-first-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-odd-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-even-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm - 0pc" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="1" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-first-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="2" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-first" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-odd-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-left="18mm" margin-right="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="2" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-odd" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="10mm" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-even-draft" page-width="210mm" page-height="297mm" margin-top="5mm" margin-bottom="0mm" margin-right="18mm" margin-left="18mm"><fo:region-body margin-bottom="15mm" margin-top="10mm" column-gap="12pt" column-count="2" background-image="http://docbook.sourceforge.net/release/images/draft.png" background-attachment="fixed" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center"/><fo:region-before region-name="xsl-region-before-even" extent="10mm" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="10mm" display-align="after"/></fo:simple-page-master><fo:page-sequence-master master-name="titlepage"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="titlepage-first" page-position="first"/><fo:conditional-page-master-reference master-reference="titlepage-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="titlepage-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="lot"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="lot-first" page-position="first"/><fo:conditional-page-master-reference master-reference="lot-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="lot-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="front"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="front-first" page-position="first"/><fo:conditional-page-master-reference master-reference="front-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="front-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="body"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="body-first" page-position="first"/><fo:conditional-page-master-reference master-reference="body-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="body-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="back"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="back-first" page-position="first"/><fo:conditional-page-master-reference master-reference="back-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="back-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="index"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="index-first" page-position="first"/><fo:conditional-page-master-reference master-reference="index-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="index-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="titlepage-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank-draft" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="titlepage-first-draft" page-position="first"/><fo:conditional-page-master-reference master-reference="titlepage-odd-draft" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="titlepage-odd-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="lot-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank-draft" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="lot-first-draft" page-position="first"/><fo:conditional-page-master-reference master-reference="lot-odd-draft" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="lot-odd-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="front-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank-draft" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="front-first-draft" page-position="first"/><fo:conditional-page-master-reference master-reference="front-odd-draft" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="front-odd-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="body-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank-draft" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="body-first-draft" page-position="first"/><fo:conditional-page-master-reference master-reference="body-odd-draft" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="body-odd-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="back-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank-draft" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="back-first-draft" page-position="first"/><fo:conditional-page-master-reference master-reference="back-odd-draft" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="back-odd-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="index-draft"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank-draft" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="index-first-draft" page-position="first"/><fo:conditional-page-master-reference master-reference="index-odd-draft" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="index-odd-draft"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master></fo:layout-master-set><fox:outline xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="d0e2"><fox:label>Acegi Security</fox:label></fox:outline><fox:outline xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="toc...d0e2"><fox:label>Table of Contents</fox:label></fox:outline><fox:outline xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="preface"><fox:label>Preface</fox:label></fox:outline><fox:destination xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="preface"/><fox:outline xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="overall-architecture"><fox:label>Part I. Overall Architecture</fox:label><fox:outline internal-destination="introduction"><fox:label>Chapter 1. Introduction</fox:label><fox:outline internal-destination="what-is-acegi-security"><fox:label>1.1. What is Acegi Security?</fox:label></fox:outline><fox:destination internal-destination="what-is-acegi-security"/><fox:outline internal-destination="history"><fox:label>1.2. History</fox:label></fox:outline><fox:destination internal-destination="history"/><fox:outline internal-destination="release-numbering"><fox:label>1.3. Release Numbering</fox:label></fox:outline><fox:destination internal-destination="release-numbering"/></fox:outline><fox:destination internal-destination="introduction"/><fox:outline internal-destination="technical-overview"><fox:label>Chapter 2. Technical Overview</fox:label><fox:outline internal-destination="runtime-environment"><fox:label>2.1. Runtime Environment</fox:label></fox:outline><fox:destination internal-destination="runtime-environment"/><fox:outline internal-destination="shared-components"><fox:label>2.2. Shared Components</fox:label></fox:outline><fox:destination internal-destination="shared-components"/><fox:outline internal-destination="common-authentication"><fox:label>2.3. Authentication</fox:label></fox:outline><fox:destination internal-destination="common-authentication"/><fox:outline internal-destination="secure-objects"><fox:label>2.4. Secure Objects</fox:label></fox:outline><fox:destination internal-destination="secure-objects"/><fox:outline internal-destination="common-conclusion"><fox:label>2.5. Conclusion</fox:label></fox:outline><fox:destination internal-destination="common-conclusion"/></fox:outline><fox:destination internal-destination="technical-overview"/><fox:outline internal-destination="supporting-infrastructure"><fox:label>Chapter 3. Supporting Infrastructure</fox:label><fox:outline internal-destination="localization"><fox:label>3.1. Localization</fox:label></fox:outline><fox:destination internal-destination="localization"/><fox:outline internal-destination="filters"><fox:label>3.2. Filters</fox:label></fox:outline><fox:destination internal-destination="filters"/></fox:outline><fox:destination internal-destination="supporting-infrastructure"/><fox:outline internal-destination="channel-security"><fox:label>Chapter 4. Channel Security</fox:label><fox:outline internal-destination="channel-security-overview"><fox:label>4.1. Overview</fox:label></fox:outline><fox:destination internal-destination="channel-security-overview"/><fox:outline internal-destination="channel-security-config"><fox:label>4.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="channel-security-config"/><fox:outline internal-destination="channel-security-conclusion"><fox:label>4.3. Conclusion</fox:label></fox:outline><fox:destination internal-destination="channel-security-conclusion"/></fox:outline><fox:destination internal-destination="channel-security"/><fox:outline internal-destination="taglib"><fox:label>Chapter 5. Tag Libraries</fox:label><fox:outline internal-destination="taglib-overview"><fox:label>5.1. Overview</fox:label></fox:outline><fox:destination internal-destination="taglib-overview"/><fox:outline internal-destination="taglib-config"><fox:label>5.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="taglib-config"/><fox:outline internal-destination="taglib-usage"><fox:label>5.3. Usage</fox:label></fox:outline><fox:destination internal-destination="taglib-usage"/></fox:outline><fox:destination internal-destination="taglib"/></fox:outline><fox:destination xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="overall-architecture"/><fox:outline xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="authentication"><fox:label>Part II. Authentication</fox:label><fox:outline internal-destination="authentication-common-auth-services"><fox:label>Chapter 6. Common Authentication Services</fox:label><fox:outline internal-destination="mechanisms-providers-entry-points"><fox:label>6.1. Mechanisms, Providers and Entry Points</fox:label></fox:outline><fox:destination internal-destination="mechanisms-providers-entry-points"/><fox:outline internal-destination="userdetails-and-associated-types"><fox:label>6.2. UserDetails and Associated Types</fox:label><fox:outline internal-destination="in-memory-service"><fox:label>6.2.1. In-Memory Authentication</fox:label></fox:outline><fox:destination internal-destination="in-memory-service"/><fox:outline internal-destination="jdbc-service"><fox:label>6.2.2. JDBC Authentication</fox:label></fox:outline><fox:destination internal-destination="jdbc-service"/></fox:outline><fox:destination internal-destination="userdetails-and-associated-types"/><fox:outline internal-destination="concurrent-sessions"><fox:label>6.3. Concurrent Session Handling</fox:label></fox:outline><fox:destination internal-destination="concurrent-sessions"/><fox:outline internal-destination="authentication-taglibs"><fox:label>6.4. Authentication Tag Libraries</fox:label></fox:outline><fox:destination internal-destination="authentication-taglibs"/></fox:outline><fox:destination internal-destination="authentication-common-auth-services"/><fox:outline internal-destination="dao-provider"><fox:label>Chapter 7. DAO Authentication Provider</fox:label><fox:outline internal-destination="dao-provider-overview"><fox:label>7.1. Overview</fox:label></fox:outline><fox:destination internal-destination="dao-provider-overview"/><fox:outline internal-destination="dao-provider-config"><fox:label>7.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="dao-provider-config"/></fox:outline><fox:destination internal-destination="dao-provider"/><fox:outline internal-destination="jaas"><fox:label>Chapter 8. Java Authentication and Authorization Service (JAAS) Provider</fox:label><fox:outline internal-destination="jaas-overview"><fox:label>8.1. Overview</fox:label></fox:outline><fox:destination internal-destination="jaas-overview"/><fox:outline internal-destination="jaas-config"><fox:label>8.2. Configuration</fox:label><fox:outline internal-destination="jaas-callbackhandler"><fox:label>8.2.1. JAAS CallbackHandler</fox:label><fox:destination internal-destination="jaas-callback-handler"/></fox:outline><fox:destination internal-destination="jaas-callbackhandler"/><fox:outline internal-destination="jaas-authoritygranter"><fox:label>8.2.2. JAAS AuthorityGranter</fox:label><fox:destination internal-destination="jaas-authority-granter"/></fox:outline><fox:destination internal-destination="jaas-authoritygranter"/></fox:outline><fox:destination internal-destination="jaas-config"/></fox:outline><fox:destination internal-destination="jaas"/><fox:outline internal-destination="siteminder"><fox:label>Chapter 9. Siteminder Authentication Mechanism</fox:label><fox:outline internal-destination="siteminder-overview"><fox:label>9.1. Overview</fox:label></fox:outline><fox:destination internal-destination="siteminder-overview"/><fox:outline internal-destination="siteminder-config"><fox:label>9.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="siteminder-config"/></fox:outline><fox:destination internal-destination="siteminder"/><fox:outline internal-destination="runas"><fox:label>Chapter 10. Run-As Authentication Replacement</fox:label><fox:outline internal-destination="runas-overview"><fox:label>10.1. Overview</fox:label></fox:outline><fox:destination internal-destination="runas-overview"/><fox:outline internal-destination="runas-config"><fox:label>10.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="runas-config"/></fox:outline><fox:destination internal-destination="runas"/><fox:outline internal-destination="form"><fox:label>Chapter 11. Form Authentication Mechanism</fox:label><fox:outline internal-destination="form-overview"><fox:label>11.1. Overview</fox:label></fox:outline><fox:destination internal-destination="form-overview"/><fox:outline internal-destination="form-config"><fox:label>11.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="form-config"/></fox:outline><fox:destination internal-destination="form"/><fox:outline internal-destination="basic"><fox:label>Chapter 12. BASIC Authentication Mechanism</fox:label><fox:outline internal-destination="basic-overview"><fox:label>12.1. Overview</fox:label></fox:outline><fox:destination internal-destination="basic-overview"/><fox:outline internal-destination="basic-config"><fox:label>12.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="basic-config"/></fox:outline><fox:destination internal-destination="basic"/><fox:outline internal-destination="digest"><fox:label>Chapter 13. Digest Authentication</fox:label><fox:outline internal-destination="digest-overview"><fox:label>13.1. Overview</fox:label></fox:outline><fox:destination internal-destination="digest-overview"/><fox:outline internal-destination="digest-config"><fox:label>13.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="digest-config"/></fox:outline><fox:destination internal-destination="digest"/><fox:outline internal-destination="anonymous"><fox:label>Chapter 14. Anonymous Authentication</fox:label><fox:outline internal-destination="anonymous-overview"><fox:label>14.1. Overview</fox:label></fox:outline><fox:destination internal-destination="anonymous-overview"/><fox:outline internal-destination="anonymous-config"><fox:label>14.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="anonymous-config"/></fox:outline><fox:destination internal-destination="anonymous"/><fox:outline internal-destination="remember-me"><fox:label>Chapter 15. Remember-Me Authentication</fox:label><fox:outline internal-destination="remember-me-overview"><fox:label>15.1. Overview</fox:label></fox:outline><fox:destination internal-destination="remember-me-overview"/><fox:outline internal-destination="remember-me-config"><fox:label>15.2. Configuration</fox:label></fox:outline><fox:destination internal-destination="remember-me-config"/></fox:outline><fox:destination internal-destination="remember-me"/><fox:outline internal-destination="x509"><fox:label>Chapter 16. X509 Authentication</fox:label><fox:outline internal-destination="x509-overview"><fox:label>16.1. Overview</fox:label></fox:outline><fox:destination internal-destination="x509-overview"/><fox:outline internal-destination="x509-with-acegi"><fox:label>16.2. Using X509 with Acegi Security</fox:label></fox:outline><fox:destination internal-destination="x509-with-acegi"/><fox:outline internal-destination="x509-config"><fox:label>16.3. Configuration</fox:label></fox:outline><fox:destination internal-destination="x509-config"/></fox:outline><fox:destination internal-destination="x509"/><fox:outline internal-destination="ldap"><fox:label>Chapter 17. LDAP Authentication</fox:label><fox:outline internal-destination="ldap-overview"><fox:label>17.1. Overview</fox:label></fox:outline><fox:destination internal-destination="ldap-overview"/><fox:outline internal-destination="ldap-with-acegi"><fox:label>17.2. Using LDAP with Acegi Security</fox:label><fox:outline internal-destination="ldap-ldap-authenticators"><fox:label>17.2.1. LdapAuthenticator Implementations</fox:label><fox:outline internal-destination="ldap-ldap-authenticators-common"><fox:label>17.2.1.1. Common Functionality</fox:label></fox:outline><fox:destination internal-destination="ldap-ldap-authenticators-common"/><fox:outline internal-destination="ldap-ldap-authenticators-bind"><fox:label>17.2.1.2. BindAuthenticator</fox:label></fox:outline><fox:destination internal-destination="ldap-ldap-authenticators-bind"/><fox:outline internal-destination="ldap-ldap-authenticators-password"><fox:label>17.2.1.3. PasswordComparisonAuthenticator</fox:label></fox:outline><fox:destination internal-destination="ldap-ldap-authenticators-password"/><fox:outline internal-destination="ldap-ldap-authenticators-active-directory"><fox:label>17.2.1.4. Active Directory Authentication</fox:label></fox:outline><fox:destination internal-destination="ldap-ldap-authenticators-active-directory"/></fox:outline><fox:destination internal-destination="ldap-ldap-authenticators"/><fox:outline internal-destination="ldap-dircontextfactory"><fox:label>17.2.2. Connecting to the LDAP Server</fox:label></fox:outline><fox:destination internal-destination="ldap-dircontextfactory"/><fox:outline internal-destination="ldap-searchobjects"><fox:label>17.2.3. LDAP Search Objects</fox:label><fox:outline internal-destination="ldap-searchobjects-filter"><fox:label>17.2.3.1. FilterBasedLdapUserSearch</fox:label><fox:destination internal-destination="ldap-searchobjects-filter-based"/></fox:outline><fox:destination internal-destination="ldap-searchobjects-filter"/></fox:outline><fox:destination internal-destination="ldap-searchobjects"/></fox:outline><fox:destination internal-destination="ldap-with-acegi"/><fox:outline internal-destination="ldap-config"><fox:label>17.3. Configuration</fox:label></fox:outline><fox:destination internal-destination="ldap-config"/></fox:outline><fox:destination internal-destination="ldap"/><fox:outline internal-destination="cas"><fox:label>Chapter 18. CAS Authentication</fox:label><fox:outline internal-destination="cas-overview"><fox:label>18.1. Overview</fox:label></fox:outline><fox:destination internal-destination="cas-overview"/><fox:outline internal-destination="cas-how-it-works"><fox:label>18.2. How CAS Works</fox:label></fox:outline><fox:destination internal-destination="cas-how-it-works"/><fox:outline internal-destination="cas-server"><fox:label>18.3. Optional CAS Server Setup</fox:label><fox:outline internal-destination="cas-server-2"><fox:label>18.3.1. CAS Version 2.0</fox:label></fox:outline><fox:destination internal-destination="cas-server-2"/><fox:outline internal-destination="cas-server-3"><fox:label>18.3.2. CAS Version 3.0</fox:label></fox:outline><fox:destination internal-destination="cas-server-3"/></fox:outline><fox:destination internal-destination="cas-server"/><fox:outline internal-destination="cas-client"><fox:label>18.4. Configuration of CAS Client</fox:label></fox:outline><fox:destination internal-destination="cas-client"/><fox:outline internal-destination="cas-advanced"><fox:label>18.5. Advanced Issues</fox:label></fox:outline><fox:destination internal-destination="cas-advanced"/></fox:outline><fox:destination internal-destination="cas"/><fox:outline internal-destination="ca"><fox:label>Chapter 19. Container Adapter Authentication</fox:label><fox:outline internal-destination="ca-overview"><fox:label>19.1. Overview</fox:label></fox:outline><fox:destination internal-destination="ca-overview"/><fox:outline internal-destination="ca-adapter"><fox:label>19.2. Adapter Authentication Provider</fox:label></fox:outline><fox:destination internal-destination="ca-adapter"/><fox:outline internal-destination="ca-jetty"><fox:label>19.3. Jetty</fox:label></fox:outline><fox:destination internal-destination="ca-jetty"/><fox:outline internal-destination="ca-jboss"><fox:label>19.4. JBoss</fox:label></fox:outline><fox:destination internal-destination="ca-jboss"/><fox:outline internal-destination="ca-resin"><fox:label>19.5. Resin</fox:label></fox:outline><fox:destination internal-destination="ca-resin"/><fox:outline internal-destination="ca-tomcat"><fox:label>19.6. Tomcat</fox:label></fox:outline><fox:destination internal-destination="ca-tomcat"/></fox:outline><fox:destination internal-destination="ca"/></fox:outline><fox:destination xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="authentication"/><fox:outline xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="authorization"><fox:label>Part III. Authorization</fox:label><fox:outline internal-destination="authorization-common"><fox:label>Chapter 20. Common Authorization Concepts</fox:label><fox:outline internal-destination="authorities"><fox:label>20.1. Authorities</fox:label></fox:outline><fox:destination internal-destination="authorities"/><fox:outline internal-destination="pre-invocation"><fox:label>20.2. Pre-Invocation Handling</fox:label></fox:outline><fox:destination internal-destination="pre-invocation"/><fox:outline internal-destination="after-invocation"><fox:label>20.3. After Invocation Handling</fox:label><fox:outline internal-destination="after-invocation-acl-aware"><fox:label>20.3.1. ACL-Aware AfterInvocationProviders</fox:label></fox:outline><fox:destination internal-destination="after-invocation-acl-aware"/><fox:outline internal-destination="after-invocation-acl-aware-old"><fox:label>20.3.2. ACL-Aware AfterInvocationProviders (old ACL module)</fox:label></fox:outline><fox:destination internal-destination="after-invocation-acl-aware-old"/></fox:outline><fox:destination internal-destination="after-invocation"/><fox:outline internal-destination="authorization-taglibs"><fox:label>20.4. Authorization Tag Libraries</fox:label></fox:outline><fox:destination internal-destination="authorization-taglibs"/></fox:outline><fox:destination internal-destination="authorization-common"/><fox:outline internal-destination="secure-object-impls"><fox:label>Chapter 21. Secure Object Implementations</fox:label><fox:outline internal-destination="aop-alliance"><fox:label>21.1. AOP Alliance (MethodInvocation) Security Interceptor</fox:label></fox:outline><fox:destination internal-destination="aop-alliance"/><fox:outline internal-destination="aspectj"><fox:label>21.2. AspectJ (JoinPoint) Security Interceptor</fox:label></fox:outline><fox:destination internal-destination="aspectj"/><fox:outline internal-destination="filter-invocation-authorization"><fox:label>21.3. FilterInvocation Security Interceptor</fox:label></fox:outline><fox:destination internal-destination="filter-invocation-authorization"/></fox:outline><fox:destination internal-destination="secure-object-impls"/><fox:outline internal-destination="domain-acls"><fox:label>Chapter 22. Domain Object Security</fox:label><fox:outline internal-destination="domain-acls-overview"><fox:label>22.1. Overview</fox:label></fox:outline><fox:destination internal-destination="domain-acls-overview"/><fox:outline internal-destination="domain-acls-key-concepts"><fox:label>22.2. Key Concepts</fox:label></fox:outline><fox:destination internal-destination="domain-acls-key-concepts"/></fox:outline><fox:destination internal-destination="domain-acls"/><fox:outline internal-destination="domain-acls-old"><fox:label>Chapter 23. Domain Object Security (old ACL module)</fox:label><fox:outline internal-destination="domain-acls-overview-old"><fox:label>23.1. Overview</fox:label></fox:outline><fox:destination internal-destination="domain-acls-overview-old"/><fox:outline internal-destination="domain-acls-basic-old"><fox:label>23.2. Basic ACL Package</fox:label></fox:outline><fox:destination internal-destination="domain-acls-basic-old"/></fox:outline><fox:destination internal-destination="domain-acls-old"/></fox:outline><fox:destination xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="authorization"/><fox:outline xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="resources"><fox:label>Part IV. Other Resources</fox:label><fox:outline internal-destination="sample-apps"><fox:label>Chapter 24. Sample Applications</fox:label><fox:destination internal-destination="samples"/><fox:outline internal-destination="contacts-sample"><fox:label>24.1. Contacts</fox:label><fox:destination internal-destination="contacts"/></fox:outline><fox:destination internal-destination="contacts-sample"/><fox:outline internal-destination="tutorial-sample"><fox:label>24.2. Tutorial Sample</fox:label></fox:outline><fox:destination internal-destination="tutorial-sample"/></fox:outline><fox:destination internal-destination="sample-apps"/><fox:outline internal-destination="community"><fox:label>Chapter 25. Community Support</fox:label><fox:outline internal-destination="jira"><fox:label>25.1. Use JIRA for Issue Tracking</fox:label></fox:outline><fox:destination internal-destination="jira"/><fox:outline internal-destination="becoming-involved"><fox:label>25.2. Becoming Involved</fox:label></fox:outline><fox:destination internal-destination="becoming-involved"/><fox:outline internal-destination="further-info"><fox:label>25.3. Further Information</fox:label></fox:outline><fox:destination internal-destination="further-info"/></fox:outline><fox:destination internal-destination="community"/></fox:outline><fox:destination xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="resources"/><fox:destination xmlns:fox="http://xml.apache.org/fop/extensions" internal-destination="d0e2"/><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="titlepage" language="en" format="1" initial-page-number="1" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="d0e2"><fo:block><fo:block><fo:block><fo:table table-layout="fixed" width="175mm"><fo:table-column column-width="175mm"/>x
                <fo:table-body><fo:table-row><fo:table-cell text-align="center"><fo:block><fo:external-graphic src="./src/docbook/resources/images/logo.gif"/></fo:block><fo:block font-family="Helvetica" font-size="32pt" font-weight="bold" padding-before="60mm">Acegi Security</fo:block><fo:block font-family="Helvetica" font-size="24pt" padding-before="5mm">Reference Documentation</fo:block><fo:block font-family="Helvetica" font-size="16pt" padding="5mm">1.0.7</fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell text-align="center"><fo:block font-family="Helvetica" font-size="14pt" padding-before="10mm"/></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell text-align="center"><fo:block font-family="Helvetica" font-size="14pt" padding-before="10mm">Ben Alex</fo:block><fo:block font-family="Helvetica" font-size="10pt" padding="5mm"/></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:block></fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="lot" language="en" format="i" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Acegi Security</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Acegi Security</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block space-before.minimum="0.5em" space-before.optimum="1em" space-before.maximum="2em" space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em" id="toc...d0e2"><fo:block><fo:block><fo:block space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="0pc" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="sans-serif,Symbol,ZapfDingbats">Table of Contents</fo:block></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="preface">Preface</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="preface"><fo:page-number-citation ref-id="preface"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="overall-architecture">I.  Overall Architecture</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="overall-architecture"><fo:page-number-citation ref-id="overall-architecture"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.overall-architecture" margin-left="24pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="introduction">1.  Introduction</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="introduction"><fo:page-number-citation ref-id="introduction"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.introduction" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="what-is-acegi-security">1.1.  What is Acegi Security?</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="what-is-acegi-security"><fo:page-number-citation ref-id="what-is-acegi-security"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="history">1.2.  History</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="history"><fo:page-number-citation ref-id="history"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="release-numbering">1.3.  Release Numbering</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="release-numbering"><fo:page-number-citation ref-id="release-numbering"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="technical-overview">2.  Technical Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="technical-overview"><fo:page-number-citation ref-id="technical-overview"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.technical-overview" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="runtime-environment">2.1.  Runtime Environment</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="runtime-environment"><fo:page-number-citation ref-id="runtime-environment"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="shared-components">2.2.  Shared Components</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="shared-components"><fo:page-number-citation ref-id="shared-components"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="common-authentication">2.3.  Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="common-authentication"><fo:page-number-citation ref-id="common-authentication"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="secure-objects">2.4.  Secure Objects</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="secure-objects"><fo:page-number-citation ref-id="secure-objects"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="common-conclusion">2.5.  Conclusion</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="common-conclusion"><fo:page-number-citation ref-id="common-conclusion"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="supporting-infrastructure">3.  Supporting Infrastructure</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="supporting-infrastructure"><fo:page-number-citation ref-id="supporting-infrastructure"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.supporting-infrastructure" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="localization">3.1.  Localization</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="localization"><fo:page-number-citation ref-id="localization"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="filters">3.2.  Filters</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="filters"><fo:page-number-citation ref-id="filters"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="channel-security">4.  Channel Security</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="channel-security"><fo:page-number-citation ref-id="channel-security"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.channel-security" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="channel-security-overview">4.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="channel-security-overview"><fo:page-number-citation ref-id="channel-security-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="channel-security-config">4.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="channel-security-config"><fo:page-number-citation ref-id="channel-security-config"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="channel-security-conclusion">4.3.  Conclusion</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="channel-security-conclusion"><fo:page-number-citation ref-id="channel-security-conclusion"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="taglib">5.  Tag Libraries</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="taglib"><fo:page-number-citation ref-id="taglib"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.taglib" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="taglib-overview">5.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="taglib-overview"><fo:page-number-citation ref-id="taglib-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="taglib-config">5.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="taglib-config"><fo:page-number-citation ref-id="taglib-config"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="taglib-usage">5.3.  Usage</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="taglib-usage"><fo:page-number-citation ref-id="taglib-usage"/></fo:basic-link></fo:inline></fo:block></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="authentication">II.  Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="authentication"><fo:page-number-citation ref-id="authentication"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.authentication" margin-left="24pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="authentication-common-auth-services">6.  Common Authentication Services</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="authentication-common-auth-services"><fo:page-number-citation ref-id="authentication-common-auth-services"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.authentication-common-auth-services" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="mechanisms-providers-entry-points">6.1.  Mechanisms, Providers and Entry Points</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="mechanisms-providers-entry-points"><fo:page-number-citation ref-id="mechanisms-providers-entry-points"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="userdetails-and-associated-types">6.2.  UserDetails and Associated Types</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="userdetails-and-associated-types"><fo:page-number-citation ref-id="userdetails-and-associated-types"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.userdetails-and-associated-types" margin-left="72pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="in-memory-service">6.2.1.  In-Memory Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="in-memory-service"><fo:page-number-citation ref-id="in-memory-service"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="jdbc-service">6.2.2.  JDBC Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="jdbc-service"><fo:page-number-citation ref-id="jdbc-service"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="concurrent-sessions">6.3.  Concurrent Session Handling</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="concurrent-sessions"><fo:page-number-citation ref-id="concurrent-sessions"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="authentication-taglibs">6.4.  Authentication Tag Libraries</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="authentication-taglibs"><fo:page-number-citation ref-id="authentication-taglibs"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="dao-provider">7.  DAO Authentication Provider</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="dao-provider"><fo:page-number-citation ref-id="dao-provider"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.dao-provider" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="dao-provider-overview">7.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="dao-provider-overview"><fo:page-number-citation ref-id="dao-provider-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="dao-provider-config">7.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="dao-provider-config"><fo:page-number-citation ref-id="dao-provider-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="jaas">8.  Java Authentication and Authorization Service (JAAS)
      Provider</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="jaas"><fo:page-number-citation ref-id="jaas"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.jaas" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="jaas-overview">8.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="jaas-overview"><fo:page-number-citation ref-id="jaas-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="jaas-config">8.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="jaas-config"><fo:page-number-citation ref-id="jaas-config"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.jaas-config" margin-left="72pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="jaas-callbackhandler">8.2.1.  JAAS CallbackHandler</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="jaas-callbackhandler"><fo:page-number-citation ref-id="jaas-callbackhandler"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="jaas-authoritygranter">8.2.2.  JAAS AuthorityGranter</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="jaas-authoritygranter"><fo:page-number-citation ref-id="jaas-authoritygranter"/></fo:basic-link></fo:inline></fo:block></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="siteminder">9.  Siteminder Authentication Mechanism</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="siteminder"><fo:page-number-citation ref-id="siteminder"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.siteminder" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="siteminder-overview">9.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="siteminder-overview"><fo:page-number-citation ref-id="siteminder-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="siteminder-config">9.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="siteminder-config"><fo:page-number-citation ref-id="siteminder-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="runas">10.  Run-As Authentication Replacement</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="runas"><fo:page-number-citation ref-id="runas"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.runas" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="runas-overview">10.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="runas-overview"><fo:page-number-citation ref-id="runas-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="runas-config">10.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="runas-config"><fo:page-number-citation ref-id="runas-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="form">11.  Form Authentication Mechanism</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="form"><fo:page-number-citation ref-id="form"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.form" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="form-overview">11.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="form-overview"><fo:page-number-citation ref-id="form-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="form-config">11.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="form-config"><fo:page-number-citation ref-id="form-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="basic">12.  BASIC Authentication Mechanism</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="basic"><fo:page-number-citation ref-id="basic"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.basic" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="basic-overview">12.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="basic-overview"><fo:page-number-citation ref-id="basic-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="basic-config">12.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="basic-config"><fo:page-number-citation ref-id="basic-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="digest">13.  Digest Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="digest"><fo:page-number-citation ref-id="digest"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.digest" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="digest-overview">13.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="digest-overview"><fo:page-number-citation ref-id="digest-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="digest-config">13.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="digest-config"><fo:page-number-citation ref-id="digest-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="anonymous">14.  Anonymous Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="anonymous"><fo:page-number-citation ref-id="anonymous"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.anonymous" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="anonymous-overview">14.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="anonymous-overview"><fo:page-number-citation ref-id="anonymous-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="anonymous-config">14.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="anonymous-config"><fo:page-number-citation ref-id="anonymous-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="remember-me">15.  Remember-Me Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="remember-me"><fo:page-number-citation ref-id="remember-me"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.remember-me" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="remember-me-overview">15.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="remember-me-overview"><fo:page-number-citation ref-id="remember-me-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="remember-me-config">15.2.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="remember-me-config"><fo:page-number-citation ref-id="remember-me-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="x509">16.  X509 Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="x509"><fo:page-number-citation ref-id="x509"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.x509" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="x509-overview">16.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="x509-overview"><fo:page-number-citation ref-id="x509-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="x509-with-acegi">16.2.  Using X509 with Acegi Security</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="x509-with-acegi"><fo:page-number-citation ref-id="x509-with-acegi"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="x509-config">16.3.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="x509-config"><fo:page-number-citation ref-id="x509-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ldap">17.  LDAP Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ldap"><fo:page-number-citation ref-id="ldap"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.ldap" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ldap-overview">17.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ldap-overview"><fo:page-number-citation ref-id="ldap-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ldap-with-acegi">17.2.  Using LDAP with Acegi Security</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ldap-with-acegi"><fo:page-number-citation ref-id="ldap-with-acegi"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.ldap-with-acegi" margin-left="72pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ldap-ldap-authenticators">17.2.1.  LdapAuthenticator Implementations</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ldap-ldap-authenticators"><fo:page-number-citation ref-id="ldap-ldap-authenticators"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ldap-dircontextfactory">17.2.2.  Connecting to the LDAP Server</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ldap-dircontextfactory"><fo:page-number-citation ref-id="ldap-dircontextfactory"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ldap-searchobjects">17.2.3.  LDAP Search Objects</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ldap-searchobjects"><fo:page-number-citation ref-id="ldap-searchobjects"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ldap-config">17.3.  Configuration</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ldap-config"><fo:page-number-citation ref-id="ldap-config"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="cas">18.  CAS Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="cas"><fo:page-number-citation ref-id="cas"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.cas" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="cas-overview">18.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="cas-overview"><fo:page-number-citation ref-id="cas-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="cas-how-it-works">18.2.  How CAS Works</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="cas-how-it-works"><fo:page-number-citation ref-id="cas-how-it-works"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="cas-server">18.3.  Optional CAS Server Setup</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="cas-server"><fo:page-number-citation ref-id="cas-server"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.cas-server" margin-left="72pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="cas-server-2">18.3.1.  CAS Version 2.0</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="cas-server-2"><fo:page-number-citation ref-id="cas-server-2"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="cas-server-3">18.3.2.  CAS Version 3.0</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="cas-server-3"><fo:page-number-citation ref-id="cas-server-3"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="cas-client">18.4.  Configuration of CAS Client</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="cas-client"><fo:page-number-citation ref-id="cas-client"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="cas-advanced">18.5.  Advanced Issues</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="cas-advanced"><fo:page-number-citation ref-id="cas-advanced"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ca">19.  Container Adapter Authentication</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ca"><fo:page-number-citation ref-id="ca"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.ca" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ca-overview">19.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ca-overview"><fo:page-number-citation ref-id="ca-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ca-adapter">19.2.  Adapter Authentication Provider</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ca-adapter"><fo:page-number-citation ref-id="ca-adapter"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ca-jetty">19.3.  Jetty</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ca-jetty"><fo:page-number-citation ref-id="ca-jetty"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ca-jboss">19.4.  JBoss</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ca-jboss"><fo:page-number-citation ref-id="ca-jboss"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ca-resin">19.5.  Resin</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ca-resin"><fo:page-number-citation ref-id="ca-resin"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="ca-tomcat">19.6.  Tomcat</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="ca-tomcat"><fo:page-number-citation ref-id="ca-tomcat"/></fo:basic-link></fo:inline></fo:block></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="authorization">III.  Authorization</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="authorization"><fo:page-number-citation ref-id="authorization"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.authorization" margin-left="24pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="authorization-common">20.  Common Authorization Concepts</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="authorization-common"><fo:page-number-citation ref-id="authorization-common"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.authorization-common" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="authorities">20.1.  Authorities</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="authorities"><fo:page-number-citation ref-id="authorities"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="pre-invocation">20.2.  Pre-Invocation Handling</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="pre-invocation"><fo:page-number-citation ref-id="pre-invocation"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="after-invocation">20.3.  After Invocation Handling</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="after-invocation"><fo:page-number-citation ref-id="after-invocation"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.after-invocation" margin-left="72pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="after-invocation-acl-aware">20.3.1.  ACL-Aware AfterInvocationProviders</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="after-invocation-acl-aware"><fo:page-number-citation ref-id="after-invocation-acl-aware"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="after-invocation-acl-aware-old">20.3.2.  ACL-Aware AfterInvocationProviders (old ACL module)</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="after-invocation-acl-aware-old"><fo:page-number-citation ref-id="after-invocation-acl-aware-old"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="authorization-taglibs">20.4.  Authorization Tag Libraries</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="authorization-taglibs"><fo:page-number-citation ref-id="authorization-taglibs"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="secure-object-impls">21.  Secure Object Implementations</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="secure-object-impls"><fo:page-number-citation ref-id="secure-object-impls"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.secure-object-impls" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="aop-alliance">21.1.  AOP Alliance (MethodInvocation) Security Interceptor</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="aop-alliance"><fo:page-number-citation ref-id="aop-alliance"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="aspectj">21.2.  AspectJ (JoinPoint) Security Interceptor</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="aspectj"><fo:page-number-citation ref-id="aspectj"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="filter-invocation-authorization">21.3.  FilterInvocation Security Interceptor</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="filter-invocation-authorization"><fo:page-number-citation ref-id="filter-invocation-authorization"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="domain-acls">22.  Domain Object Security</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="domain-acls"><fo:page-number-citation ref-id="domain-acls"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.domain-acls" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="domain-acls-overview">22.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="domain-acls-overview"><fo:page-number-citation ref-id="domain-acls-overview"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="domain-acls-key-concepts">22.2.  Key Concepts</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="domain-acls-key-concepts"><fo:page-number-citation ref-id="domain-acls-key-concepts"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="domain-acls-old">23.  Domain Object Security (old ACL module)</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="domain-acls-old"><fo:page-number-citation ref-id="domain-acls-old"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.domain-acls-old" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="domain-acls-overview-old">23.1.  Overview</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="domain-acls-overview-old"><fo:page-number-citation ref-id="domain-acls-overview-old"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="domain-acls-basic-old">23.2.  Basic ACL Package</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="domain-acls-basic-old"><fo:page-number-citation ref-id="domain-acls-basic-old"/></fo:basic-link></fo:inline></fo:block></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="resources">IV.  Other Resources</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="resources"><fo:page-number-citation ref-id="resources"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.resources" margin-left="24pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="sample-apps">24.  Sample Applications</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="sample-apps"><fo:page-number-citation ref-id="sample-apps"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.sample-apps" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="contacts-sample">24.1.  Contacts</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="contacts-sample"><fo:page-number-citation ref-id="contacts-sample"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="tutorial-sample">24.2.  Tutorial Sample</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="tutorial-sample"><fo:page-number-citation ref-id="tutorial-sample"/></fo:basic-link></fo:inline></fo:block></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="community">25.  Community Support</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="community"><fo:page-number-citation ref-id="community"/></fo:basic-link></fo:inline></fo:block><fo:block id="toc.d0e2.community" margin-left="48pt"><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="jira">25.1.  Use JIRA for Issue Tracking</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="jira"><fo:page-number-citation ref-id="jira"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="becoming-involved">25.2.  Becoming Involved</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="becoming-involved"><fo:page-number-citation ref-id="becoming-involved"/></fo:basic-link></fo:inline></fo:block><fo:block text-align-last="justify" text-align="start" end-indent="24pt" last-line-end-indent="-24pt"><fo:inline keep-with-next.within-line="always"><fo:basic-link internal-destination="further-info">25.3.  Further Information</fo:basic-link></fo:inline><fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <fo:basic-link internal-destination="further-info"><fo:page-number-citation ref-id="further-info"/></fo:basic-link></fo:inline></fo:block></fo:block></fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="front" language="en" format="i" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Preface</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Preface</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="preface"><fo:block><fo:block><fo:block margin-left="0pc" font-size="24.8832pt" font-family="sans-serif,Symbol,ZapfDingbats" font-weight="bold"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Preface</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security provides a comprehensive security solution for
    J2EE-based enterprise software applications. As you will discover as you
    venture through this reference guide, we have tried to provide you a
    useful and highly configurable security system.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Security is an ever-moving target, and it's important to pursue a
    comprehensive, system-wide approach. In security circles we encourage you
    to adopt "layers of security", so that each layer tries to be as secure as
    possible in its own right, with successive layers providing additional
    security. The "tighter" the security of each layer, the more robust and
    safe your application will be. At the bottom level you'll need to deal
    with issues such as transport security and system identification, in order
    to mitigate man-in-the-middle attacks. Next you'll generally utilise
    firewalls, perhaps with VPNs or IP security to ensure only authorised
    systems can attempt to connect. In corporate environments you may deploy a
    DMZ to separate public-facing servers from backend database and
    application servers. Your operating system will also play a critical part,
    addressing issues such as running processes as non-privileged users and
    maximising file system security. An operating system will usually also be
    configured with its own firewall. Hopefully somewhere along the way you'll
    be trying to prevent denial of service and brute force attacks against the
    system. An intrusion detection system will also be especially useful for
    monitoring and responding to attacks, with such systems able to take
    protective action such as blocking offending TCP/IP addresses in
    real-time. Moving to the higher layers, your Java Virtual Machine will
    hopefully be configured to minimize the permissions granted to different
    Java types, and then your application will add its own problem
    domain-specific security configuration. Acegi Security makes this latter
    area - application security - much easier.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Of course, you will need to properly address all security layers
    mentioned above, together with managerial factors that encompass every
    layer. A non-exhaustive list of such managerial factors would include
    security bulletin monitoring, patching, personnel vetting, audits, change
    control, engineering management systems, data backup, disaster recovery,
    performance benchmarking, load monitoring, centralised logging, incident
    response procedures etc.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">With Acegi Security being focused on helping you with the enterprise
    application security layer, you will find that there are as many different
    requirements as there are business problem domains. A banking application
    has different needs from an ecommerce application. An ecommerce
    application has different needs from a corporate sales force automation
    tool. These custom requirements make application security interesting,
    challenging and rewarding.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">This reference guide has been largely restructured for the 1.0.0
    release of Acegi Security. Please read Part I, <fo:basic-link internal-destination="overall-architecture"><fo:inline xmlns:xlink="http://www.w3.org/1999/xlink">Overall Architecture</fo:inline></fo:basic-link>, in its
    entirety. The remaining parts of the reference guide are structured in a
    more traditional reference style, designed to be read on an as-required
    basis.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">We hope that you find this reference guide useful, and we welcome
    your feedback and <fo:basic-link internal-destination="jira"><fo:inline xmlns:xlink="http://www.w3.org/1999/xlink">suggestions</fo:inline></fo:basic-link>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Finally, welcome to the Acegi Security <fo:basic-link internal-destination="community"><fo:inline xmlns:xlink="http://www.w3.org/1999/xlink">community</fo:inline></fo:basic-link>.</fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="titlepage" language="en" format="1" initial-page-number="1" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="overall-architecture"><fo:block><fo:block><fo:block text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always" hyphenate="false">Part I. Overall Architecture</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Like most software, Acegi Security has certain central interfaces,
      classes and conceptual abstractions that are commonly used throughout
      the framework. In this part of the reference guide we will introduce
      Acegi Security, before examining these central elements that are
      necessary to successfully planning and executing an Acegi Security
      integration.</fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Introduction</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Introduction</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="introduction"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 1. Introduction</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="what-is-acegi-security"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">What is Acegi Security?</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">1.1. What is Acegi Security?</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security provides comprehensive security services for
        J2EE-based enterprise software applications. There is a particular
        emphasis on supporting projects built using The Spring Framework,
        which is the leading J2EE solution for enterprise software
        development. If you're not using Spring for developing enterprise
        applications, we warmly encourage you to take a closer look at it.
        Some familiarity with Spring - and in particular dependency injection
        principles - will help you get up to speed with Acegi Security more
        easily.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">People use Acegi Security for many reasons, but most are drawn
        to the project after finding the security features of J2EE's Servlet
        Specification or EJB Specification lack the depth required for typical
        enterprise application scenarios. Whilst mentioning these standards,
        it's important to recognise that they are not portable at a WAR or EAR
        level. Therefore, if you switch server environments, it is typically a
        lot of work to reconfigure your application's security in the new
        target environment. Using Acegi Security overcomes these problems, and
        also brings you dozens of other useful, entirely customisable security
        features.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">As you probably know, security comprises two major operations.
        The first is known as "authentication", which is the process of
        establishing a principal is who they claim to be. A "principal"
        generally means a user, device or some other system which can perform
        an action in your application. "Authorization" refers to the process
        of deciding whether a principal is allowed to perform an action in
        your application. To arrive at the point where an authorization
        decision is needed, the identity of the principal has already been
        established by the authentication process. These concepts are common,
        and not at all specific to Acegi Security.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">At an authentication level, Acegi Security supports a wide range
        of authentication models. Most of these authentication models are
        either provided by third parties, or are developed by relevant
        standards bodies such as the Internet Engineering Task Force. In
        addition, Acegi Security provides its own set of authentication
        features. Specifically, Acegi Security currently supports
        authentication with all of these technologies:</fo:block><fo:list-block space-before.optimum="-0.3em" space-before.minimum="-0.5em" space-before.maximum="0em" space-after.optimum="0.8em" space-after.minimum="0.4em" space-after.maximum="1.2em" margin-left="1.6em" provisional-label-separation="0.2em" provisional-distance-between-starts="1.0em" id="d0e63"><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e64"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>HTTP BASIC authentication headers (an IEFT RFC-based
            standard)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e67"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>HTTP Digest authentication headers (an IEFT RFC-based
            standard)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e70"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>HTTP X.509 client certificate exchange (an IEFT RFC-based
            standard)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e73"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>LDAP (a very common approach to cross-platform
            authentication needs, especially in large environments)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e76"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Form-based authentication (for simple user interface
            needs)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e79"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Computer Associates Siteminder</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e82"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>JA-SIG Central Authentication Service (otherwise known as
            CAS, which is a popular open source single sign on system)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e85"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Transparent authentication context propagation for Remote
            Method Invocation (RMI) and HttpInvoker (a Spring remoting
            protocol)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e88"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Automatic "remember-me" authentication (so you can tick a
            box to avoid re-authentication for a predetermined period of
            time)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e91"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Anonymous authentication (allowing every call to
            automatically assume a particular security identity)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e94"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Run-as authentication (which is useful if one call should
            proceed with a different security identity)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e97"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Java Authentication and Authorization Service (JAAS)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e100"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Container integration with JBoss, Jetty, Resin and Tomcat
            (so you can still use Container Manager Authentication if
            desired)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e103"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Your own authentication systems (see below)</fo:block></fo:block></fo:list-item-body></fo:list-item></fo:list-block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Many independent software vendors (ISVs) adopt Acegi Security
        because of this rich choice of authentication models. Doing so allows
        them to quickly integrate their solutions with whatever their end
        clients need, without undertaking a lot of engineering or requiring
        the client to change their environment. If none of the above
        authentication mechanisms suit your needs, Acegi Security is an open
        platform and it is quite simple to write your own authentication
        mechanism. Many corporate users of Acegi Security need to integrate
        with "legacy" systems that don't follow any particular security
        standards, and Acegi Security is happy to "play nicely" with such
        systems.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Sometimes the mere process of authentication isn't enough.
        Sometimes you need to also differentiate security based on the way a
        principal is interacting with your application. For example, you might
        want to ensure requests only arrive over HTTPS, in order to protect
        passwords from eavesdropping or end users from man-in-the-middle
        attacks. Or, you might want to ensure that an actual human being is
        making the requests and not some robot or other automated process.
        This is especially helpful to protect password recovery processes from
        brute force attacks, or simply to make it harder for people to
        duplicate your application's key content. To help you achieve these
        goals, Acegi Security fully supports automatic "channel security",
        together with JCaptcha integration for human user detection.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Irrespective of how authentication was undertaken, Acegi
        Security provides a deep set of authorization capabilities. There are
        three main areas of interest in respect of authorization, these being
        authorizing web requests, authorizing methods can be invoked, and
        authorizing access to individual domain object instances. To help you
        understand the differences, consider the authorization capabilities
        found in the Servlet Specification web pattern security, EJB Container
        Managed Security and file system security respectively. Acegi Security
        provides deep capabilities in all of these important areas, which
        we'll explore later in this reference guide.</fo:block></fo:block><fo:block id="history"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">History</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">1.2. History</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security began in late 2003, when a question was posed on
        the Spring Developers' mailing list asking whether there had been any
        consideration given to a Spring-based security implementation. At the
        time the Spring community was relatively small (especially by today's
        size!), and indeed Spring itself had only existed as a SourceForge
        project from early 2003. The response to the question was that it was
        a worthwhile area, although a lack of time currently prevented its
        exploration.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">With that in mind, a simple security implementation was built
        and not released. A few weeks later another member of the Spring
        community inquired about security, and at the time this code was
        offered to them. Several other requests followed, and by January 2004
        around twenty people were using the code. These pioneering users were
        joined by others who suggested a SourceForge project was in order,
        which was duly established in March 2004.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In those early days, the project didn't have any of its own
        authentication modules. Container Managed Security was relied upon for
        the authentication process, with Acegi Security instead focusing on
        authorization. This was suitable at first, but as more and more users
        requested additional container support, the fundamental limitation of
        container-specific authentication realm interfaces was experienced.
        There was also a related issue of adding new JARs to the container's
        classpath, which was a common source of end user confusion and
        misconfiguration.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security-specific authentication services were
        subsequently introduced. Around a year later, the Acegi Security
        became an official Spring Framework subproject. The 1.0.0 final
        release was published in May 2006 - after more than two and a half
        years of active use in numerous production software projects and many
        hundreds of improvements and community contributions.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Today Acegi Security enjoys a strong and active open source
        community. There are thousands of messages about Acegi Security on the
        support forums. Fourteen developers work on the code itself, with an
        active community who also regularly share patches and support their
        peers.</fo:block></fo:block><fo:block id="release-numbering"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Release Numbering</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">1.3. Release Numbering</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">It is useful to understand how Acegi Security release numbers
        work, as it will help you identify the effort (or lack thereof)
        involved in migrating to future releases of the project. Officially,
        we use the Apache Portable Runtime Project versioning guidelines,
        which can be viewed at
        <fo:inline font-family="monospace" font-size="0.7em">http://apr.apache.org/versioning.html</fo:inline>. We quote the
        introduction contained on that page for your convenience:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">“Versions are denoted using a standard triplet of
        integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions
        are incompatible, large-scale upgrades of the API. MINOR versions
        retain source and binary compatibility with older minor versions, and
        changes in the PATCH level are perfectly compatible, forwards and
        backwards.”</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Technical Overview</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Technical Overview</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="technical-overview"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 2. Technical Overview</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="runtime-environment"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Runtime Environment</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">2.1. Runtime Environment</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security is written to execute within a standard Java 1.3
        Runtime Environment. It also supports Java 5.0, although the Java
        types which are specific to this release are packaged in a separate
        package with the suffix "tiger" in their JAR filename. As Acegi
        Security aims to operate in a self-contained manner, there is no need
        to place any special configuration files into your Java Runtime
        Environment. In particular, there is no need to configure a special
        Java Authentication and Authorization Service (JAAS) policy file or
        place Acegi Security into common classpath locations.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Similarly, if you are using an EJB Container or Servlet
        Container there is no need to put any special configuration files
        anywhere, nor include Acegi Security in a server classloader.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">This above design offers maximum deployment time flexibility, as
        you can simply copy your target artifact (be it a JAR, WAR or EAR)
        from one system to another and it will immediately work.</fo:block></fo:block><fo:block id="shared-components"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Shared Components</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">2.2. Shared Components</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Let's explore some of the most important shared components in
        Acegi Security. Components are considered "shared" if they are central
        to the framework and the framework cannot operate without them. These
        Java types represent the building blocks of the remaining system, so
        it's important to understand that they're there, even if you don't
        need to directly interact with them.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The most fundamental object is
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>. This is where we store
        details of the present security context of the application, which
        includes details of the principal currently using the application. By
        default the <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> uses a
        <fo:inline font-family="monospace" font-size="0.7em">ThreadLocal</fo:inline> to store these details, which means
        that the security context is always available to methods in the same
        thread of execution, even if the security context is not explicitly
        passed around as an argument to those methods. Using a
        <fo:inline font-family="monospace" font-size="0.7em">ThreadLocal</fo:inline> in this way is quite safe if care is
        taken to clear the thread after the present principal's request is
        processed. Of course, Acegi Security takes care of this for you
        automatically so there is no need to worry about it.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Some applications aren't entirely suitable for using a
        <fo:inline font-family="monospace" font-size="0.7em">ThreadLocal</fo:inline>, because of the specific way they work
        with threads. For example, a Swing client might want all threads in a
        Java Virtual Machine to use the same security context. For this
        situation you would use the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder.MODE_GLOBAL</fo:inline>. Other
        applications might want to have threads spawned by the secure thread
        also assume the same security identity. This is achieved by using
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder.MODE_INHERITABLETHREADLOCAL</fo:inline>.
        You can change the mode from the default
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder.MODE_THREADLOCAL</fo:inline> in two ways.
        The first is to set a system property. Alternatively, call a static
        method on <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>. Most applications
        won't need to change from the default, but if you do, take a look at
        the JavaDocs for <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> to learn
        more.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Inside the <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> we store
        details of the principal currently interacting with the application.
        Acegi Security uses an <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object to
        represent this information. Whilst you won't normally need to create
        an <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object yourself, it is fairly
        common for users to query the <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>
        object. You can use the following code block - from anywhere in your
        application - to do this:</fo:block><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e201">Object obj = SecurityContextHolder.getContext().getAuthentication().getPrincipal();

if (obj instanceof UserDetails) {
  String username = ((UserDetails)obj).getUsername();
} else {
  String username = obj.toString();
}</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The above code introduces a number of interesting relationships
        and key objects. First, you will notice that there is an intermediate
        object between <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>. The
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder.getContext()</fo:inline> method is
        actually returning a <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline>. Acegi
        Security uses a few different <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline>
        implementations, such as if we need to store special information
        related to a request that is not principal-specific. A good example of
        this is our JCaptcha integration, which needs to know whether the
        current request came from a human user or not. Because such a decision
        has nothing at all to do with the principal the request may or may not
        be authenticated as, we store it in the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Another item to note from the above code fragment is that you
        can obtain a principal from the <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>
        object. The principal is just an <fo:inline font-family="monospace" font-size="0.7em">Object</fo:inline>. Most of
        the time this can be cast into a <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline>
        object. <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> is a central interface in Acegi
        Security. It represents a principal, but in an extensible and
        application-specific way. Think of <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> as
        the adapter between your own user database and what Acegi Security
        needs inside the <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>. Being a
        representation of something from your own user database, quite often
        you will cast the <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> to the original
        object that your application provided, so you can call
        business-specific methods (like <fo:inline font-family="monospace" font-size="0.7em">getEmail()</fo:inline>,
        <fo:inline font-family="monospace" font-size="0.7em">getEmployeeNumber()</fo:inline> and so on).</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">By now you're probably wondering, so when do I provide a
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object? How do I do that? I thought you
        said this thing was declarative and I didn't need to write any Java
        code - what gives? The short answer is that there is a special
        interface called <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>. The only
        method on this interface accepts a <fo:inline font-family="monospace" font-size="0.7em">String</fo:inline>-based
        username argument and returns a <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline>. Most
        authentication providers that ship with Acegi Security delegate to a
        <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> as part of the authentication
        process. The <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> is used to build
        the <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object that is stored in the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>. The good news is that we
        provide a number of <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>
        implementations, including one that uses an in-memory map and another
        that uses JDBC. Most users tend to write their own, though, with such
        implementations often simply sitting on top of an existing Data Access
        Object (DAO) that represents their employees, customers, or other
        users of the enterprise application. Remember the advantage that
        whatever your UserDetailsService returns can always be obtained from
        the <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>, as per the above code
        fragment.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Besides the principal, another important method provided by
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> is
        <fo:inline font-family="monospace" font-size="0.7em">getAuthorities(</fo:inline>). This method provides an array of
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline> objects. A
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline> is, not surprisingly, an authority
        that is granted to the principal. Such authorities are usually
        "roles", such as <fo:inline font-family="monospace" font-size="0.7em">ROLE_ADMINISTRATOR</fo:inline> or
        <fo:inline font-family="monospace" font-size="0.7em">ROLE_HR_SUPERVISOR</fo:inline>. These roles are later on
        configured for web authorization, method authorization and domain
        object authorization. Other parts of Acegi Security are capable of
        interpreting these authorities, and expect them to be present.
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline> objects are usually loaded by
        the <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Usually the <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline> objects are
        application-wide permissions. They are not specific to a given domain
        object. Thus, you wouldn't likely have a
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline> to represent a permission to
        <fo:inline font-family="monospace" font-size="0.7em">Employee</fo:inline> object number 54, because if there are
        thousands of such authorities you would quickly run out of memory (or,
        at the very least, cause the application to take a long time to
        authenticate a user). Of course, Acegi Security is expressly designed
        to handle this common requirement, but you'd instead use the project's
        domain object security capabilities for this purpose.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Last but not least, sometimes you will need to store the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline> between HTTP requests. Other times
        the principal will re-authenticate on every request, although most of
        the time it will be stored. The
        <fo:inline font-family="monospace" font-size="0.7em">HttpSessionContextIntegrationFilter</fo:inline> is responsible
        for storing a <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline> between HTTP
        requests. As suggested by the name of the class, the
        <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> is used to store this information. You
        should never interact directly with the <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline>
        for security purposes. There is simply no justification for doing so -
        always use the <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>
        instead.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Just to recap, the major building blocks of Acegi Security
        are:</fo:block><fo:list-block space-before.optimum="-0.3em" space-before.minimum="-0.5em" space-before.maximum="0em" space-after.optimum="0.8em" space-after.minimum="0.4em" space-after.maximum="1.2em" margin-left="1.6em" provisional-label-separation="0.2em" provisional-distance-between-starts="1.0em" id="d0e343"><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e344"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>, to provide any
            type access to the <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline>.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e352"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline>, to hold the
            <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> and possibly request-specific
            security information.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e360"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">HttpSessionContextIntegrationFilter</fo:inline>, to
            store the <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline> in the
            <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> between web requests.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e371"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>, to represent the
            principal in an Acegi Security-specific manner.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e376"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline>, to reflect the
            application-wide permissions granted to a principal.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e381"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline>, to provide the necessary
            information to build an Authentication object from your
            application's DAOs.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="0em" space-before.minimum="0em" space-before.maximum="0.2em" id="d0e386"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>, to create a
            <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> when passed in a
            <fo:inline font-family="monospace" font-size="0.7em">String</fo:inline>-based username (or certificate ID or
            alike).</fo:block></fo:block></fo:list-item-body></fo:list-item></fo:list-block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Now that you've gained an understanding of these repeatedly-used
        components, let's take a closer look at the process of
        authentication.</fo:block></fo:block><fo:block id="common-authentication"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Authentication</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">2.3. Authentication</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">As mentioned in the beginning of this reference guide, Acegi
        Security can participate in many different authentication
        environments. Whilst we recommend people use Acegi Security for
        authentication and not integrate with existing Container Managed
        Authentication, it is nevertheless supported - as is integrating with
        your own proprietary authentication system. Let's first explore
        authentication from the perspective of Acegi Security managing web
        security entirely on its own, which is illustrative of the most
        complex and most common situation.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Consider a typical web application's authentication
        process:</fo:block><fo:list-block space-before.optimum="-0.3em" space-before.minimum="-0.5em" space-before.maximum="0em" space-after.optimum="0.8em" space-after.minimum="0.4em" space-after.maximum="1.2em" margin-left="1.6em" provisional-label-separation="0.2em" provisional-distance-between-starts="1.2em" id="d0e406"><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e407"><fo:list-item-label end-indent="label-end()"><fo:block>1.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>You visit the home page, and click on a link.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e410"><fo:list-item-label end-indent="label-end()"><fo:block>2.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>A request goes to the server, and the server decides that
            you've asked for a protected resource.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e413"><fo:list-item-label end-indent="label-end()"><fo:block>3.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>As you're not presently authenticated, the server sends back
            a response indicating that you must authenticate. The response
            will either be an HTTP response code, or a redirect to a particular
            web page.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e416"><fo:list-item-label end-indent="label-end()"><fo:block>4.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Depending on the authentication mechanism, your browser will
            either redirect to the specific web page so that you can fill out
            the form, or the browser will somehow retrieve your identity (eg a
            BASIC authentication dialogue box, a cookie, a X509 certificate
            etc).</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e419"><fo:list-item-label end-indent="label-end()"><fo:block>5.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>The browser will send back a response to the server. This
            will either be an HTTP POST containing the contents of the form
            that you filled out, or an HTTP header containing your
            authentication details.</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e422"><fo:list-item-label end-indent="label-end()"><fo:block>6.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Next the server will decide whether or not the presented
            credentials are valid. If they're valid, the next step will
            happen. If they're invalid, usually your browser will be asked to
            try again (so you return to step two above).</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e425"><fo:list-item-label end-indent="label-end()"><fo:block>7.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>The original request that you made to cause the
            authentication process will be retried. Hopefully you've
            authenticated with sufficient granted authorities to access the
            protected resource. If you have sufficient access, the request
            will be successful. Otherwise, you'll receive back an HTTP error
            code 403, which means "forbidden".</fo:block></fo:block></fo:list-item-body></fo:list-item></fo:list-block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security has distinct classes responsible for most of the
        steps described above. The main participants (in the order that they
        are used) are the <fo:inline font-family="monospace" font-size="0.7em">ExceptionTranslationFilter</fo:inline>, an
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline>, an authentication
        mechanism, and an <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:inline font-family="monospace" font-size="0.7em">ExceptionTranslationFilter</fo:inline> is an Acegi
        Security filter that has responsibility for detecting any Acegi
        Security exceptions that are thrown. Such exceptions will generally be
        thrown by an <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline>, which is
        the main provider of authorization services. We will discuss
        <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> in the next section,
        but for now we just need to know that it produces Java exceptions and
        knows nothing about HTTP or how to go about authenticating a
        principal. Instead the <fo:inline font-family="monospace" font-size="0.7em">ExceptionTranslationFilter</fo:inline>
        offers this service, with specific responsibility for either returning
        error code 403 (if the principal has been authenticated and therefore
        simply lacks sufficient access - as per step seven above), or
        launching an <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline> (if the
        principal has not been authenticated and therefore we need to go
        commence step three).</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline> is responsible
        for step three in the above list. As you can imagine, each web
        application will have a default authentication strategy (well, this
        can be configured like nearly everything else in Acegi Security, but
        let's keep it simple for now). Each major authentication system will
        have its own <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline>
        implementation, which takes actions such as described in step
        three.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">After your browser decides to submit your authentication
        credentials (either as an HTTP form post or HTTP header) there needs to
        be something on the server that "collects" these authentication
        details. By now we're at step six in the above list. In Acegi Security
        we have a special name for the function of collecting authentication
        details from a user agent (usually a web browser), and that name is
        "authentication mechanism". After the authentication details are
        collected from the user agent, an "<fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>
        request" object is built and then presented to an
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The last played in the Acegi Security authentication process is
        an <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>. Quite simply, it is
        responsible for taking an <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> request
        object and deciding whether or not it is valid. The provider will
        either throw an exception or return a fully populated
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object. Remember our good friends,
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>? If not, head back to the
        previous section and refresh your memory. Most
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>s will ask a
        <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> to provide a
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object. As mentioned earlier, most
        application will provide their own
        <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>, although some will be able to
        use the JDBC or in-memory implementation that ships with Acegi
        Security. The resultant <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object - and
        particularly the <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority[]</fo:inline>s contained
        within the <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object - will be used when
        building the fully populated <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>
        object.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">After the authentication mechanism receives back the
        fully-populated <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object, it will deem
        the request valid, put the <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> into the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>, and cause the original
        request to be retried (step seven above). If, on the other hand, the
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline> rejected the request, the
        authentication mechanism will ask the user agent to retry (step two
        above).</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Whilst this describes the typical authentication workflow, the
        good news is that Acegi Security doesn't mind how you put an
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> inside the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>. The only critical
        requirement is that the <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>
        contains an <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> that represents a
        principal before the <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline>
        needs to authorize a request.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You can (and many users do) write their own filters or MVC
        controllers to provide interoperability with authentication systems
        that are not based on Acegi Security. For example, you might be using
        Container Managed Authentication which makes the current user
        available from a ThreadLocal or JNDI location. Or you might work for a
        company that has a legacy proprietary authentication system, which is
        a corporate "standard" over which you have little control. In such
        situations it's quite easy to get Acegi Security to work, and still
        provide authorization capabilities. All you need to do is write a
        filter (or equivalent) that reads the third-party user information
        from a location, build an Acegi Security-specific Authentication
        object, and put it onto the SecurityContextHolder. It's quite easy to
        do this, and it is a fully-supported integration approach.</fo:block></fo:block><fo:block id="secure-objects"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Secure Objects</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">2.4. Secure Objects</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">If you're familiar with AOP, you'd be aware there are different
        types of advice available: before, after, throws and around. An around
        advice is very useful, because an advisor can elect whether or not to
        proceed with a method invocation, whether or not to modify the
        response, and whether or not to throw an exception. Acegi Security
        provides an around advice for method invocations as well as web
        requests. We achieve an around advice for method invocations using AOP
        Alliance, and we achieve an around advice for web requests using a
        standard Filter.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">For those not familiar with AOP, the key point to understand is
        that Acegi Security can help you protect method invocations as well as
        web requests. Most people are interested in securing method
        invocations on their services layer. This is because the services
        layer is where most business logic resides in current-generation J2EE
        applications (for clarification, the author disapproves of this design
        and instead advocates properly encapsulated domain objects together
        with the DTO, assembly, facade and transparent persistence patterns,
        but as anemic domain objects is the present mainstream approach, we'll
        talk about it here). If you just need to secure method invocations to
        the services layer, using the Spring's standard AOP platform
        (otherwise known as AOP Alliance) will be adequate. If you need to
        secure domain objects directly, you will likely find that AspectJ is
        worth considering.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You can elect to perform method authorization using AspectJ or
        AOP Alliance, or you can elect to perform web request authorization
        using filters. You can use zero, one, two or three of these approaches
        together. The mainstream usage is to perform some web request
        authorization, coupled with some AOP Alliance method invocation
        authorization on the services layer.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security uses the term "secure object" to refer to any
        object that can have security applied to it. Each secure object
        supported by Acegi Security has its own class, which is a subclass of
        <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline>. Importantly, by the
        time the <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> is run, the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> will contain a valid
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> if the principal has been
        authenticated.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> provides a
        consistent workflow for handling secure object requests. This workflow
        includes looking up the "configuration attributes" associated with the
        present request. A "configuration attribute" can be thought of as a
        String that has special meaning to the classes used by
        <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline>. They're normally
        configured against your <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline>
        using XML. Anyway, the <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> will ask an
        <fo:inline font-family="monospace" font-size="0.7em">AccessDecisionManager</fo:inline> "here's the configuration
        attributes, here's the current <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>
        object, and here's details of the current request - is this particular
        principal allowed to perform this particular operation?".</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Assuming <fo:inline font-family="monospace" font-size="0.7em">AccessDecisionManager</fo:inline> decides to
        allow the request, the <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline>
        will normally just proceed with the request. Having said that, on rare
        occasions users may want to replace the
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> inside the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline> with a different
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>, which is handled by the
        <fo:inline font-family="monospace" font-size="0.7em">AccessDecisionManager</fo:inline> calling a
        <fo:inline font-family="monospace" font-size="0.7em">RunAsManager</fo:inline>. This might be useful in reasonably
        unusual situations, such as if a services layer method needs to call a
        remote system and present a different identity. Because Acegi Security
        automatically propagates security identity from one server to another
        (assuming you're using a properly-configured RMI or HttpInvoker
        remoting protocol client), this may be useful.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Following the secure object proceeding and then returning -
        which may mean a method invocation completing or a filter chain
        proceeding - the <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> gets
        one final chance to handle the invocation. At this stage the
        <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> is interested in
        possibly modifying the return object. We might want this to happen
        because an authorization decision couldn't be made "on the way in" to
        a secure object invocation. Being highly pluggable,
        <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> will pass control to an
        <fo:inline font-family="monospace" font-size="0.7em">AfterInvocationManager</fo:inline> to actually modify the
        object if needed. This class even can entirely replace the object, or
        throw an exception, or not change it in any way.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Because <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> is the
        central template class, it seems fitting that the first figure should
        be devoted to it.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block id="d0e631" text-align="center"><fo:external-graphic src="/Users/luke/Work/acegisecurity-1.0.x/src/docbkx/images/SecurityInterception.gif" width="auto" height="auto" content-width="auto" content-height="auto" content-type="content-type:image/gif" text-align="center"/><fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Figure 1: The key "secure object" model</fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Only developers contemplating an entirely new way of
        intercepting and authorizing requests would need to use secure objects
        directly. For example, it would be possible to build a new secure
        object to secure calls to a messaging system. Anything that requires
        security and also provides a way of intercepting a call (like the AOP
        around advice semantics) is capable of being made into a secure
        object. Having said that, most Spring applications will simply use the
        three currently supported secure object types (AOP Alliance
        <fo:inline font-family="monospace" font-size="0.7em">MethodInvocation</fo:inline>, AspectJ
        <fo:inline font-family="monospace" font-size="0.7em">JoinPoint</fo:inline> and web request
        <fo:inline font-family="monospace" font-size="0.7em">FilterInterceptor</fo:inline>) with complete
        transparency.</fo:block></fo:block><fo:block id="common-conclusion"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Conclusion</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">2.5. Conclusion</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Congratulations! You have enough of a high-level picture of
        Acegi Security to embark on your project. We've explored the shared
        components, how authentication works, and reviewed the common
        authorization concept of a "secure object". Everything that follows in
        this reference guide may or may not apply to your particular needs,
        and can be read in any order.</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Supporting Infrastructure</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Supporting Infrastructure</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="supporting-infrastructure"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 3. Supporting Infrastructure</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">This chapter introduces some of the supplementary and supporting
      infrastructure used by Acegi Security. If a capability is not directly
      related to security, yet included in the Acegi Security project, we will
      discuss it in this chapter.</fo:block><fo:block id="localization"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Localization</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">3.1. Localization</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security supports localization of exception messages that
        end users are likely to see. If your application is designed for
        English users, you don't need to do anything as by default all Acegi
        Security messages are in English. If you need to support other
        locales, everything you need to know is contained in this
        section.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">All exception messages can be localized, including messages
        related to authentication failures and access being denied
        (authorization failures). Exceptions and logging that is focused on
        developers or system deployers (including incorrect attributes,
        interface contract violations, using incorrect constructors, startup
        time validation, debug-level logging) etc are not localized and
        instead are hard-coded in English within Acegi Security's code.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Shipping in the <fo:inline font-family="monospace" font-size="0.7em">acegi-security-xx.jar</fo:inline> you
        will find an <fo:inline font-family="monospace" font-size="0.7em">org.acegisecurity</fo:inline> package that in turn
        contains a <fo:inline font-family="monospace" font-size="0.7em">messages.properties</fo:inline> file. This should be
        referred to by your <fo:inline font-family="monospace" font-size="0.7em">ApplicationContext</fo:inline>, as Acegi
        Security classes implement Spring's
        <fo:inline font-family="monospace" font-size="0.7em">MessageSourceAware</fo:inline> interface and expect the message
        resolver to be dependency injected at application context startup
        time. Usually all you need to do is register a bean inside your
        application context to refer to the messages. An example is shown
        below:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e685">&lt;bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt;
  &lt;property name="basename"&gt;&lt;value&gt;org/acegisecurity/messages&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">messages.properties</fo:inline> is named in
        accordance with standard resource bundles and represents the default
        language supported by Acegi Securtiy messages. This default file is in
        English. If you do not register a message source, Acegi Security will
        still work correctly and fallback to hard-coded English versions of
        the messages.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">If you wish to customize the
        <fo:inline font-family="monospace" font-size="0.7em">messages.properties</fo:inline> file, or support other
        languages, you should copy the file, rename it accordingly, and
        register it inside the above bean definition. There are not a large
        number of message keys inside this file, so localization should not be
        considered a major initiative. If you do perform localization of this
        file, please consider sharing your work with the community by logging
        a JIRA task and attaching your appropriately-named localized version
        of <fo:inline font-family="monospace" font-size="0.7em">messages.properties</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Rounding out the discussion on localization is the Spring
        <fo:inline font-family="monospace" font-size="0.7em">ThreadLocal</fo:inline> known as
        <fo:inline font-family="monospace" font-size="0.7em">org.springframework.context.i18n.LocaleContextHolder</fo:inline>.
        You should set the <fo:inline font-family="monospace" font-size="0.7em">LocaleContextHolder</fo:inline> to represent
        the preferred <fo:inline font-family="monospace" font-size="0.7em">Locale</fo:inline> of each user. Acegi Security
        will attempt to locate a message from the message source using the
        <fo:inline font-family="monospace" font-size="0.7em">Locale</fo:inline> obtained from this
        <fo:inline font-family="monospace" font-size="0.7em">ThreadLocal</fo:inline>. Please refer to Spring documentation
        for further details on using <fo:inline font-family="monospace" font-size="0.7em">LocaleContextHolder</fo:inline>
        and the helper classes that can automatically set it for you (eg
        <fo:inline font-family="monospace" font-size="0.7em">AcceptHeaderLocaleResolver</fo:inline>,
        <fo:inline font-family="monospace" font-size="0.7em">CookieLocaleResolver</fo:inline>,
        <fo:inline font-family="monospace" font-size="0.7em">FixedLocaleResolver</fo:inline>,
        <fo:inline font-family="monospace" font-size="0.7em">SessionLocaleResolver</fo:inline> etc)</fo:block></fo:block><fo:block id="filters"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Filters</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">3.2. Filters</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security uses many filters, as referred to throughout the
        remainder of this reference guide. You have a choice in how these
        filters are added to your web application, in that you can use either
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> or
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline>. We'll look at both below.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Most filters are configured using the
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline>. An example configuration from
        <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline> follows:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e755">&lt;filter&gt;
  &lt;filter-name&gt;Acegi HTTP Request Security Filter&lt;/filter-name&gt;
  &lt;filter-class&gt;org.acegisecurity.util.FilterToBeanProxy&lt;/filter-class&gt;
  &lt;init-param&gt;
    &lt;param-name&gt;targetClass&lt;/param-name&gt;
    &lt;param-value&gt;org.acegisecurity.ClassThatImplementsFilter&lt;/param-value&gt;
  &lt;/init-param&gt;
&lt;/filter&gt;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Notice that the filter in <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline> is actually
        a <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline>, and not the filter that will
        actually implement the logic of the filter. What
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> does is delegate the
        <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline>'s methods through to a bean which is
        obtained from the Spring application context. This enables the bean to
        benefit from the Spring application context lifecycle support and
        configuration flexibility. The bean must implement
        <fo:inline font-family="monospace" font-size="0.7em">javax.servlet.Filter</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> only requires a single
        initialization parameter, <fo:inline font-family="monospace" font-size="0.7em">targetClass</fo:inline> or
        <fo:inline font-family="monospace" font-size="0.7em">targetBean</fo:inline>. The <fo:inline font-family="monospace" font-size="0.7em">targetClass</fo:inline>
        parameter locates the first object in the application context of the
        specified class, whilst <fo:inline font-family="monospace" font-size="0.7em">targetBean</fo:inline> locates the
        object by bean name. Like standard Spring web applications, the
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> accesses the application context
        via<fo:inline font-family="monospace" font-size="0.7em">
        WebApplicationContextUtils.getWebApplicationContext(ServletContext)</fo:inline>,
        so you should configure a <fo:inline font-family="monospace" font-size="0.7em">ContextLoaderListener</fo:inline> in
        <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">There is a lifecycle issue to consider when hosting
        <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline>s in an IoC container instead of a servlet
        container. Specifically, which container should be responsible for
        calling the <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline>'s "startup" and "shutdown"
        methods? It is noted that the order of initialization and destruction
        of a <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline> can vary by servlet container, and this
        can cause problems if one <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline> depends on
        configuration settings established by an earlier initialized
        <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline>. The Spring IoC container on the other hand
        has more comprehensive lifecycle/IoC interfaces (such as
        <fo:inline font-family="monospace" font-size="0.7em">InitializingBean</fo:inline>,
        <fo:inline font-family="monospace" font-size="0.7em">DisposableBean</fo:inline>, <fo:inline font-family="monospace" font-size="0.7em">BeanNameAware</fo:inline>,
        <fo:inline font-family="monospace" font-size="0.7em">ApplicationContextAware</fo:inline> and many others) as well as
        a well-understood interface contract, predictable method invocation
        ordering, autowiring support, and even options to avoid implementing
        Spring interfaces (eg the <fo:inline font-family="monospace" font-size="0.7em">destroy-method</fo:inline> attribute
        in Spring XML). For this reason we recommend the use of Spring
        lifecycle services instead of servlet container lifecycle services
        wherever possible. By default <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline>
        will not delegate <fo:inline font-family="monospace" font-size="0.7em">init(FilterConfig)</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">destroy()</fo:inline> methods through to the proxied bean. If
        you do require such invocations to be delegated, set the
        <fo:inline font-family="monospace" font-size="0.7em">lifecycle</fo:inline> initialization parameter to
        <fo:inline font-family="monospace" font-size="0.7em">servlet-container-managed</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Rather than using <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline>, we
        strongly recommend to use <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> instead.
        Whilst <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> is a very useful class,
        the problem is that the lines of code required for
        <fo:inline font-family="monospace" font-size="0.7em">&lt;filter&gt;</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">&lt;filter-mapping&gt;</fo:inline> entries in
        <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline> explodes when using more than a few
        filters. To overcome this issue, Acegi Security provides a
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> class. It is wired using a
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> (just like in the example above),
        but the target class is
        <fo:inline font-family="monospace" font-size="0.7em">org.acegisecurity.util.FilterChainProxy</fo:inline>. The filter
        chain is then declared in the application context, using code such as
        this:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e880">&lt;bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"&gt;
  &lt;property name="filterInvocationDefinitionSource"&gt;
    &lt;value&gt;
      CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
      PATTERN_TYPE_APACHE_ANT
      /webServices/**=httpSessionContextIntegrationFilterWithASCFalse,basicProcessingFilter,exceptionTranslationFilter,filterSecurityInterceptor
      /**=httpSessionContextIntegrationFilterWithASCTrue,authenticationProcessingFilter,exceptionTranslationFilter,filterSecurityInterceptor
    &lt;/value&gt;
  &lt;/property&gt;
&lt;/bean&gt;        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You may notice similarities with the way
        <fo:inline font-family="monospace" font-size="0.7em">FilterSecurityInterceptor</fo:inline> is declared. Both regular
        expressions and Ant Paths are supported, and the most specific URIs
        appear first. At runtime the <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> will
        locate the first URI pattern that matches the current web request.
        Each of the corresponding configuration attributes represent the name
        of a bean defined in the application context. The filters will then be
        invoked in the order they are specified, with standard
        <fo:inline font-family="monospace" font-size="0.7em">FilterChain</fo:inline> behaviour being respected (a
        <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline> can elect not to proceed with the chain if
        it wishes to end processing).</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">As you can see, <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> requires the
        duplication of filter names for different request patterns (in the
        above example, <fo:inline font-family="monospace" font-size="0.7em">exceptionTranslationFilter</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">filterSecurityInterceptor</fo:inline> are duplicated). This
        design decision was made to enable <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline>
        to specify different <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline> invocation orders for
        different URI patterns, and also to improve both the expressiveness
        (in terms of regular expressions, Ant Paths, and any custom
        <fo:inline font-family="monospace" font-size="0.7em">FilterInvocationDefinitionSource</fo:inline> implementations)
        and clarity of which <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline>s should be
        invoked.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You may have noticed we have declared two
        <fo:inline font-family="monospace" font-size="0.7em">HttpSessionContextIntegrationFilter</fo:inline>s in the filter
        chain (<fo:inline font-family="monospace" font-size="0.7em">ASC</fo:inline> is short for
        <fo:inline font-family="monospace" font-size="0.7em">allowSessionCreation</fo:inline>, a property of
        <fo:inline font-family="monospace" font-size="0.7em">HttpSessionContextIntegrationFilter</fo:inline>). As web
        services will never present a <fo:inline font-family="monospace" font-size="0.7em">jsessionid</fo:inline> on future
        requests, creating <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline>s for such user
        agents would be wasteful. If you had a high-volume application which
        required maximum scalability, we recommend you use the approach shown
        above. For smaller applications, using a single
        <fo:inline font-family="monospace" font-size="0.7em">HttpSessionContextIntegrationFilter</fo:inline> (with its
        default <fo:inline font-family="monospace" font-size="0.7em">allowSessionCreation</fo:inline> as
        <fo:inline font-family="monospace" font-size="0.7em">true</fo:inline>) would likely be sufficient.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In relation to lifecycle issues, the
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> will always delegate
        <fo:inline font-family="monospace" font-size="0.7em">init(FilterConfig)</fo:inline> and <fo:inline font-family="monospace" font-size="0.7em">destroy()</fo:inline>
        methods through to the underlaying <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline>s if such
        methods are called against <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> itself.
        In this case, <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> guarantees to only
        initialize and destroy each <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline> once,
        irrespective of how many times it is declared by the
        <fo:inline font-family="monospace" font-size="0.7em">FilterInvocationDefinitionSource</fo:inline>. You control the
        overall choice as to whether these methods are called or not via the
        <fo:inline font-family="monospace" font-size="0.7em">lifecycle</fo:inline> initialization parameter of the
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> that proxies
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline>. As discussed above, by default
        any servlet container lifecycle invocations are not delegated through
        to <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You can also omit a URI pattern from the filter chain by using
        the token <fo:inline font-family="monospace" font-size="0.7em">#NONE#</fo:inline> on the right-hand side of the
        <fo:inline font-family="monospace" font-size="0.7em">&lt;URI Pattern&gt; = &lt;Filter Chain&gt;</fo:inline> expression. For example, using
         the example above, if you wanted to exclude the <fo:inline font-family="monospace" font-size="0.7em">/webservices</fo:inline>
         location completely, you would modify the corresponding line in the bean declaration to be
        <fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e997">
/webServices/**=#NONE#
        </fo:block>
          Note that anything matching this path will then have no authentication
          or authorization services applied and will be freely accessible.
        </fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The order that filters are defined in <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline>
        is very important. Irrespective of which filters you are actually
        using, the order of the <fo:inline font-family="monospace" font-size="0.7em">&lt;filter-mapping&gt;</fo:inline>s
        should be as follows:</fo:block><fo:list-block space-before.optimum="-0.3em" space-before.minimum="-0.5em" space-before.maximum="0em" space-after.optimum="0.8em" space-after.minimum="0.4em" space-after.maximum="1.2em" margin-left="1.6em" provisional-label-separation="0.2em" provisional-distance-between-starts="1.2em" id="d0e1008"><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1009"><fo:list-item-label end-indent="label-end()"><fo:block>1.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">ChannelProcessingFilter</fo:inline>, because it might
            need to redirect to a different protocol</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1014"><fo:list-item-label end-indent="label-end()"><fo:block>2.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">ConcurrentSessionFilter</fo:inline>, because it
            doesn't use any <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>
            functionality but needs to update the
            <fo:inline font-family="monospace" font-size="0.7em">SessionRegistry</fo:inline> to reflect ongoing requests
            from the principal</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1025"><fo:list-item-label end-indent="label-end()"><fo:block>3.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">HttpSessionContextIntegrationFilter</fo:inline>, so a
            <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline> can be setup in the
            <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> at the beginning of a web
            request, and any changes to the <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline>
            can be copied to the <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> when the web
            request ends (ready for use with the next web request)</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1042"><fo:list-item-label end-indent="label-end()"><fo:block>4.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>Authentication processing mechanisms -
            <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessingFilter</fo:inline>,
            <fo:inline font-family="monospace" font-size="0.7em">CasProcessingFilter</fo:inline>,
            <fo:inline font-family="monospace" font-size="0.7em">BasicProcessingFilter, HttpRequestIntegrationFilter,
            JbossIntegrationFilter</fo:inline> etc - so that the
            <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> can be modified to
            contain a valid <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> request
            token</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1060"><fo:list-item-label end-indent="label-end()"><fo:block>5.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block>The
            <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolderAwareRequestFilter</fo:inline>, if you
            are using it to install an Acegi Security aware
            <fo:inline font-family="monospace" font-size="0.7em">HttpServletRequestWrapper</fo:inline> into your servlet
            container</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1069"><fo:list-item-label end-indent="label-end()"><fo:block>6.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">RememberMeProcessingFilter</fo:inline>, so that if no
            earlier authentication processing mechanism updated the
            <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>, and the request presents
            a cookie that enables remember-me services to take place, a
            suitable remembered
            <fo:inline font-family="monospace" font-size="0.7em"><fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline></fo:inline> object will
            be put there</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1081"><fo:list-item-label end-indent="label-end()"><fo:block>7.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">AnonymousProcessingFilter</fo:inline>, so that if no
            earlier authentication processing mechanism updated the
            <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>, an anonymous
            <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object will be put there</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1092"><fo:list-item-label end-indent="label-end()"><fo:block>8.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">ExceptionTranslationFilter</fo:inline>, to catch any
            Acegi Security exceptions so that either an HTTP error response can
            be returned or an appropriate
            <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline> can be launched</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" id="d0e1100"><fo:list-item-label end-indent="label-end()"><fo:block>9.</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:block><fo:inline font-family="monospace" font-size="0.7em">FilterSecurityInterceptor</fo:inline>, to protect web
            URIs</fo:block></fo:block></fo:list-item-body></fo:list-item></fo:list-block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">All of the above filters use
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> or
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline>. It is recommended that a single
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> proxy through to a single
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> for each application, with that
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> defining all of Acegi Security
        <fo:inline font-family="monospace" font-size="0.7em">Filter</fo:inline>s.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">If you're using SiteMesh, ensure Acegi Security filters execute
        before the SiteMesh filters are called. This enables the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> to be populated in time for
        use by SiteMesh decorators</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Channel Security</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Channel Security</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="channel-security"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 4. Channel Security</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="channel-security-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">4.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In addition to coordinating the authentication and authorization
        requirements of your application, Acegi Security is also able to
        ensure unauthenticated web requests have certain properties. These
        properties may include being of a particular transport type, having a
        particular <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> attribute set and so on. The
        most common requirement is for your web requests to be received using
        a particular transport protocol, such as HTTPS.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">An important issue in considering transport security is that of
        session hijacking. Your web container manages a
        <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> by reference to a
        <fo:inline font-family="monospace" font-size="0.7em">jsessionid</fo:inline> that is sent to user agents either via a
        cookie or URL rewriting. If the <fo:inline font-family="monospace" font-size="0.7em">jsessionid</fo:inline> is ever
        sent over HTTP, there is a possibility that session identifier can be
        intercepted and used to impersonate the user after they complete the
        authentication process. This is because most web containers maintain
        the same session identifier for a given user, even after they switch
        from HTTP to HTTPS pages.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">If session hijacking is considered too significant a risk for
        your particular application, the only option is to use HTTPS for every
        request. This means the <fo:inline font-family="monospace" font-size="0.7em">jsessionid</fo:inline> is never sent
        across an insecure channel. You will need to ensure your
        <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline>-defined
        <fo:inline font-family="monospace" font-size="0.7em">&lt;welcome-file&gt;</fo:inline> points to an HTTPS location,
        and the application never directs the user to an HTTP location. Acegi
        Security provides a solution to assist with the latter.</fo:block></fo:block><fo:block id="channel-security-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">4.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">To utilise Acegi Security's channel security services, add the
        following lines to <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline>:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1172">
&lt;filter&gt;
  &lt;filter-name&gt;Acegi Channel Processing Filter&lt;/filter-name&gt;
  &lt;filter-class&gt;org.acegisecurity.util.FilterToBeanProxy&lt;/filter-class&gt;
  &lt;init-param&gt;
    &lt;param-name&gt;targetClass&lt;/param-name&gt;
    &lt;param-value&gt;org.acegisecurity.securechannel.ChannelProcessingFilter&lt;/param-value&gt;
  &lt;/init-param&gt;
&lt;/filter&gt;

&lt;filter-mapping&gt;
  &lt;filter-name&gt;Acegi Channel Processing Filter&lt;/filter-name&gt;
  &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
&lt;/filter-mapping&gt;

        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">As usual when running <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline>, you
        will also need to configure the filter in your application
        context:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1180">
&lt;bean id="channelProcessingFilter" class="org.acegisecurity.securechannel.ChannelProcessingFilter"&gt;
  &lt;property name="channelDecisionManager"&gt;&lt;ref bean="channelDecisionManager"/&gt;&lt;/property&gt;
  &lt;property name="filterInvocationDefinitionSource"&gt;
    &lt;value&gt;
      CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
      \A/secure/.*\Z=REQUIRES_SECURE_CHANNEL
      \A/acegilogin.jsp.*\Z=REQUIRES_SECURE_CHANNEL
      \A/j_acegi_security_check.*\Z=REQUIRES_SECURE_CHANNEL
      \A.*\Z=REQUIRES_INSECURE_CHANNEL
    &lt;/value&gt;
  &lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="channelDecisionManager" class="org.acegisecurity.securechannel.ChannelDecisionManagerImpl"&gt;
  &lt;property name="channelProcessors"&gt;
    &lt;list&gt;
      &lt;ref bean="secureChannelProcessor"/&gt;
      &lt;ref bean="insecureChannelProcessor"/&gt;
    &lt;/list&gt;
  &lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="secureChannelProcessor" class="org.acegisecurity.securechannel.SecureChannelProcessor"/&gt;
&lt;bean id="insecureChannelProcessor" class="org.acegisecurity.securechannel.InsecureChannelProcessor"/&gt;

        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Like <fo:inline font-family="monospace" font-size="0.7em">FilterSecurityInterceptor</fo:inline>, Apache Ant
        style paths are also supported by the
        <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessingFilter</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessingFilter</fo:inline> operates by
        filtering all web requests and determining the configuration
        attributes that apply. It then delegates to the
        <fo:inline font-family="monospace" font-size="0.7em">ChannelDecisionManager</fo:inline>. The default implementation,
        <fo:inline font-family="monospace" font-size="0.7em">ChannelDecisionManagerImpl</fo:inline>, should suffice in most
        cases. It simply delegates through the list of configured
        <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessor</fo:inline> instances. A
        <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessor</fo:inline> will review the request, and if it
        is unhappy with the request (eg it was received across the incorrect
        transport protocol), it will perform a redirect, throw an exception or
        take whatever other action is appropriate.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Included with Acegi Security are two concrete
        <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessor</fo:inline> implementations:
        <fo:inline font-family="monospace" font-size="0.7em">SecureChannelProcessor</fo:inline> ensures requests with a
        configuration attribute of <fo:inline font-family="monospace" font-size="0.7em">REQUIRES_SECURE_CHANNEL</fo:inline>
        are received over HTTPS, whilst
        <fo:inline font-family="monospace" font-size="0.7em">InsecureChannelProcessor</fo:inline> ensures requests with a
        configuration attribute of
        <fo:inline font-family="monospace" font-size="0.7em">REQUIRES_INSECURE_CHANNEL</fo:inline> are received over HTTP.
        Both implementations delegate to a
        <fo:inline font-family="monospace" font-size="0.7em">ChannelEntryPoint</fo:inline> if the required transport
        protocol is not used. The two <fo:inline font-family="monospace" font-size="0.7em">ChannelEntryPoint</fo:inline>
        implementations included with Acegi Security simply redirect the
        request to HTTP and HTTPS as appropriate. Appropriate defaults are
        assigned to the <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessor</fo:inline> implementations
        for the configuration attribute keywords they respond to and the
        <fo:inline font-family="monospace" font-size="0.7em">ChannelEntryPoint</fo:inline> they delegate to, although you
        have the ability to override these using the application
        context.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Note that the redirections are absolute (eg
        <fo:inline font-family="monospace" font-size="0.7em">http://www.company.com:8080/app/page</fo:inline>), not relative
        (eg <fo:inline font-family="monospace" font-size="0.7em">/app/page</fo:inline>). During testing it was discovered
        that Internet Explorer 6 Service Pack 1 has a bug whereby it does not
        respond correctly to a redirection instruction which also changes the
        port to use. Accordingly, absolute URLs are used in conjunction with
        bug detection logic in the <fo:inline font-family="monospace" font-size="0.7em">PortResolverImpl</fo:inline> that is
        wired up by default to many Acegi Security beans. Please refer to the
        JavaDocs for <fo:inline font-family="monospace" font-size="0.7em">PortResolverImpl</fo:inline> for further
        details.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You should note that using a secure channel is recommended if
        usernames and passwords are to be kept secure during the login
        process. If you do decide to use
        <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessingFilter</fo:inline> with form-based login,
        please ensure that your login page is set to
        <fo:inline font-family="monospace" font-size="0.7em">REQUIRES_SECURE_CHANNEL</fo:inline>, and that the
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessingFilterEntryPoint.forceHttps</fo:inline>
        property is <fo:inline font-family="monospace" font-size="0.7em">true</fo:inline>.</fo:block></fo:block><fo:block id="channel-security-conclusion"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Conclusion</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">4.3. Conclusion</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Once configured, using the channel security filter is very easy.
        Simply request pages without regard to the protocol (ie HTTP or HTTPS)
        or port (eg 80, 8080, 443, 8443 etc). Obviously you'll still need a
        way of making the initial request (probably via the
        <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline> <fo:inline font-family="monospace" font-size="0.7em">&lt;welcome-file&gt;</fo:inline> or
        a well-known home page URL), but once this is done the filter will
        perform redirects as defined by your application context.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You can also add your own <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessor</fo:inline>
        implementations to the <fo:inline font-family="monospace" font-size="0.7em">ChannelDecisionManagerImpl</fo:inline>.
        For example, you might set a <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> attribute
        when a human user is detected via a "enter the contents of this
        graphic" procedure. Your <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessor</fo:inline> would
        respond to say <fo:inline font-family="monospace" font-size="0.7em">REQUIRES_HUMAN_USER</fo:inline> configuration
        attributes and redirect to an appropriate entry point to start the
        human user validation process if the <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline>
        attribute is not currently set.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">To decide whether a security check belongs in a
        <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessor</fo:inline> or an
        <fo:inline font-family="monospace" font-size="0.7em">AccessDecisionVoter</fo:inline>, remember that the former is
        designed to handle unauthenticated requests, whilst the latter is
        designed to handle authenticated requests. The latter therefore has
        access to the granted authorities of the authenticated principal. In
        addition, problems detected by a <fo:inline font-family="monospace" font-size="0.7em">ChannelProcessor</fo:inline>
        will generally cause an HTTP/HTTPS redirection so its requirements can
        be met, whilst problems detected by an
        <fo:inline font-family="monospace" font-size="0.7em">AccessDecisionVoter</fo:inline> will ultimately result in an
        <fo:inline font-family="monospace" font-size="0.7em">AccessDeniedException</fo:inline> (depending on the governing
        <fo:inline font-family="monospace" font-size="0.7em">AccessDecisionManager</fo:inline>).</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Tag Libraries</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Tag Libraries</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="taglib"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 5. Tag Libraries</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="taglib-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">5.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security comes bundled with several JSP tag libraries that
        eases JSP writing. The tag libraries are known as
        <fo:inline font-family="monospace" font-size="0.7em">authz</fo:inline> and provide a range of different
        services.</fo:block></fo:block><fo:block id="taglib-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">5.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">All taglib classes are included in the core
        <fo:inline font-family="monospace" font-size="0.7em">acegi-security-xx.jar</fo:inline> file, with the
        <fo:inline font-family="monospace" font-size="0.7em">authz.tld</fo:inline> located in the JAR's
        <fo:inline font-family="monospace" font-size="0.7em">META-INF</fo:inline> directory. This means for JSP 1.2+ web
        containers you can simply include the JAR in the WAR's
        <fo:inline font-family="monospace" font-size="0.7em">WEB-INF/lib</fo:inline> directory and it will be available. If
        you're using a JSP 1.1 container, you'll need to declare the JSP
        taglib in your <fo:inline font-family="monospace" font-size="0.7em">web.xml file</fo:inline>, and include
        <fo:inline font-family="monospace" font-size="0.7em">authz.tld</fo:inline> in the <fo:inline font-family="monospace" font-size="0.7em">WEB-INF/lib</fo:inline>
        directory. The following fragment is added to
        <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline>:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1356">&lt;taglib&gt;
  &lt;taglib-uri&gt;http://acegisecurity.org/authz&lt;/taglib-uri&gt;
  &lt;taglib-location&gt;/WEB-INF/authz.tld&lt;/taglib-location&gt;
&lt;/taglib&gt;       </fo:block></fo:block></fo:block><fo:block id="taglib-usage"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Usage</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">5.3. Usage</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Now that you've configured the tag libraries, refer to the
        individual reference guide sections for details on how to use
        them.</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="titlepage" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="authentication"><fo:block><fo:block><fo:block text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always" hyphenate="false">Part II. Authentication</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In this part of the reference guide we will examine individual
      authentication mechanisms and their corresponding
      <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>s. We'll also look at how to
      configure authentication more generally, including if you have several
      authentication approaches that need to be chained together.</fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Common Authentication Services</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Common Authentication Services</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="authentication-common-auth-services"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 6. Common Authentication Services</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="mechanisms-providers-entry-points"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Mechanisms, Providers and Entry Points</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">6.1. Mechanisms, Providers and Entry Points</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">If you're using Acegi Security-provided authentication
        approaches, you'll usually need to configure a web filter, together
        with an <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline>. In this section we are
        going to explore an example application that needs to support both
        form-based authentication (ie so a nice HTML page is presented to a
        user for them to login) plus BASIC authentication (ie so a web service
        or similar can access protected resources).</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In the web.xml, this application will need a single Acegi
        Security filter in order to use the FilterChainProxy. Nearly every
        Acegi Security application will have such an entry, and it looks like
        this:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1389">&lt;filter&gt;
  &lt;filter-name&gt;Acegi Filter Chain Proxy&lt;/filter-name&gt;
  &lt;filter-class&gt;org.acegisecurity.util.FilterToBeanProxy&lt;/filter-class&gt;
  &lt;init-param&gt;
    &lt;param-name&gt;targetClass&lt;/param-name&gt;
    &lt;param-value&gt;org.acegisecurity.util.FilterChainProxy&lt;/param-value&gt;
  &lt;/init-param&gt;
&lt;/filter&gt;

&lt;filter-mapping&gt;
  &lt;filter-name&gt;Acegi Filter Chain Proxy&lt;/filter-name&gt;
  &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
&lt;/filter-mapping&gt;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The above declarations will cause every web request to be passed
        through to Acegi Security's FilterChainProxy. As explained in the
        filters section of this reference guide, the <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> is a
        generally-useful class that enables web requests to be passed to
        different filters based on the URL patterns. Those delegated filters
        are managed inside the application context, so they can benefit from
        dependency injection. Let's have a look at what the FilterChainProxy
        bean definition would look like inside your application
        context:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1397">&lt;bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"&gt;
  &lt;property name="filterInvocationDefinitionSource"&gt;
    &lt;value&gt;
      CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
      PATTERN_TYPE_APACHE_ANT
      /**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor,switchUserProcessingFilter
    &lt;/value&gt;
  &lt;/property&gt;
&lt;/bean&gt;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Internally Acegi Security will use a
        <fo:inline font-family="monospace" font-size="0.7em">PropertyEditor</fo:inline> to convert the string presented in
        the above XML fragment into a
        <fo:inline font-family="monospace" font-size="0.7em">FilterInvocationDefinitionSource</fo:inline> object. What's
        important to note at this stage is that a series of filters will be
        run - in the order specified by the declaration - and each of those
        filters are actually the <fo:inline font-family="monospace" font-size="0.7em">&lt;bean id&gt;</fo:inline> of another
        bean inside the application context. So, in our case some extra beans
        will also appear in the application context, and they'll be named
        <fo:inline font-family="monospace" font-size="0.7em">httpSessionContextIntegrationFilter</fo:inline>,
        <fo:inline font-family="monospace" font-size="0.7em">logoutFilter</fo:inline> and so on. The order that the filters
        should appear is discussed in the filters section of the reference
        guide - although they are correct in the above example.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In our example we have the
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessingFilter</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">BasicProcessingFilter</fo:inline> being used. These are the
        "authentication mechanisms" that respond to form-based authentication
        and BASIC HTTP header-based authentication respectively (we discussed
        the role of authentication mechanisms earlier in this reference
        guide). If you weren't using form or BASIC authentication, neither of
        these beans would be defined. You'd instead define filters applicable
        to your desired authentication environment, such as
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilter</fo:inline> or
        <fo:inline font-family="monospace" font-size="0.7em">CasProcessingFilter</fo:inline>. Refer to the individual
        chapters of this part of the reference guide to learn how to configure
        each of these authentication mechanisms.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Recall that
        <fo:inline font-family="monospace" font-size="0.7em">HttpSessionContextIntegrationFilter</fo:inline> keeps the
        contents of the <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline> between invocations
        inside an HTTP session. This means the authentication mechanisms are
        only used once, being when the principal initially tries to
        authenticate. The rest of the time the authentication mechanisms sit
        there and silently pass the request through to the next filter in the
        chain. That is a practical requirement due to the fact that few
        authentication approaches present credentials on each and every call
        (BASIC authentication being a notable exception), but what happens if
        a principal's account gets cancelled or disabled or otherwise changed
        (eg an increase or decrease in <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority[]</fo:inline>s)
        after the initial authentication step? Let's look at how that is
        handled now.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The major authorization provider for secure objects has
        previously been introduced as
        <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline>. This class needs to
        have access to an <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline>. It also
        has configurable settings to indicate whether an
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object should be re-authenticated on
        each secure object invocation. By default it just accepts any
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> inside the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> is authenticated if
        <fo:inline font-family="monospace" font-size="0.7em">Authentication.isAuthenticated()</fo:inline> returns true. This
        is great for performance, but not ideal if you want to ensure
        up-to-the-moment authentication validity. For such cases you'll
        probably want to set the
        <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor.alwaysReauthenticate</fo:inline>
        property to true.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You might be asking yourself, "what's this
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline>?". We haven't explored it
        before, but we have discussed the concept of an
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>. Quite simply, an
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline> is responsible for passing requests through a
        chain of AuthenticationProviders. It's a little like the filter chain
        we discussed earlier, although there are some differences. There is
        only one <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline> implementation shipped with Acegi
        Security, so let's look at how it's configured for the example we're
        using in this chapter:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1479">&lt;bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager"&gt;
  &lt;property name="providers"&gt;
    &lt;list&gt;
      &lt;ref local="daoAuthenticationProvider"/&gt;
      &lt;ref local="anonymousAuthenticationProvider"/&gt;
      &lt;ref local="rememberMeAuthenticationProvider"/&gt;
    &lt;/list&gt;
  &lt;/property&gt;
&lt;/bean&gt;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">It's probably worth mentioning at this point that your
        authentication mechanisms (which are usually filters) are also
        injected with a reference to the
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline>. So both
        <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> as well as the
        authentication mechanisms will use the above
        <fo:inline font-family="monospace" font-size="0.7em">ProviderManager</fo:inline> to poll a list of
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>s.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In our example we have three providers. They are tried in the
        order shown (which is implied by the use of a <fo:inline font-family="monospace" font-size="0.7em">List</fo:inline>
        instead of a <fo:inline font-family="monospace" font-size="0.7em">Set</fo:inline>), with each provider able to
        attempt authentication, or skip authentication by simply returning
        <fo:inline font-family="monospace" font-size="0.7em">null</fo:inline>. If all implementations return null, the
        <fo:inline font-family="monospace" font-size="0.7em">ProviderManager</fo:inline> will throw a suitable exception. If
        you're interested in learning more about chaining providers, please
        refer to the <fo:inline font-family="monospace" font-size="0.7em">ProviderManager</fo:inline> JavaDocs.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The providers to use will sometimes be interchangeable with the
        authentication mechanisms, whilst at other times they will depend on a
        specific authentication mechanism. For example, the
        <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline> just needs a string-based
        username and password. Various authentication mechanisms result in the
        collection of a string-based username and password, including (but not
        limited to) BASIC and form authentication. Equally, some
        authentication mechanisms create an authentication request object
        which can only be interpreted by a single type of
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>. An example of this
        one-to-one mapping would be JA-SIG CAS, which uses the notion of a
        service ticket which can therefore only be authenticated by
        <fo:inline font-family="monospace" font-size="0.7em">CasAuthenticationProvider</fo:inline>. A further example of a
        one-to-one mapping would be the LDAP authentication mechanism, which
        can only be processed an the
        <fo:inline font-family="monospace" font-size="0.7em">LdapAuthenticationProvider</fo:inline>. The specifics of such
        relationships are detailed in the JavaDocs for each class, plus the
        authentication approach-specific chapters of this reference guide. You
        need not be terribly concerned about this implementation detail,
        because if you forget to register a suitable provider, you'll simply
        receive a <fo:inline font-family="monospace" font-size="0.7em">ProviderNotFoundException</fo:inline> when an attempt
        to authenticate is made.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">After configuring the correct authentication mechanisms in the
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline>, and ensuring that a corresponding
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline> is registered in the
        <fo:inline font-family="monospace" font-size="0.7em">ProviderManager</fo:inline>, your last step is to configure an
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline>. Recall that earlier we
        discussed the role of <fo:inline font-family="monospace" font-size="0.7em">ExceptionTranslationFilter</fo:inline>,
        which is used when HTTP-based requests should receive back an HTTP
        header or HTTP redirect in order to start authentication. Continuing
        on with our earlier example:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1547">&lt;bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter"&gt;
  &lt;property name="authenticationEntryPoint"&gt;&lt;ref local="authenticationProcessingFilterEntryPoint"/&gt;&lt;/property&gt;
  &lt;property name="accessDeniedHandler"&gt;
    &lt;bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl"&gt;
      &lt;property name="errorPage" value="/accessDenied.jsp"/&gt;
    &lt;/bean&gt;
  &lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="authenticationProcessingFilterEntryPoint" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint"&gt;
  &lt;property name="loginFormUrl"&gt;&lt;value&gt;/acegilogin.jsp&lt;/value&gt;&lt;/property&gt;
  &lt;property name="forceHttps"&gt;&lt;value&gt;false&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Notice that the <fo:inline font-family="monospace" font-size="0.7em">ExceptionTranslationFilter</fo:inline>
        requires two collaborators. The first,
        <fo:inline font-family="monospace" font-size="0.7em">AccessDeniedHandlerImpl</fo:inline>, uses a
        <fo:inline font-family="monospace" font-size="0.7em">RequestDispatcher</fo:inline> forward to display the specified
        access denied error page. We use a forward so that the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> still contains details of the
        principal, which may be useful for display to the user (in old
        releases of Acegi Security we relied upon the servlet container to
        handle a 403 error message, which lacked this useful contextual
        information). <fo:inline font-family="monospace" font-size="0.7em">AccessDeniedHandlerImpl</fo:inline> will also set
        the HTTP header to 403, which is the official error code to indicate
        access denied. In the case of the
        <fo:inline font-family="monospace" font-size="0.7em">AuthentionEntryPoint</fo:inline>, here we're setting what
        action we would like taken when an unauthenticated principal attempts
        to perform a protected operation. Because in our example we're going
        to be using form-based authentication, we specify
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessinFilterEntryPoint</fo:inline> and the URL
        of the login page. Your application will usually only have one entry
        point, and most authentication approaches define their own specific
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline>. Details of which entry
        point to use for each authentication approach is discussed in the
        authentication approach-specific chapters of this reference
        guide.</fo:block></fo:block><fo:block id="userdetails-and-associated-types"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">UserDetails and Associated Types</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">6.2. UserDetails and Associated Types</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">As mentioned in the first part of the reference guide, most
        authentication providers take advantage of the
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> interfaces. The contract for
        this latter interface consists of a single method:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1587">public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The returned <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> is an interface that
        provides getters that guarantee non-null provision of basic
        authentication information such as the username, password, granted
        authorities and whether the user is enabled or disabled. Most
        authentication providers will use a
        <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>, even if the username and
        password are not actually used as part of the authentication decision.
        Generally such provider will be using the returned
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object just for its
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority[]</fo:inline> information, because some other
        system (like LDAP or X509 or CAS etc) has undertaken the
        responsibility of actually validating the credentials.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">A single concrete implementation of
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> is provided with Acegi Security, being
        the <fo:inline font-family="monospace" font-size="0.7em">User</fo:inline> class. Acegi Security users will need to
        decide when writing their <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> what
        concrete <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> class to return. In most cases
        <fo:inline font-family="monospace" font-size="0.7em">User</fo:inline> will be used directly or subclassed, although
        special circumstances (such as object relational mappers) may require
        users to write their own <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> implementation
        from scratch. This is not such an unusual situation, and users should
        not hesitate to simply return their normal domain object that
        represents a user of the system. This is especially common given that
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> is often used to store additional
        principal-related properties (such as their telephone number and email
        address), so that they can be easily used by web views.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Given <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> is so simple to
        implement, it should be easy for users to retrieve authentication
        information using a persistence strategy of their choice. Having said
        that, Acegi Security does include a couple of useful base
        implementations, which we'll look at below.</fo:block><fo:block id="in-memory-service"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">In-Memory Authentication</fo:marker><fo:block font-size="15pt" space-before.optimum="0.6em" space-before.minimum="0.6em" space-before.maximum="0.6em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">6.2.1. In-Memory Authentication</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Whilst it is easy to use create a custom
          <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> implementation that extracts
          information from a persistence engine of choice, many applications
          do not require such complexity. This is particularly true if you're
          undertaking a rapid prototype or just starting integrating Acegi
          Security, when you don't really want to spend time configuring
          databases or writing <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>
          implementations. For this sort of situation, a simple option is to
          configure the <fo:inline font-family="monospace" font-size="0.7em">InMemoryDaoImpl</fo:inline>
          implementation:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1646">&lt;bean id="inMemoryDaoImpl" class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl"&gt;
  &lt;property name="userMap"&gt;
    &lt;value&gt;
      marissa=koala,ROLE_TELLER,ROLE_SUPERVISOR
      dianne=emu,ROLE_TELLER
      scott=wombat,ROLE_TELLER
      peter=opal,disabled,ROLE_TELLER
    &lt;/value&gt;
  &lt;/property&gt;
&lt;/bean&gt;        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In the above example, the <fo:inline font-family="monospace" font-size="0.7em">userMap</fo:inline> property
          contains each of the usernames, passwords, a list of granted
          authorities and an optional enabled/disabled keyword. Commas are
          used to delimit each token. The username must appear to the left of
          the equals sign, and the password must be the first token to the
          right of the equals sign. The <fo:inline font-family="monospace" font-size="0.7em">enabled</fo:inline> and
          <fo:inline font-family="monospace" font-size="0.7em">disabled</fo:inline> keywords (case insensitive) may appear
          in the second or any subsequent token. Any remaining tokens are
          treated as granted authorities, which are created as
          <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthorityImpl</fo:inline> objects (this is just for
          your reference - most applications don't need custom
          <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline> implementations, so using the
          default implementation in this manner is just fine). Note that if a
          user has no password and/or no granted authorities, the user will
          not be created in the in-memory authentication repository.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:inline font-family="monospace" font-size="0.7em">InMemoryDaoImpl</fo:inline> also offers a
          <fo:inline font-family="monospace" font-size="0.7em">setUserProperties(Properties)</fo:inline> method, which
          allows you to externalise the
          <fo:inline font-family="monospace" font-size="0.7em">java.util.Properties</fo:inline> in another Spring configured
          bean or an external properties file. You might like to use Spring's
          <fo:inline font-family="monospace" font-size="0.7em">PropertiesFactoryBean</fo:inline>, which is useful for
          loading such external properties files. This setter might prove
          useful for simple applications that have a larger number of users,
          or deployment-time configuration changes, but do not wish to use a
          full database for handling authentication details.</fo:block></fo:block><fo:block id="jdbc-service"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">JDBC Authentication</fo:marker><fo:block font-size="15pt" space-before.optimum="0.6em" space-before.minimum="0.6em" space-before.maximum="0.6em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">6.2.2. JDBC Authentication</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security also includes a
          <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> that can obtain authentication
          information from a JDBC data source. Internally Spring JDBC is used,
          so it avoids the complexity of a fully-featured object relational
          mapper (ORM) just to store user details. If your application does
          use an ORM tool, you might prefer to write a custom
          <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> to reuse the mapping files
          you've probably already created. Returning to
          <fo:inline font-family="monospace" font-size="0.7em">JdbcDaoImpl</fo:inline>, an example configuration is shown
          below:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1693">&lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
  &lt;property name="driverClassName"&gt;&lt;value&gt;org.hsqldb.jdbcDriver&lt;/value&gt;&lt;/property&gt;
  &lt;property name="url"&gt;&lt;value&gt;jdbc:hsqldb:hsql://localhost:9001&lt;/value&gt;&lt;/property&gt;
  &lt;property name="username"&gt;&lt;value&gt;sa&lt;/value&gt;&lt;/property&gt;
  &lt;property name="password"&gt;&lt;value&gt;&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="jdbcDaoImpl" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl"&gt;
  &lt;property name="dataSource"&gt;&lt;ref bean="dataSource"/&gt;&lt;/property&gt;
&lt;/bean&gt;        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You can use different relational database management systems
          by modifying the <fo:inline font-family="monospace" font-size="0.7em">DriverManagerDataSource</fo:inline> shown
          above. You can also use a global data source obtained from JNDI, as
          per normal Spring options. Irrespective of the database used and how
          a <fo:inline font-family="monospace" font-size="0.7em">DataSource</fo:inline> is obtained, a standard schema must
          be used as indicated in <fo:inline font-family="monospace" font-size="0.7em">dbinit.txt</fo:inline>. You can
          download this file from the Acegi Security web site.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">If your default schema is unsuitable for your needs,
          <fo:inline font-family="monospace" font-size="0.7em">JdbcDaoImpl</fo:inline> provides two properties that allow
          customisation of the SQL statements. You may also subclass the
          <fo:inline font-family="monospace" font-size="0.7em">JdbcDaoImpl</fo:inline> if further customisation is
          necessary. Please refer to the JavaDocs for details, although please
          note that the class is not intended for complex custom subclasses.
          If you have complex needs (such as a special schema or would like a
          certain <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> implementation returned),
          you'd be better off writing your own
          <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>. The base implementation
          provided with Acegi Security is intended for typical situations, and
          does not offer infinite configuration flexibility.</fo:block></fo:block></fo:block><fo:block id="concurrent-sessions"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Concurrent Session Handling</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">6.3. Concurrent Session Handling</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security is able to prevent a principal from concurrently
        authenticating to the same application more than a specified number of
        times. Many ISVs take advantage of this to enforce licensing, whilst
        network administrators like this feature because it helps prevent
        people from sharing login names. You can, for example, stop user
        "Batman" from logging onto the web application from two different
        sessions.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">To use concurrent session support, you'll need to add the
        following to <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline>:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1731">&lt;listener&gt;
  &lt;listener-class&gt;org.acegisecurity.ui.session.HttpSessionEventPublisher&lt;/listener-class&gt;
&lt;/listener&gt;        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In addition, you will need to add the
        <fo:inline font-family="monospace" font-size="0.7em">org.acegisecurity.concurrent.ConcurrentSessionFilter</fo:inline>
        to your <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline>. The
        <fo:inline font-family="monospace" font-size="0.7em">ConcurrentSessionFilter</fo:inline> requires two properties,
        <fo:inline font-family="monospace" font-size="0.7em">sessionRegistry</fo:inline>, which generally points to an
        instance of <fo:inline font-family="monospace" font-size="0.7em">SessionRegistryImpl</fo:inline>, and
        <fo:inline font-family="monospace" font-size="0.7em">expiredUrl</fo:inline>, which points to the page to display
        when a session has expired.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline>
        <fo:inline font-family="monospace" font-size="0.7em">HttpSessionEventPublisher</fo:inline> causes an
        <fo:inline font-family="monospace" font-size="0.7em">ApplicationEvent</fo:inline> to be published to the Spring
        <fo:inline font-family="monospace" font-size="0.7em">ApplicationContext</fo:inline> every time a
        <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> commences or terminates. This is
        critical, as it allows the <fo:inline font-family="monospace" font-size="0.7em">SessionRegistryImpl</fo:inline> to
        be notified when a session ends.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">You will also need to wire up the
        <fo:inline font-family="monospace" font-size="0.7em">ConcurrentSessionControllerImpl</fo:inline> and refer to it
        from your <fo:inline font-family="monospace" font-size="0.7em">ProviderManager</fo:inline> bean:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1782">&lt;bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager"&gt;
  &lt;property name="providers"&gt;
    &lt;!-- your providers go here --&gt;
  &lt;/property&gt;
  &lt;property name="sessionController"&gt;&lt;ref bean="concurrentSessionController"/&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="concurrentSessionController" class="org.acegisecurity.concurrent.ConcurrentSessionControllerImpl"&gt;
  &lt;property name="maximumSessions"&gt;&lt;value&gt;1&lt;/value&gt;&lt;/property&gt;
  &lt;property name="sessionRegistry"&gt;&lt;ref local="sessionRegistry"/&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="sessionRegistry" class="org.acegisecurity.concurrent.SessionRegistryImpl"/&gt;</fo:block></fo:block></fo:block><fo:block id="authentication-taglibs"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Authentication Tag Libraries</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">6.4. Authentication Tag Libraries</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:inline font-family="monospace" font-size="0.7em">AuthenticationTag</fo:inline> is used to simply output a
        property of the current principal's
        <fo:inline font-family="monospace" font-size="0.7em">Authentication.getPrincipal()</fo:inline> object to the web
        page.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The following JSP fragment illustrates how to use the
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationTag</fo:inline>:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1800">&lt;authz:authentication operation="username"/&gt;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">This tag would cause the principal's name to be output. Here we
        are assuming the <fo:inline font-family="monospace" font-size="0.7em">Authentication.getPrincipal()</fo:inline> is a
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object, which is generally the case
        when using the typical
        <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline>.</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>DAO Authentication Provider</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>DAO Authentication Provider</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="dao-provider"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 7. DAO Authentication Provider</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="dao-provider-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">7.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security includes a production-quality
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline> implementation called
        <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline>. This authentication
        provider is compatible with all of the authentication mechanisms that
        generate a <fo:inline font-family="monospace" font-size="0.7em">UsernamePasswordAuthenticationToken</fo:inline>, and
        is probably the most commonly used provider in the framework. Like
        most of the other authentication providers, the
        DaoAuthenticationProvider leverages a UserDetailsService in order to
        lookup the username, password and GrantedAuthority[]s. Unlike most of
        the other authentication providers that leverage UserDetailsService,
        this authentication provider actually requires the password to be
        presented, and the provider will actually evaluate the validity or
        otherwise of the password presented in an authentication request
        object.</fo:block></fo:block><fo:block id="dao-provider-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">7.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Aside from adding DaoAuthenticationProvider to your
        ProviderManager list (as discussed at the start of this part of the
        reference guide), and ensuring a suitable authentication mechanism is
        configured to present a UsernamePasswordAuthenticationToken, the
        configuration of the provider itself is rather simple:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1836">&lt;bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"&gt;
  &lt;property name="userDetailsService"&gt;&lt;ref bean="inMemoryDaoImpl"/&gt;&lt;/property&gt;
  &lt;property name="saltSource"&gt;&lt;ref bean="saltSource"/&gt;&lt;/property&gt;
  &lt;property name="passwordEncoder"&gt;&lt;ref bean="passwordEncoder"/&gt;&lt;/property&gt;
&lt;/bean&gt;        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">PasswordEncoder</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">SaltSource</fo:inline> are optional. A
        <fo:inline font-family="monospace" font-size="0.7em">PasswordEncoder</fo:inline> provides encoding and decoding of
        passwords presented in the <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object that
        is returned from the configured <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>.
        A <fo:inline font-family="monospace" font-size="0.7em">SaltSource</fo:inline> enables the passwords to be populated
        with a "salt", which enhances the security of the passwords in the
        authentication repository. <fo:inline font-family="monospace" font-size="0.7em">PasswordEncoder</fo:inline>
        implementations are provided with Acegi Security covering MD5, SHA and
        cleartext encodings. Two <fo:inline font-family="monospace" font-size="0.7em">SaltSource</fo:inline> implementations
        are also provided: <fo:inline font-family="monospace" font-size="0.7em">SystemWideSaltSource</fo:inline> which
        encodes all passwords with the same salt, and
        <fo:inline font-family="monospace" font-size="0.7em">ReflectionSaltSource</fo:inline>, which inspects a given
        property of the returned <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object to
        obtain the salt. Please refer to the JavaDocs for further details on
        these optional features.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In addition to the properties above, the
        <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline> supports optional caching
        of <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> objects. The
        <fo:inline font-family="monospace" font-size="0.7em">UserCache</fo:inline> interface enables the
        <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline> to place a
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object into the cache, and retrieve it
        from the cache upon subsequent authentication attempts for the same
        username. By default the <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline>
        uses the <fo:inline font-family="monospace" font-size="0.7em">NullUserCache</fo:inline>, which performs no caching.
        A usable caching implementation is also provided,
        <fo:inline font-family="monospace" font-size="0.7em">EhCacheBasedUserCache</fo:inline>, which is configured as
        follows:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1900">&lt;bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"&gt;
  &lt;property name="userDetailsService"&gt;&lt;ref bean="userDetailsService"/&gt;&lt;/property&gt;
  &lt;property name="userCache"&gt;&lt;ref bean="userCache"/&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"&gt;
  &lt;property name="configLocation"&gt;
    &lt;value&gt;classpath:/ehcache-failsafe.xml&lt;/value&gt;
  &lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="userCacheBackend" class="org.springframework.cache.ehcache.EhCacheFactoryBean"&gt;
  &lt;property name="cacheManager"&gt;
    &lt;ref local="cacheManager"/&gt;
  &lt;/property&gt;
  &lt;property name="cacheName"&gt;
    &lt;value&gt;userCache&lt;/value&gt;
  &lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="userCache" class="org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache"&gt;
  &lt;property name="cache"&gt;&lt;ref local="userCacheBackend"/&gt;&lt;/property&gt;
&lt;/bean&gt;        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">All Acegi Security EH-CACHE implementations (including
        <fo:inline font-family="monospace" font-size="0.7em">EhCacheBasedUserCache</fo:inline>) require an EH-CACHE
        <fo:inline font-family="monospace" font-size="0.7em">Cache</fo:inline> object. The <fo:inline font-family="monospace" font-size="0.7em">Cache</fo:inline> object
        can be obtained from wherever you like, although we recommend you use
        Spring's factory classes as shown in the above configuration. If using
        Spring's factory classes, please refer to the Spring documentation for
        further details on how to optimise the cache storage location, memory
        usage, eviction policies, timeouts etc.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">A design decision was made not to support account locking in the
        <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline>, as doing so would have
        increased the complexity of the <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>
        interface. For instance, a method would be required to increase the
        count of unsuccessful authentication attempts. Such functionality
        could be easily provided by leveraging the application event
        publishing features discussed below.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline> returns an
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object which in turn has its
        <fo:inline font-family="monospace" font-size="0.7em">principal</fo:inline> property set. The principal will be
        either a <fo:inline font-family="monospace" font-size="0.7em">String</fo:inline> (which is essentially the username)
        or a <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> object (which was looked up from
        the <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline>). By default the
        <fo:inline font-family="monospace" font-size="0.7em">UserDetails</fo:inline> is returned, as this enables
        applications to add extra properties potentially of use in
        applications, such as the user's full name, email address etc. If
        using container adapters, or if your applications were written to
        operate with <fo:inline font-family="monospace" font-size="0.7em">String</fo:inline>s (as was the case for releases
        prior to Acegi Security 0.6), you should set the
        <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider.forcePrincipalAsString</fo:inline>
        property to <fo:inline font-family="monospace" font-size="0.7em">true</fo:inline> in your application context</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Java Authentication and Authorization Service (JAAS)
      Provider</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Java Authentication and Authorization Service (JAAS)
      Provider</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="jaas"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 8. Java Authentication and Authorization Service (JAAS)
      Provider</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="jaas-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">8.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security provides a package able to delegate
        authentication requests to the Java Authentication and Authorization
        Service (JAAS). This package is discussed in detail below.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Central to JAAS operation are login configuration files. To
        learn more about JAAS login configuration files, consult the JAAS
        reference documentation available from Sun Microsystems. We expect you
        to have a basic understanding of JAAS and its login configuration file
        syntax in order to understand this section.</fo:block></fo:block><fo:block id="jaas-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">8.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">JaasAuthenticationProvider</fo:inline> attempts to
        authenticate a user’s principal and credentials through JAAS.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Let’s assume we have a JAAS login configuration file,
        <fo:inline font-family="monospace" font-size="0.7em">/WEB-INF/login.conf</fo:inline>, with the following
        contents:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1976">JAASTest {
  sample.SampleLoginModule required;
};</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Like all Acegi Security beans, the
        <fo:inline font-family="monospace" font-size="0.7em">JaasAuthenticationProvider</fo:inline> is configured via the
        application context. The following definitions would correspond to the
        above JAAS login configuration file:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e1984">
&lt;bean id="jaasAuthenticationProvider" class="org.acegisecurity.providers.jaas.JaasAuthenticationProvider"&gt;
  &lt;property name="loginConfig"&gt;
    &lt;value&gt;/WEB-INF/login.conf&lt;/value&gt;
  &lt;/property&gt;
  &lt;property name="loginContextName"&gt;
    &lt;value&gt;JAASTest&lt;/value&gt;
  &lt;/property&gt;
  &lt;property name="callbackHandlers"&gt;
    &lt;list&gt;
      &lt;bean class="org.acegisecurity.providers.jaas.JaasNameCallbackHandler"/&gt;
      &lt;bean class="org.acegisecurity.providers.jaas.JaasPasswordCallbackHandler"/&gt;
    &lt;/list&gt;
  &lt;/property&gt;
  &lt;property name="authorityGranters"&gt;
    &lt;list&gt;
      &lt;bean class="org.acegisecurity.providers.jaas.TestAuthorityGranter"/&gt;
    &lt;/list&gt;
  &lt;/property&gt;
&lt;/bean&gt;

          </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">CallbackHandler</fo:inline>s and
        <fo:inline font-family="monospace" font-size="0.7em">AuthorityGranter</fo:inline>s are discussed below.</fo:block><fo:block id="jaas-callbackhandler"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">JAAS CallbackHandler</fo:marker><fo:block font-size="15pt" space-before.optimum="0.6em" space-before.minimum="0.6em" space-before.maximum="0.6em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">8.2.1. JAAS CallbackHandler</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Most JAAS <fo:inline font-family="monospace" font-size="0.7em">LoginModule</fo:inline>s require a callback
          of some sort. These callbacks are usually used to obtain the
          username and password from the user.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In an Acegi Security deployment, Acegi Security is responsible
          for this user interaction (via the authentication mechanism). Thus,
          by the time the authentication request is delegated through to JAAS,
          Acegi Security's authentication mechanism will already have
          fully-populated an <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object
          containing all the information required by the JAAS
          <fo:inline font-family="monospace" font-size="0.7em">LoginModule</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Therefore, the JAAS package for Acegi Security provides two
          default callback handlers,
          <fo:inline font-family="monospace" font-size="0.7em">JaasNameCallbackHandler</fo:inline> and
          <fo:inline font-family="monospace" font-size="0.7em">JaasPasswordCallbackHandler</fo:inline>. Each of these
          callback handlers implement
          <fo:inline font-family="monospace" font-size="0.7em">JaasAuthenticationCallbackHandler</fo:inline>. In most cases
          these callback handlers can simply be used without understanding the
          internal mechanics.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">For those needing full control over the callback behavior,
          internally <fo:inline font-family="monospace" font-size="0.7em">JaasAutheticationProvider</fo:inline> wraps these
          <fo:inline font-family="monospace" font-size="0.7em">JaasAuthenticationCallbackHandler</fo:inline>s with an
          <fo:inline font-family="monospace" font-size="0.7em">InternalCallbackHandler</fo:inline>. The
          <fo:inline font-family="monospace" font-size="0.7em">InternalCallbackHandler</fo:inline> is the class that
          actually implements JAAS’ normal <fo:inline font-family="monospace" font-size="0.7em">CallbackHandler</fo:inline>
          interface. Any time that the JAAS <fo:inline font-family="monospace" font-size="0.7em">LoginModule</fo:inline> is
          used, it is passed a list of application context configured
          <fo:inline font-family="monospace" font-size="0.7em">InternalCallbackHandler</fo:inline>s. If the
          <fo:inline font-family="monospace" font-size="0.7em">LoginModule</fo:inline> requests a callback against the
          <fo:inline font-family="monospace" font-size="0.7em">InternalCallbackHandler</fo:inline>s, the callback is in-turn
          passed to the <fo:inline font-family="monospace" font-size="0.7em">JaasAuthenticationCallbackHandler</fo:inline>s
          being wrapped.</fo:block></fo:block><fo:block id="jaas-authoritygranter"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">JAAS AuthorityGranter</fo:marker><fo:block font-size="15pt" space-before.optimum="0.6em" space-before.minimum="0.6em" space-before.maximum="0.6em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">8.2.2. JAAS AuthorityGranter</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">JAAS works with principals. Even "roles" are represented as
          principals in JAAS. Acegi Security, on the other hand, works with
          <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> objects. Each
          <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object contains a single
          principal, and multiple <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline>[]s. To
          facilitate mapping between these different concepts, Acegi
          Security's JAAS package includes an
          <fo:inline font-family="monospace" font-size="0.7em">AuthorityGranter</fo:inline> interface.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">An <fo:inline font-family="monospace" font-size="0.7em">AuthorityGranter</fo:inline> is responsible for
          inspecting a JAAS principal and returning a
          <fo:inline font-family="monospace" font-size="0.7em">String</fo:inline>. The
          <fo:inline font-family="monospace" font-size="0.7em">JaasAuthenticationProvider</fo:inline> then creates a
          <fo:inline font-family="monospace" font-size="0.7em">JaasGrantedAuthority</fo:inline> (which implements Acegi
          Security’s <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline> interface) containing
          both the <fo:inline font-family="monospace" font-size="0.7em">AuthorityGranter</fo:inline>-returned
          <fo:inline font-family="monospace" font-size="0.7em">String</fo:inline> and the JAAS principal that the
          <fo:inline font-family="monospace" font-size="0.7em">AuthorityGranter</fo:inline> was passed. The
          <fo:inline font-family="monospace" font-size="0.7em">JaasAuthenticationProvider</fo:inline> obtains the JAAS
          principals by firstly successfully authenticating the user’s
          credentials using the JAAS <fo:inline font-family="monospace" font-size="0.7em">LoginModule</fo:inline>, and then
          accessing the <fo:inline font-family="monospace" font-size="0.7em">LoginContext</fo:inline> it returns. A call to
          <fo:inline font-family="monospace" font-size="0.7em">LoginContext.getSubject().getPrincipals()</fo:inline> is
          made, with each resulting principal passed to each
          <fo:inline font-family="monospace" font-size="0.7em">AuthorityGranter</fo:inline> defined against the
          <fo:inline font-family="monospace" font-size="0.7em">JaasAuthenticationProvider.setAuthorityGranters(List)</fo:inline>
          property.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security does not include any production
          <fo:inline font-family="monospace" font-size="0.7em">AuthorityGranter</fo:inline>s given that every JAAS principal
          has an implementation-specific meaning. However, there is a
          <fo:inline font-family="monospace" font-size="0.7em">TestAuthorityGranter</fo:inline> in the unit tests that
          demonstrates a simple <fo:inline font-family="monospace" font-size="0.7em">AuthorityGranter</fo:inline>
          implementation.</fo:block></fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Siteminder Authentication Mechanism</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Siteminder Authentication Mechanism</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="siteminder"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 9. Siteminder Authentication Mechanism</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="siteminder-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">9.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Siteminder is a commercial single sign on solution by Computer
        Associates.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security provides a filter,
        <fo:inline font-family="monospace" font-size="0.7em">SiteminderAuthenticationProcessingFilter</fo:inline> and
        provider, <fo:inline font-family="monospace" font-size="0.7em">SiteminderAuthenticationProvider</fo:inline> that can
        be used to process requests that have been pre-authenticated by
        Siteminder. This filter assumes that you're using Siteminder for
        <fo:inline font-style="italic">authentication</fo:inline>, and that you're using Acegi
        Security for <fo:inline font-style="italic">authorization</fo:inline>. The use of Siteminder
        for <fo:inline font-style="italic">authorization</fo:inline> is not yet directly supported
        by Acegi Security.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">When using Siteminder, an agent is setup on your web server to
        intercept a principal's first call to your application. The agent
        redirects the web request to a single sign-on login page, and once
        authenticated, your application receives the request. Inside the HTTP
        request is a header - such as <fo:inline font-family="monospace" font-size="0.7em">SM_USER</fo:inline> - which
        identifies the authenticated principal (please refer to your
        organization's "single sign-on" group for header details in your
        particular configuration).</fo:block></fo:block><fo:block id="siteminder-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">9.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The first step in setting up Acegi Security's Siteminder support
        is to define the authentication mechanism that will inspect the HTTP
        header discussed earlier. It will be responsible for generating a
        <fo:inline font-family="monospace" font-size="0.7em">UsernamePasswordAuthenticationToken</fo:inline> that is later
        sent to the <fo:inline font-family="monospace" font-size="0.7em">SiteminderAuthenticationProvider</fo:inline>. Let's
        look at an example:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2167">&lt;bean id="authenticationProcessingFilter" class="org.acegisecurity.ui.webapp.SiteminderAuthenticationProcessingFilter"&gt;
  &lt;property name="authenticationManager"&gt;&lt;ref bean="authenticationManager"/&gt;&lt;/property&gt;
  &lt;property name="authenticationFailureUrl"&gt;&lt;value&gt;/login.jsp?login_error=1&lt;/value&gt;&lt;/property&gt;
  &lt;property name="defaultTargetUrl"&gt;&lt;value&gt;/security.do?method=getMainMenu&lt;/value&gt;&lt;/property&gt;
  &lt;property name="filterProcessesUrl"&gt;&lt;value&gt;/j_acegi_security_check&lt;/value&gt;&lt;/property&gt;
  &lt;property name="siteminderUsernameHeaderKey"&gt;&lt;value&gt;SM_USER&lt;/value&gt;&lt;/property&gt;
  &lt;property name="formUsernameParameterKey"&gt;&lt;value&gt;j_username&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">In our example above, the bean is being provided an
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline>, as is normally needed by
        authentication mechanisms. Several URLs are also specified, with the
        values being self-explanatory. It's important to also specify the HTTP
        header that Acegi Security should inspect. If you additionally want to
        support form-based authentication (i.e. in your development
        environment where Siteminder is not installed), specify the form's
        username parameter as well - just don't do this in production!</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Note that you'll need a
        <fo:inline font-family="monospace" font-size="0.7em"><fo:inline font-family="monospace" font-size="0.7em">SiteminderAuthenticationProvider</fo:inline></fo:inline>
        configured against your <fo:inline font-family="monospace" font-size="0.7em">ProviderManager</fo:inline> in order to
        use the Siteminder authentication mechanism. Normally an
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline> expects the password
        property to match what it retrieves from the
        <fo:inline font-family="monospace" font-size="0.7em">UserDetailsSource</fo:inline>, but in this case, authentication
        has already been handled by Siteminder, so password property is not
        even relevant. This may sound like a security weakness, but remember
        that users have to authenticate with Siteminder before your
        application ever receives the requests, so the purpose of your custom
        <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> should simply be to build the
        complete <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object (ie with suitable
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority[]</fo:inline>s).</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Advanced tip and word to the wise: If you additionally want to
        support form-based authentication in your development environment
        (where Siteminder is typically not installed), specify the form's
        username parameter as well. Just don't do this in production!</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Run-As Authentication Replacement</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Run-As Authentication Replacement</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="runas"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 10. Run-As Authentication Replacement</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="runas-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">10.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> is able to
        temporarily replace the <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object in
        the <fo:inline font-family="monospace" font-size="0.7em">SecurityContext</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> during the secure object
        callback phase. This only occurs if the original
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object was successfully processed by
        the <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">AccessDecisionManager</fo:inline>. The
        <fo:inline font-family="monospace" font-size="0.7em">RunAsManager</fo:inline> will indicate the replacement
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object, if any, that should be used
        during the <fo:inline font-family="monospace" font-size="0.7em">SecurityInterceptorCallback</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">By temporarily replacing the <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>
        object during the secure object callback phase, the secured invocation
        will be able to call other objects which require different
        authentication and authorization credentials. It will also be able to
        perform any internal security checks for specific
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline> objects. Because Acegi Security
        provides a number of helper classes that automatically configure
        remoting protocols based on the contents of the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>, these run-as replacements
        are particularly useful when calling remote web services</fo:block></fo:block><fo:block id="runas-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">10.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">A <fo:inline font-family="monospace" font-size="0.7em">RunAsManager</fo:inline> interface is provided by Acegi
        Security:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2258">public Authentication buildRunAs(Authentication authentication, Object object, ConfigAttributeDefinition config);
public boolean supports(ConfigAttribute attribute);
public boolean supports(Class clazz);</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The first method returns the <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>
        object that should replace the existing
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object for the duration of the
        method invocation. If the method returns <fo:inline font-family="monospace" font-size="0.7em">null</fo:inline>, it
        indicates no replacement should be made. The second method is used by
        the <fo:inline font-family="monospace" font-size="0.7em">AbstractSecurityInterceptor</fo:inline> as part of its
        startup validation of configuration attributes. The
        <fo:inline font-family="monospace" font-size="0.7em">supports(Class)</fo:inline> method is called by a security
        interceptor implementation to ensure the configured
        <fo:inline font-family="monospace" font-size="0.7em">RunAsManager</fo:inline> supports the type of secure object
        that the security interceptor will present.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">One concrete implementation of a <fo:inline font-family="monospace" font-size="0.7em">RunAsManager</fo:inline>
        is provided with Acegi Security. The
        <fo:inline font-family="monospace" font-size="0.7em">RunAsManagerImpl</fo:inline> class returns a replacement
        <fo:inline font-family="monospace" font-size="0.7em">RunAsUserToken</fo:inline> if any
        <fo:inline font-family="monospace" font-size="0.7em">ConfigAttribute</fo:inline> starts with
        <fo:inline font-family="monospace" font-size="0.7em">RUN_AS_</fo:inline>. If any such
        <fo:inline font-family="monospace" font-size="0.7em">ConfigAttribute</fo:inline> is found, the replacement
        <fo:inline font-family="monospace" font-size="0.7em">RunAsUserToken</fo:inline> will contain the same principal,
        credentials and granted authorities as the original
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object, along with a new
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthorityImpl</fo:inline> for each
        <fo:inline font-family="monospace" font-size="0.7em">RUN_AS_</fo:inline> <fo:inline font-family="monospace" font-size="0.7em">ConfigAttribute</fo:inline>. Each
        new <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthorityImpl</fo:inline> will be prefixed with
        <fo:inline font-family="monospace" font-size="0.7em">ROLE_</fo:inline>, followed by the <fo:inline font-family="monospace" font-size="0.7em">RUN_AS</fo:inline>
        <fo:inline font-family="monospace" font-size="0.7em">ConfigAttribute</fo:inline>. For example, a
        <fo:inline font-family="monospace" font-size="0.7em">RUN_AS_SERVER</fo:inline> will result in the replacement
        <fo:inline font-family="monospace" font-size="0.7em">RunAsUserToken</fo:inline> containing a
        <fo:inline font-family="monospace" font-size="0.7em">ROLE_RUN_AS_SERVER</fo:inline> granted authority.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The replacement <fo:inline font-family="monospace" font-size="0.7em">RunAsUserToken</fo:inline> is just like
        any other <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object. It needs to be
        authenticated by the <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline>,
        probably via delegation to a suitable
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProvider</fo:inline>. The
        <fo:inline font-family="monospace" font-size="0.7em">RunAsImplAuthenticationProvider</fo:inline> performs such
        authentication. It simply accepts as valid any
        <fo:inline font-family="monospace" font-size="0.7em">RunAsUserToken</fo:inline> presented.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">To ensure malicious code does not create a
        <fo:inline font-family="monospace" font-size="0.7em">RunAsUserToken</fo:inline> and present it for guaranteed
        acceptance by the <fo:inline font-family="monospace" font-size="0.7em">RunAsImplAuthenticationProvider</fo:inline>,
        the hash of a key is stored in all generated tokens. The
        <fo:inline font-family="monospace" font-size="0.7em">RunAsManagerImpl</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">RunAsImplAuthenticationProvider</fo:inline> is created in the
        bean context with the same key:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2371">
&lt;bean id="runAsManager" class="org.acegisecurity.runas.RunAsManagerImpl"&gt;
  &lt;property name="key"&gt;&lt;value&gt;my_run_as_password&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="runAsAuthenticationProvider" class="org.acegisecurity.runas.RunAsImplAuthenticationProvider"&gt;
  &lt;property name="key"&gt;&lt;value&gt;my_run_as_password&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">By using the same key, each <fo:inline font-family="monospace" font-size="0.7em">RunAsUserToken</fo:inline>
        can be validated it was created by an approved
        <fo:inline font-family="monospace" font-size="0.7em">RunAsManagerImpl</fo:inline>. The
        <fo:inline font-family="monospace" font-size="0.7em">RunAsUserToken</fo:inline> is immutable after creation for
        security reasons</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Form Authentication Mechanism</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Form Authentication Mechanism</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="form"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 11. Form Authentication Mechanism</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="form-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">11.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">HTTP Form Authentication involves using the
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessingFilter</fo:inline> to process a login
        form. This is the most common way that application authenticate end
        users. Form-based authentication is entirely compatible with the DAO
        and JAAS authentication providers.</fo:block></fo:block><fo:block id="form-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">11.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The login form simply contains <fo:inline font-family="monospace" font-size="0.7em">j_username</fo:inline> and
        <fo:inline font-family="monospace" font-size="0.7em">j_password</fo:inline> input fields, and posts to a URL that is
        monitored by the filter (by default
        <fo:inline font-family="monospace" font-size="0.7em">j_acegi_security_check</fo:inline>). The filter is defined in
        <fo:inline font-family="monospace" font-size="0.7em">web.xml</fo:inline> behind a
        <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline> as follows:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2416">&lt;filter&gt;
  &lt;filter-name&gt;Acegi Authentication Processing Filter&lt;/filter-name&gt;
  &lt;filter-class&gt;org.acegisecurity.util.FilterToBeanProxy&lt;/filter-class&gt;
  &lt;init-param&gt;
    &lt;param-name&gt;targetClass&lt;/param-name&gt;
    &lt;param-value&gt;org.acegisecurity.ui.webapp.AuthenticationProcessingFilter&lt;/param-value&gt;
  &lt;/init-param&gt;
&lt;/filter&gt;

&lt;filter-mapping&gt;
  &lt;filter-name&gt;Acegi Authentication Processing Filter&lt;/filter-name&gt;
  &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
&lt;/filter-mapping&gt;</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">For a discussion of <fo:inline font-family="monospace" font-size="0.7em">FilterToBeanProxy</fo:inline>, please
        refer to the Filters section. The application context will need to
        define the <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessingFilter</fo:inline>:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2427">&lt;bean id="authenticationProcessingFilter" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter"&gt;
  &lt;property name="authenticationManager"&gt;&lt;ref bean="authenticationManager"/&gt;&lt;/property&gt;
  &lt;property name="authenticationFailureUrl"&gt;&lt;value&gt;/acegilogin.jsp?login_error=1&lt;/value&gt;&lt;/property&gt;
  &lt;property name="defaultTargetUrl"&gt;&lt;value&gt;/&lt;/value&gt;&lt;/property&gt;
  &lt;property name="filterProcessesUrl"&gt;&lt;value&gt;/j_acegi_security_check&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The configured <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline>
        processes each authentication request. If authentication fails, the
        browser will be redirected to the
        <fo:inline font-family="monospace" font-size="0.7em">authenticationFailureUrl</fo:inline>. The
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationException</fo:inline> will be placed into the
        <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> attribute indicated by
        <fo:inline font-family="monospace" font-size="0.7em">AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY</fo:inline>,
        enabling a reason to be provided to the user on the error page.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">If authentication is successful, the resulting
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object will be placed into the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Once the <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> has been
        updated, the browser will need to be redirected to the target URL. The
        target URL is usually indicated by the <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline>
        attribute specified by
        <fo:inline font-family="monospace" font-size="0.7em">AbstractProcessingFilter.ACEGI_SECURITY_TARGET_URL_KEY</fo:inline>.
        This attribute is automatically set by the
        <fo:inline font-family="monospace" font-size="0.7em">ExceptionTranslationFilter</fo:inline> when an
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationException</fo:inline> occurs, so that after login
        is completed the user can return to what they were trying to access.
        If for some reason the <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline> does not
        indicate the target URL, the browser will be redirected to the
        <fo:inline font-family="monospace" font-size="0.7em">defaultTargetUrl</fo:inline> property.</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>BASIC Authentication Mechanism</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>BASIC Authentication Mechanism</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="basic"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 12. BASIC Authentication Mechanism</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="basic-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">12.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security provides a
        <fo:inline font-family="monospace" font-size="0.7em">BasicProcessingFilter</fo:inline> which is capable of
        processing basic authentication credentials presented in HTTP headers.
        This can be used for authenticating calls made by Spring remoting
        protocols (such as Hessian and Burlap), as well as normal user agents
        (such as Internet Explorer and Navigator). The standard governing HTTP
        Basic Authentication is defined by RFC 1945, Section 11, and the
        <fo:inline font-family="monospace" font-size="0.7em">BasicProcessingFilter</fo:inline> conforms with this RFC. Basic
        Authentication is an attractive approach to authentication, because it
        is very widely deployed in user agents and implementation is extremely
        simple (it's just a Base64 encoding of the username:password,
        specified in an HTTP header).</fo:block></fo:block><fo:block id="basic-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">12.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">To implement HTTP Basic Authentication, it is necessary to
        define <fo:inline font-family="monospace" font-size="0.7em">BasicProcessingFilter</fo:inline> in the filter chain.
        The application context will need to define the
        <fo:inline font-family="monospace" font-size="0.7em">BasicProcessingFilter</fo:inline> and its required
        collaborator:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2503">
&lt;bean id="basicProcessingFilter" class="org.acegisecurity.ui.basicauth.BasicProcessingFilter"&gt;
  &lt;property name="authenticationManager"&gt;&lt;ref bean="authenticationManager"/&gt;&lt;/property&gt;
  &lt;property name="authenticationEntryPoint"&gt;&lt;ref bean="authenticationEntryPoint"/&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="authenticationEntryPoint" class="org.acegisecurity.ui.basicauth.BasicProcessingFilterEntryPoint"&gt;
  &lt;property name="realmName"&gt;&lt;value&gt;Name Of Your Realm&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The configured <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager</fo:inline>
        processes each authentication request. If authentication fails, the
        configured <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline> will be used to
        retry the authentication process. Usually you will use the
        <fo:inline font-family="monospace" font-size="0.7em">BasicProcessingFilterEntryPoint</fo:inline>, which returns a
        401 response with a suitable header to retry HTTP Basic
        authentication. If authentication is successful, the resulting
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object will be placed into the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">If the authentication event was successful, or authentication
        was not attempted because the HTTP header did not contain a supported
        authentication request, the filter chain will continue as normal. The
        only time the filter chain will be interrupted is if authentication
        fails and the <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline> is called,
        as discussed in the previous paragraph</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Digest Authentication</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Digest Authentication</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="digest"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 13. Digest Authentication</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="digest-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">13.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security provides a
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilter</fo:inline> which is capable of
        processing digest authentication credentials presented in HTTP
        headers. Digest Authentication attempts to solve many of the
        weaknesses of Basic authentication, specifically by ensuring
        credentials are never sent in clear text across the wire. Many user
        agents support Digest Authentication, including FireFox and Internet
        Explorer. The standard governing HTTP Digest Authentication is defined
        by RFC 2617, which updates an earlier version of the Digest
        Authentication standard prescribed by RFC 2069. Most user agents
        implement RFC 2617. Acegi Security
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilter</fo:inline> is compatible with the
        "<fo:inline font-family="monospace" font-size="0.7em">auth</fo:inline>" quality of protection
        (<fo:inline font-family="monospace" font-size="0.7em">qop</fo:inline>) prescribed by RFC 2617, which also provides
        backward compatibility with RFC 2069. Digest Authentication is a
        highly attractive option if you need to use unencrypted HTTP (ie no
        TLS/HTTPS) and wish to maximise security of the authentication
        process. Indeed Digest Authentication is a mandatory requirement for
        the WebDAV protocol, as noted by RFC 2518 Section 17.1, so we should
        expect to see it increasingly deployed and replacing Basic
        Authentication.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Digest Authentication is definitely the most secure choice
        between Form Authentication, Basic Authentication and Digest
        Authentication, although extra security also means more complex user
        agent implementations. Central to Digest Authentication is a "nonce".
        This is a value the server generates. Acegi Security's nonce adopts
        the following format:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2550">base64(expirationTime + ":" + md5Hex(expirationTime + ":" + key))

expirationTime:   The date and time when the nonce expires, expressed in milliseconds
key:              A private key to prevent modification of the nonce token
</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilterEntryPoint</fo:inline> has a
        property specifying the <fo:inline font-family="monospace" font-size="0.7em">key</fo:inline> used for generating the
        nonce tokens, along with a <fo:inline font-family="monospace" font-size="0.7em">nonceValiditySeconds</fo:inline>
        property for determining the expiration time (default 300, which
        equals five minutes). Whist ever the nonce is valid, the digest is
        computed by concatenating various strings including the username,
        password, nonce, URI being requested, a client-generated nonce (merely
        a random value which the user agent generates each request), the realm
        name etc, then performing an MD5 hash. Both the server and user agent
        perform this digest computation, resulting in different hash codes if
        they disagree on an included value (eg password). In Acegi Security
        implementation, if the server-generated nonce has merely expired (but
        the digest was otherwise valid), the
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilterEntryPoint</fo:inline> will send a
        <fo:inline font-family="monospace" font-size="0.7em">"stale=true"</fo:inline> header. This tells the user agent
        there is no need to disturb the user (as the password and username etc
        is correct), but simply to try again using a new nonce.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">An appropriate value for
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilterEntryPoint</fo:inline>'s
        <fo:inline font-family="monospace" font-size="0.7em">nonceValiditySeconds</fo:inline> parameter will depend on your
        application. Extremely secure applications should note that an
        intercepted authentication header can be used to impersonate the
        principal until the <fo:inline font-family="monospace" font-size="0.7em">expirationTime</fo:inline> contained in the
        nonce is reached. This is the key principle when selecting an
        appropriate setting, but it would be unusual for immensely secure
        applications to not be running over TLS/HTTPS in the first
        instance.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Because of the more complex implementation of Digest
        Authentication, there are often user agent issues. For example,
        Internet Explorer fails to present an "<fo:inline font-family="monospace" font-size="0.7em">opaque</fo:inline>"
        token on subsequent requests in the same session. Acegi Security
        filters therefore encapsulate all state information into the
        "<fo:inline font-family="monospace" font-size="0.7em">nonce</fo:inline>" token instead. In our testing, Acegi
        Security implementation works reliably with FireFox and Internet
        Explorer, correctly handling nonce timeouts etc.</fo:block></fo:block><fo:block id="digest-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">13.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Now that we've reviewed the theory, let's see how to use it. To
        implement HTTP Digest Authentication, it is necessary to define
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilter</fo:inline> in the fitler chain. The
        application context will need to define the
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilter</fo:inline> and its required
        collaborators:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2600">
&lt;bean id="digestProcessingFilter" class="org.acegisecurity.ui.digestauth.DigestProcessingFilter"&gt;
  &lt;property name="userDetailsService"&gt;&lt;ref local="jdbcDaoImpl"/&gt;&lt;/property&gt;
  &lt;property name="authenticationEntryPoint"&gt;&lt;ref local="digestProcessingFilterEntryPoint"/&gt;&lt;/property&gt;
  &lt;property name="userCache"&gt;&lt;ref local="userCache"/&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="digestProcessingFilterEntryPoint" class="org.acegisecurity.ui.digestauth.DigestProcessingFilterEntryPoint"&gt;
  &lt;property name="realmName"&gt;&lt;value&gt;Contacts Realm via Digest Authentication&lt;/value&gt;&lt;/property&gt;
  &lt;property name="key"&gt;&lt;value&gt;acegi&lt;/value&gt;&lt;/property&gt;
  &lt;property name="nonceValiditySeconds"&gt;&lt;value&gt;10&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The configured <fo:inline font-family="monospace" font-size="0.7em">UserDetailsService</fo:inline> is needed
        because <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilter</fo:inline> must have direct
        access to the clear text password of a user. Digest Authentication
        will NOT work if you are using encoded passwords in your DAO. The DAO
        collaborator, along with the <fo:inline font-family="monospace" font-size="0.7em">UserCache</fo:inline>, are
        typically shared directly with a
        <fo:inline font-family="monospace" font-size="0.7em">DaoAuthenticationProvider</fo:inline>. The
        <fo:inline font-family="monospace" font-size="0.7em">authenticationEntryPoint</fo:inline> property must be
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilterEntryPoint</fo:inline>, so that
        <fo:inline font-family="monospace" font-size="0.7em">DigestProcessingFilter</fo:inline> can obtain the correct
        <fo:inline font-family="monospace" font-size="0.7em">realmName</fo:inline> and <fo:inline font-family="monospace" font-size="0.7em">key</fo:inline> for digest
        calculations.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Like <fo:inline font-family="monospace" font-size="0.7em">BasicAuthenticationFilter</fo:inline>, if
        authentication is successful an <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>
        request token will be placed into the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline>. If the authentication event
        was successful, or authentication was not attempted because the HTTP
        header did not contain a Digest Authentication request, the filter
        chain will continue as normal. The only time the filter chain will be
        interrupted is if authentication fails and the
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline> is called, as discussed in
        the previous paragraph.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Digest Authentication's RFC offers a range of additional
        features to further increase security. For example, the nonce can be
        changed on every request. Despite this, Acegi Security implementation
        was designed to minimise the complexity of the implementation (and the
        doubtless user agent incompatibilities that would emerge), and avoid
        needing to store server-side state. You are invited to review RFC 2617
        if you wish to explore these features in more detail. As far as we are
        aware, Acegi Security implementation does comply with the minimum
        standards of this RFC.</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Anonymous Authentication</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Anonymous Authentication</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="anonymous"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 14. Anonymous Authentication</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="anonymous-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">14.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Particularly in the case of web request URI security, sometimes
        it is more convenient to assign configuration attributes against every
        possible secure object invocation. Put differently, sometimes it is
        nice to say <fo:inline font-family="monospace" font-size="0.7em">ROLE_SOMETHING</fo:inline> is required by default
        and only allow certain exceptions to this rule, such as for login,
        logout and home pages of an application. There are also other
        situations where anonymous authentication would be desired, such as
        when an auditing interceptor queries the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> to identify which principal
        was responsible for a given operation. Such classes can be authored
        with more robustness if they know the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> always contains an
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> object, and never
        <fo:inline font-family="monospace" font-size="0.7em">null</fo:inline>.</fo:block></fo:block><fo:block id="anonymous-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">14.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Acegi Security provides three classes that together provide an
        anonymous authentication feature.
        <fo:inline font-family="monospace" font-size="0.7em">AnonymousAuthenticationToken</fo:inline> is an implementation
        of <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>, and stores the
        <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline>[]s which apply to the anonymous
        principal. There is a corresponding
        <fo:inline font-family="monospace" font-size="0.7em">AnonymousAuthenticationProvider</fo:inline>, which is chained
        into the <fo:inline font-family="monospace" font-size="0.7em">ProviderManager</fo:inline> so that
        <fo:inline font-family="monospace" font-size="0.7em">AnonymousAuthenticationTokens</fo:inline> are accepted.
        Finally, there is an AnonymousProcessingFilter, which is chained after
        the normal authentication mechanisms and automatically add an
        <fo:inline font-family="monospace" font-size="0.7em">AnonymousAuthenticationToken</fo:inline> to the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> if there is no existing
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline> held there. The definition of the
        filter and authentication provider appears as follows:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2703">
&lt;bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter"&gt;
  &lt;property name="key"&gt;&lt;value&gt;foobar&lt;/value&gt;&lt;/property&gt;
  &lt;property name="userAttribute"&gt;&lt;value&gt;anonymousUser,ROLE_ANONYMOUS&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="anonymousAuthenticationProvider" class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider"&gt;
  &lt;property name="key"&gt;&lt;value&gt;foobar&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

        </fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The <fo:inline font-family="monospace" font-size="0.7em">key</fo:inline> is shared between the filter and
        authentication provider, so that tokens created by the former are
        accepted by the latter. The <fo:inline font-family="monospace" font-size="0.7em">userAttribute</fo:inline> is
        expressed in the form of
        <fo:inline font-family="monospace" font-size="0.7em">usernameInTheAuthenticationToken,grantedAuthority[,grantedAuthority]</fo:inline>.
        This is the same syntax as used after the equals sign for
        <fo:inline font-family="monospace" font-size="0.7em">InMemoryDaoImpl</fo:inline>'s <fo:inline font-family="monospace" font-size="0.7em">userMap</fo:inline>
        property.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">As explained earlier, the benefit of anonymous authentication is
        that all URI patterns can have security applied to them. For
        example:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2725">
&lt;bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"&gt;
  &lt;property name="authenticationManager"&gt;&lt;ref bean="authenticationManager"/&gt;&lt;/property&gt;
  &lt;property name="accessDecisionManager"&gt;&lt;ref local="httpRequestAccessDecisionManager"/&gt;&lt;/property&gt;
  &lt;property name="objectDefinitionSource"&gt;
    &lt;value&gt;
      CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
      PATTERN_TYPE_APACHE_ANT
      /index.jsp=ROLE_ANONYMOUS,ROLE_USER
      /hello.htm=ROLE_ANONYMOUS,ROLE_USER
      /logoff.jsp=ROLE_ANONYMOUS,ROLE_USER
      /acegilogin.jsp*=ROLE_ANONYMOUS,ROLE_USER
      /**=ROLE_USER
    &lt;/value&gt;
  &lt;/property&gt;
&lt;/bean&gt;

        </fo:block>Rounding out the anonymous authentication discussion
        is the <fo:inline font-family="monospace" font-size="0.7em">AuthenticationTrustResolver</fo:inline> interface, with
        its corresponding <fo:inline font-family="monospace" font-size="0.7em">AuthenticationTrustResolverImpl</fo:inline>
        implementation. This interface provides an
        <fo:inline font-family="monospace" font-size="0.7em">isAnonymous(Authentication)</fo:inline> method, which allows
        interested classes to take into account this special type of
        authentication status. The
        <fo:inline font-family="monospace" font-size="0.7em">ExceptionTranslationFilter</fo:inline> uses this interface in
        processing <fo:inline font-family="monospace" font-size="0.7em">AccessDeniedException</fo:inline>s. If an
        <fo:inline font-family="monospace" font-size="0.7em">AccessDeniedException</fo:inline> is thrown, and the
        authentication is of an anonymous type, instead of throwing a 403
        (forbidden) response, the filter will instead commence the
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationEntryPoint</fo:inline> so the principal can
        authenticate properly. This is a necessary distinction, otherwise
        principals would always be deemed "authenticated" and never be given
        an opportunity to login via form, basic, digest or some other normal
        authentication mechanism</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Remember-Me Authentication</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>Remember-Me Authentication</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"/></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="remember-me"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"><fo:block margin-left="0pc"><fo:block text-align="left" font-weight="bold" font-size="21.6pt"><fo:block keep-with-next.within-column="always" space-before.optimum="12pt" space-before.minimum="12pt * 0.8" space-before.maximum="12pt * 1.2" hyphenate="false" text-align="left" start-indent="0pc" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">Chapter 15. Remember-Me Authentication</fo:block></fo:block></fo:block></fo:block></fo:block><fo:block id="remember-me-overview"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Overview</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">15.1. Overview</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Remember-me authentication refers to web sites being able to
        remember the identity of a principal between sessions. This is
        typically accomplished by sending a cookie to the browser, with the
        cookie being detected during future sessions and causing automated
        login to take place. Acegi Security provides the necessary hooks so
        that such operations can take place, along with providing a concrete
        implementation that uses hashing to preserve the security of
        cookie-based tokens.</fo:block></fo:block><fo:block id="remember-me-config"><fo:block><fo:block><fo:block keep-together.within-column="always" margin-left="0pc" font-family="sans-serif,Symbol,ZapfDingbats"><fo:block keep-with-next.within-column="always"><fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em" text-align="left" start-indent="0pc"><fo:marker marker-class-name="section.head.marker">Configuration</fo:marker><fo:block font-size="18pt" space-before.optimum="0.8em" space-before.minimum="0.8em" space-before.maximum="0.8em" space-after.optimum="0.1em" space-after.minimum="0.1em" space-after.maximum="0.1em">15.2. Configuration</fo:block></fo:block></fo:block></fo:block></fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Remember-me authentication is not used with basic
        authentication, given it is often not used with
        <fo:inline font-family="monospace" font-size="0.7em">HttpSession</fo:inline>s. Remember-me is used with
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessingFilter</fo:inline>, and is implemented
        via hooks in the <fo:inline font-family="monospace" font-size="0.7em">AbstractProcessingFilter</fo:inline>
        superclass. The hooks will invoke a concrete
        <fo:inline font-family="monospace" font-size="0.7em">RememberMeServices</fo:inline> at the appropriate times. The
        interface looks like this:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2775">public Authentication autoLogin(HttpServletRequest request, HttpServletResponse response);
public void loginFail(HttpServletRequest request, HttpServletResponse response);
public void loginSuccess(HttpServletRequest request, HttpServletResponse response, Authentication successfulAuthentication);</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Please refer to JavaDocs for a fuller discussion on what the
        methods do, although note at this stage
        <fo:inline font-family="monospace" font-size="0.7em">AbstractProcessingFilter</fo:inline> only calls the
        <fo:inline font-family="monospace" font-size="0.7em">loginFail()</fo:inline> and <fo:inline font-family="monospace" font-size="0.7em">loginSuccess()</fo:inline>
        methods. The <fo:inline font-family="monospace" font-size="0.7em">autoLogin()</fo:inline> method is called by
        <fo:inline font-family="monospace" font-size="0.7em">RememberMeProcessingFilter</fo:inline> whenever the
        <fo:inline font-family="monospace" font-size="0.7em">SecurityContextHolder</fo:inline> does not contain an
        <fo:inline font-family="monospace" font-size="0.7em">Authentication</fo:inline>. This interface therefore provides
        the underlaying remember-me implementation with sufficient
        notification of authentication-related events, and delegates to the
        implementation whenever a candidate web request might contain a cookie
        and wish to be remembered.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">This design allows any number of remember-me implementation
        strategies. In the interests of simplicity and avoiding the need for
        DAO implementations that specify write and create methods, Acegi
        Security's only concrete implementation,
        <fo:inline font-family="monospace" font-size="0.7em">TokenBasedRememberMeServices</fo:inline>, uses hashing to
        achieve a useful remember-me strategy. In essence a cookie is sent to
        the browser upon successful interactive authentication, with that
        cookie being composed as follows:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2806">base64(username + ":" + expirationTime + ":" + md5Hex(username + ":" + expirationTime + ":" password + ":" + key))

username:         As identifiable to TokenBasedRememberMeServices.getUserDetailsService()
password:         That matches the relevant UserDetails retrieved from TokenBasedRememberMeServices.getUserDetailsService()
expirationTime:   The date and time when the remember-me token expires, expressed in milliseconds
key:              A private key to prevent modification of the remember-me token
</fo:block></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">As such the remember-me token is valid only for the period
        specified, and provided that the username, password and key does not
        change. Notably, this has a potential security issue in that a
        captured remember-me token will be usable from any user agent until
        such time as the token expires. This is the same issue as with digest
        authentication. If a principal is aware a token has been captured,
        they can easily change their password and immediately invalidate all
        remember-me tokens on issue. However, if more significant security is
        needed a rolling token approach should be used (this would require a
        database) or remember-me services should simply not be used.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:inline font-family="monospace" font-size="0.7em">TokenBasedRememberMeServices</fo:inline> generates a
        <fo:inline font-family="monospace" font-size="0.7em">RememberMeAuthenticationToken</fo:inline>, which is processed
        by <fo:inline font-family="monospace" font-size="0.7em">RememberMeAuthenticationProvider</fo:inline>. A
        <fo:inline font-family="monospace" font-size="0.7em">key</fo:inline> is shared between this authentication provider
        and the <fo:inline font-family="monospace" font-size="0.7em">TokenBasedRememberMeServices</fo:inline>. In addition,
        <fo:inline font-family="monospace" font-size="0.7em">TokenBasedRememberMeServices</fo:inline> requires A
        UserDetailsService from which it can retrieve the username and
        password for signature comparison purposes, and generate the
        <fo:inline font-family="monospace" font-size="0.7em">RememberMeAuthenticationToken</fo:inline> to contain the
        correct <fo:inline font-family="monospace" font-size="0.7em">GrantedAuthority</fo:inline>[]s. Some sort of logout
        command should be provided by the application (typically via a JSP)
        that invalidates the cookie upon user request. See the Contacts Sample
        application's <fo:inline font-family="monospace" font-size="0.7em">logout.jsp</fo:inline> for an example.</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">The beans required in an application context to enable
        remember-me services are as follows:</fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:block space-before.minimum="1em" space-before.optimum="1em" space-before.maximum="1em" space-after.minimum="0.8em" space-after.optimum="1em" space-after.maximum="1.2em" hyphenate="false" wrap-option="no-wrap" white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" text-align="start" border-color="#CCCCCC" border-style="solid" border-width="0.1pt" padding-top="0.5em" padding-left="0.5em" padding-right="0.5em" padding-bottom="0.5em" margin-left="0.5em" margin-right="0.5em" font-family="monospace" font-size="8pt" background-color="#EEEEEE" id="d0e2841">
&lt;bean id="rememberMeProcessingFilter" class="org.acegisecurity.ui.rememberme.RememberMeProcessingFilter"&gt;
  &lt;property name="rememberMeServices"&gt;&lt;ref local="rememberMeServices"/&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="rememberMeServices" class="org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices"&gt;
  &lt;property name="userDetailsService"&gt;&lt;ref local="jdbcDaoImpl"/&gt;&lt;/property&gt;
  &lt;property name="key"&gt;&lt;value&gt;springRocks&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id="rememberMeAuthenticationProvider" class="org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider"&gt;
  &lt;property name="key"&gt;&lt;value&gt;springRocks&lt;/value&gt;&lt;/property&gt;
&lt;/bean&gt;

        </fo:block>Don't forget to add your
        <fo:inline font-family="monospace" font-size="0.7em">RememberMeServices</fo:inline> implementation to your
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessingFilter.setRememberMeServices()</fo:inline>
        property, include the
        <fo:inline font-family="monospace" font-size="0.7em">RememberMeAuthenticationProvider</fo:inline> in your
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationManager.setProviders()</fo:inline> list, and add
        a call to <fo:inline font-family="monospace" font-size="0.7em">RememberMeProcessingFilter</fo:inline> into your
        <fo:inline font-family="monospace" font-size="0.7em">FilterChainProxy</fo:inline> (typically immediately after your
        <fo:inline font-family="monospace" font-size="0.7em">AuthenticationProcessingFilter</fo:inline>)</fo:block></fo:block></fo:flow></fo:page-sequence><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="false" master-reference="body" language="en" format="1" initial-page-number="auto" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>X509 Authentication</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before"><fo:block><fo:block>X509 Authentication</fo:block></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif" margin-left="-5em" margin-right="-5em"/></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="left" display-align="after"><fo:block/></fo:table-cell><fo:table-cell text-align="center" display-align="after"><fo:block>Acegi Security 1.0.7</fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="after"><fo:block><fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pc"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:ta