Set Up Appkit Cookie Cracker Authentication
The Appkit ‘Cookie Cracker’ authentication provider allows authentication against an endpoint which implements the Appkit cookie cracking endpoint protocol. This allows single sign on via a cookie value set by a 'third party' service prior to entering the Appkit application.
1 Add the security provider dependency
Authentication against the cookie cracker requires the cookie cracker module. To enable this module, first remove any existing security provider dependency from the pom.xml
file under the root of the project, and then add this within the dependencies
tag:
<dependency>
<groupId>twigkit</groupId>
<artifactId>twigkit.security.provider.cookie-cracker</artifactId>
<version>${project.parent.version}</version>
</dependency>
Because this module packages all Spring configuration, any spring-security.xml configuration file should be removed for simplicity.
|
2 Configure the cookie cracking endpoint
Configure these parameters in conf/security/cookie_cracking.conf
to specify the endpoint URL, and cookies to pass to the cracking endpoint:
url: http://localhost:8080/twigkit/services/gsa/auth
cookies: twigkit-token
domain: localhost
-
url
is the URL of the cookie cracking endpoint that acts as an authentication provider. -
cookies
specifies those cookies to pass through to the cookie cracking endpoint for inspection. -
domain
specifies a domain to set on the cookies listed (optional except when the cookie cracking endpoint exists on a separate domain to the Appkit application, in which case it is required).