Category: Spring Security

  • Spring Security 3.1 Adding Salt to Password using Custom Database and JSF 2.0

    In the last post we successfully secured our password, but there is a problem with that approach. Consider a scenario where two users have same password, our hashing mechanism can lead both password to be hashed with the same value, thus resulting in a security hole. It is now normal to use salt while hashing…

  • Spring Security 3.1 Password Encoder with Custom Database and JSF 2.0

    We have already seen how to use Spring Security and custom database for authentication in earlier post. But that implementation is saving password as plaintext, which is not an option at all. Both our user admin and guest are essential for application to run, in a usual scenario when an application is deployed, setting up…

  • Spring Security 3.1 Authentication using Custom Database Implementation and JSF 2.0

    In the last tutorial we used default database configuration required by Spring Security and we moved out of hard coded user credentials. But there is every possibility that their is already a existing database for user management and we cannot create new tables as required by Spring Security default behavior. This can be achieved very…

  • Spring Security with JDBC User Details and JSF 2.0

    We will add on to our last remember me tutorial. In this tutorial instead of hard coded username, password we will add JDBC default support provided by Spring. First we will update jsfspring-sec-bean-config.xml and add datasource property. In this tutorial we will use MySQL. jsfspring-sec-bean-config.xml [sourcecode language=”xml”] <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:beans="http://www.springframework.org/schema/beans&quot; xmlns:sec="http://www.springframework.org/schema/security&quot; xsi:schemaLocation="…

  • Implementing Spring Security Remember Me with JSF 2.0

    Today we will add remember-me functionality to our project. We will enhance our code from earlier revision, namely: Integrating Spring Security 3.1 and JSF 2.0 Spring Security 3.1 and JSF 2.0 Custom Form Adding Spring Security Logout Functionality to JSF 2.0 Remember me functionality adds a expriry timeout to a cookie which is set on the client machine,…

  • Adding Spring Security Logout Functionality to JSF 2.0

    In previous two posts: Integrating Spring Security 3.1 and JSF 2.0 and Spring Security 3.1 and JSF 2.0 Custom Form”, we integrated Spring Security 3.1 and JSF 2.0. In this tutorial we will extend the functionality and we will add a logout functionality to our application. First we will change our secured.xhtml and add a logout to…

  • Spring Security 3.1 and JSF 2.0 Custom Form

    In the previous post we saw how to integrate Spring Security 3.1 and JSF 2.0. To access the secure page Spring Security Provided us with a default login page. In this post we will see how can we have a custom login page and use Spring Security for authentication. First under pages folder create a…