...
Code Block |
---|
@Override protected void configure(HttpSecurity http) throws Exception { http.addFilter(jaasApiIntegrationFilter()) .addFilterAfter(new ElytronToJaasFilter(), JaasApiIntegrationFilter.class) .csrf() .disable(); } |
Configuration
application.properties
You need to configure on the appplication side is the datasource and the database schema to use:
Code Block |
---|
######## Taskana DB #######
datasource.jndi=java:/TaskanaDS/H2
taskana.schemaName=TASKANA |
Furthermore, if you are using LDAP, you need to configure the LDAP access:
Code Block |
---|
####### properties to connect to LDAP
taskana.ldap.serverUrl=ldap://localhost:10389
taskana.ldap.bindDn=uid=admin
taskana.ldap.bindPassword=secret
taskana.ldap.baseDn=ou=Test,O=TASKANA
taskana.ldap.userSearchBase=cn=users
taskana.ldap.userSearchFilterName=objectclass
taskana.ldap.userSearchFilterValue=person
taskana.ldap.userFirstnameAttribute=givenName
taskana.ldap.userLastnameAttribute=sn
taskana.ldap.userIdAttribute=uid
taskana.ldap.groupSearchBase=
taskana.ldap.groupSearchFilterName=objectclass
taskana.ldap.groupSearchFilterValue=groupOfUniqueNames
taskana.ldap.groupNameAttribute=cn
taskana.ldap.minSearchForLength=3
taskana.ldap.maxNumberOfReturnedAccessIds=50
taskana.ldap.groupsOfUser=uniquemember |
These properties are used to do a LDAP lookup from the AccessIdController, as it is required for the Admin UI for example. It has nothing to do with the authentication of a user, which is handled by Elytron as described above.
You can find the entire example file on GitHub: https://github.com/Taskana/taskana/blob/master/rest/taskana-rest-spring-example-wildfly/src/main/resources/application.properties
web.xml
Nothing specific to TASKANA but you might need to specify the realm on Wildfly. In our example we do need to do this to make the FORM login work:
Code Block |
---|
<login-config>
<auth-method>FORM</auth-method>
<realm-name>taskanaApplicationDomain</realm-name>
<form-login-config>
<form-login-page>/login</form-login-page>
<form-error-page>/login?error</form-error-page>
</form-login-config>
</login-config> |
jboss-web.xml
In this file you meght want to change the context-root and and security-domain to match your configuration:
Code Block |
---|
<context-root>/taskana</context-root>
<security-domain>taskanaApplicationDomain</security-domain> |
Server Configuration
Database
...