Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 5

...

If you need a more complex authentication solution, please refer to Spring Security documentation.

Code Block
languagexml
<!-- Password encode bean to support passwords encripted with BCrypt way in admin-users.properties -->
<!--<bean id="passwordEncoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"/>-->

<bean id="passwordEncoder"
      class="org.springframework.security.crypto.password.NoOpPasswordEncoder" 
      factory-method="getInstance"/>

<sec:authentication-manager id="authenticationManager">
    <sec:authentication-provider>
        <sec:password-encoder ref="passwordEncoder"/>
        <sec:user-service id="userDetailsService" properties="admin-users.properties"/>
    </sec:authentication-provider>
</sec:authentication-manager>

There are several defined user roles, that can be used :

...

...

Users are defined by the external properties file named admin-users.properties

Code Block
languagejava
# Spring security file format
# password depends on configured spring PasswordEncoder (hash or plain text)
#
# Format: username=password,grantedAuthority[,grantedAuthority][,enabled|disabled]

# password is plain text
admin=admin,JMX_ADMIN,SSH_ADMIN,FIXICC_ADMIN,enabled
guest=guest,FIXICC_GUEST,enabled

# password is hash (bcrypt)
#admin=$2a$10$hCDWIHTwb7zui0dDbG8dXe2r9x3H4JDEynQuoGDn85rk6vOjxGoJC,JMX_ADMIN,SSH_ADMIN,FIXICC_ADMIN,enabled
#guest=$2a$10$pQcJLlpuHRmn5w1MdBx/xudmEBKc0l/ER7TXifc2zntKIrW3lw8S2,FIXICC_GUEST,enabledtest=test,ROLE_ADMIN,enabled

LDAP authentication

FEJ also supports authentication against an LDAP server.

...

Before getting deep into LDAP authentication, let’s get familiar with some LDAP terms.

...