twigkit.security.provider.oauth
module. This requires a custom spring-security.xml
file, but it is recommended to use one of the prepackaged modules we provide for these services.
Read more about OAuth authentication.
Set Up Active Directory Authentication for Appkit
pom.xml
under the root of the project.
dependencies
tag:
security.conf
file in src/main/resources/conf/security/
to contain:
web.xml
file in src/main/webapp/WEB-INF
:web.xml
file).active-directory.conf
in src/main/resources/conf/security
:ldap://
. In some cases, SSL encryption is used with the ‘LDAPS’ protocol. This requires the certificate is trusted by the authentication client (the JVM running Appkit). There are several ways to configure the keystore for the JVM to trust the certificate from the LDAP server. The most common way to do this is to import the certificate into the JVM’s default keystore.bloggsj@my-domain.com
). By default roles are assigned using the memberOf
attribute values of the user entry.src/main/webapp/login.jsp
in your application source tree.native
can securely authenticate a user against Fusion.
Set Up Lucidworks Fusion Authentication
Set Up Lucidworks Fusion Authentication
native
can securely authenticate a user against Fusion.These sections describe how to set up Fusion authentication using the Sessions API within an Appkit application.pom.xml
under the root of the project and insert this within the dependencies
tag:security.conf
in src/main/resources/conf/security/
:fusion.conf
in src/main/resources/conf/security/fusion
. For example:src/main/webapp/WEB-INF
:src/main/resources
.Leave the initial section of this file dealing with HTTP URL patterns as configured. Remove any existing authentication manager configuration below that initial section, and add this:Set Up HTTP Headers Authentication
pom.xml
file:
conf/security/security.conf
to contain this:
conf/security/header/header.conf
.A typical configuration might look like:remote_user
header and roles from the x-group
header.All possible properties are listed here:user-id: name of header that contains the ID of the userroles: name of the header that contains the user’s roles - multiple values will be picked up from the header if specified by the comma separated header value conventiondomain: name of the header that contains the domain for the userdetail-prefix: prefix of any headers containing values which should be added to the user’s details (for example, if X-USER-
a header with the name X-USER-DEPARTMENT
and its value will be added as an entry to the user details map)Set Up Kerberos Authentication
pom.xml
under the root of the project and add this within the dependencies
tag:security.conf
file in src/main/resources/conf/security/
to contain:web.xml
file in src/main/webapp/WEB-INF
:kerberos.conf
to src/main/resources/conf/security/
with these parameters:debug
configuration parameter and check the logs for information that could help to identify the cause. If it is a Windows environment it is recommended to check with the systems administrators that everything works correctly on the domain controller (check the Kerberos key distribution service, permissions of the service principal account, etc). You can view the headers passed from the browser in the debug information in the logs, these might provide an indication of why authentication failed (if Kerberos is used).If you find or suspect that NTLM is used, ensure you are trying to access the site using the host name configured in the SPN (service principal name). For example, if the SPN is HTTP/sharepoint-sp@sharepoint-dev.twigkit.com
, you must use the URL for the host machine sharepoint-sp
: either http://sharepoint-sp/
or http://sharepoint-sp.sharepoint-dev.twigkit.com/
. Using ‘localhost’ or another alias will not work.Set Up LDAP Authentication
pom.xml
under the root of the project and add this within the dependencies
tag:security.conf
file in src/main/resources/conf/security/
to contain:web.xml
file in src/main/webapp/WEB-INF
:web.xml
file).ldap.conf
in src/main/resources/conf/security
:user-search-base
is the DN used under which users are retrieveduser-search-filter
is the property used to determine a match against the username specified by the usergroup-role-attribute
is the property from which the name of the roles will be populatedgroup-search-base
is the DN used under which groups are retrievedgroup-search-filter
is the property used to determine the group membership of a userrole-prefix
is a prefix applied to the roles reported by Spring Securityldap://
. In some cases SSL encryption is used with the ‘LDAPS’ protocol. This requires the certificate is trusted by the authentication client (the JVM running Appkit). There are several ways to configure the keystore for the JVM to trust the certificate from the LDAP server. The most common way to do this is to import the certificate into the JVM’s default keystore.src/main/webapp/login.jsp
in your application source tree.Set Up SiteMinder Authentication
pom.xml
file in the root of the application):
security.conf
(found in src/main/resources/conf/security/
) to use SiteMinder:
Set Up Spring Authentication
spring-security.xml
file for integrating with different security mechanisms for authentication and authorization.spring-security.xml
HTTP configuration:<form-login ...>
tag defined via the authentication-success-handler-ref
. For example:login_success_handler
is a reference to the Spring Security class that implements the described strategy. This class is defined via this bean that needs to be added to the spring-security.xml
as follows:Set Up Tomcat Container Authentication
pom.xml
file in the root of the application):
security.conf
(found in src/main/resources/conf/security/
):
Set Up Windows Authentication
.exe
) and follow the installation instructions. After installation is complete, do not start the Tomcat service just yet.
D:\tomcat8
). This path will be referred to as CATALINA_HOME
hereafter. All the screenshots that follow assume you installed Tomcat in D:\Tomcat8
.%CATALINA_HOME%\bin\Tomcat8w.exe
http://localhost:8080
. You should be presented with the default Tomcat manager application.pom.xml
under the root of the project and add this within the dependencies
tag:security.conf
file in src/main/resources/conf/security/
to contain:web.xml
file if Spring was previously being used in the application.myapp.war
so that the application can be accessed as http://localhost:8080/myapp/
.isapi_redirect.dll
from the archive.%CATALINA_HOME%\bin
.
%CATALINA_HOME%\conf\workers.properties.minimal
with:
%CATALINA_HOME%\conf\uriworkermap.properties
with:
%CATALINA_HOME%\conf\server.xml
, you must put tomcatAuthentication="false"
on the AJP connector:
D:\Tomcat8
as noted above.extension_uri
and a value of /jakarta/isapi_redirect.dll
log_file
and a value pointing to where you want your log file to be (for example, D:\Tomcat8\logs\isapi.log
).
log_level
and a value for your log level (can be debug
, info
, error
or emerg
).
worker_file
and a value which is the full path to your workers.properties
file (for example, D:\Tomcat8\conf\workers.properties.minimal
)
worker_mount_file
and a value which is the full path to your uriworkermap.properties
file (for example, D:\Tomcat8\conf\uriworkermap.properties
)
To save trouble, you can create a file named tomcat_iis_settings.reg
that includes this (replacing D:\Tomcat8
with your own CATALINA_HOME
):
tomcat_iis_settings.reg
file to import the settings.
jakarta
. Its physical path should be the directory where you placed isapi_redirect.dll
(in our example, it is D:\Tomcat8\bin
). While creating this new virtual directory assign it with execute access.
isapi_redirect.dll
as a filter in your IIS/PWS web site. The name of the filter should reflect its task (here we use the name jakarta
). Its executable must be D:\Tomcat8\bin\isapi_redirect.dll
.
isapi_redirect.dll
path:
http://localhost/myapp/
, which should present the authenticated Windows user to the Appkit application.http://localhost:8080/myapp/
, you should see the same interface, except that your user is not authenticated.workers.properties
file referenced by the tomcat-connection definition, set the packet size to the maximum:
packetSize
in the AJP Connector definition:
security.conf
configuration file and other files in the /conf/security/
folder. The Security Module however also supports mechanisms like Spring Security that might require its own configuration files (for example, spring-security.xml) and custom elements in web.xml
.
Define the security provider in security.conf
using one of the following options:
spring-security.xml
file, but you can see some other common configurations Set Up Spring Authentication. Further documentation on configuring Spring Security can be found here.
Set Up Spring Authentication
spring-security.xml
file for integrating with different security mechanisms for authentication and authorization.spring-security.xml
HTTP configuration:<form-login ...>
tag defined via the authentication-success-handler-ref
. For example:login_success_handler
is a reference to the Spring Security class that implements the described strategy. This class is defined via this bean that needs to be added to the spring-security.xml
as follows:Set Up Tomcat Container Authentication
pom.xml
file in the root of the application):
security.conf
(found in src/main/resources/conf/security/
):
twigkit.security.SecurityProvider
interface and bind the class using Guice in your custom module.