This is hard coded in applicationContext-security.xml. I want to read the access values from a database table instead. I have defined my own UserDetailsService and I read the roles for the logged in user from the database. How do I assign these roles to the URL patterns during runtime?
When I load the application I read the values from the database and want to set the access as per these values. Essentially I want to perform the function of <intercept-url> tag using the values from the database.
In short, I do not want to hard code the URL patterns and the roles in applicationConfig-security.xml. Instead I want to load them from a database table.
I can access all pages directly except securepage.xhtml for which I get the login page. This is as expected. But when I try to login I get an error saying /j_spring_security_check is not available.
If I simply use the namespace configuration http tag I can access /j_spring_security_check. But since I am using my own filter chain I have removed the http tag.
I guess I am missing something which is setup by the http tag. Sorry, but I am really new to Spring Security. May be I am missing the most obvious thing
If I insert
<http><form-login login-page="/Login.xhtml" /></http> to the above file then /j_spring_security_check is accessible but then my springSecurityFilterChain has no effect.
So I think I am missing something which <http><form-login /></http> does.