1

I am attempting to implement JDBC Realm Authentication with Wildfly. I have used this article as reference:

http://blog.eisele.net/2015/01/jdbc-realm-wildfly820-primefaces51.html

As well as the accompanying source code on GitHub at https://github.com/myfear/SimpleJDBCRealmWildFly/

I am presented with the login form if I try to access one of the protected areas of the application but after filling in my username and password it never seems to successfully authenticate(loginError.xhtml).

The only difference between my application and the above example is that my form specifies

  action="j_security_check" 

whereas the GitHib example uses

onsubmit="document.loginForm.action = 'j_security_check';"

In my web.xml I specify

 <security-role>
    <role-name>ADMIN</role-name>
</security-role>

Which matches what I specified for my user in my role table..What am I still missing?

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
  • Did you check what was actually rendered in the client when using your action? You might be surprised, also check http://www.jsftoolbox.com/documentation/help/12-TagReference/html/h_form.html to see what attributes are supported on the `h:form` (hence the reason they do it like they do in the github example) – Kukeltje May 25 '16 at 09:03
  • No I didn't check the client to see how the form rendered.I will do so and post a follow-up after – Duran Wesley Harris May 25 '16 at 10:25
  • I found this output during server startup: "The realm name of the defined security realm 'secureDomain' does not match the realm name within the properties file 'ManagementRealm'". – Duran Wesley Harris May 25 '16 at 18:37
  • I see other people using a slightly different realm name in jboss-web.xml. In the tutorial the jboss-web.xml looked like this: secureDomain whereas other people seem to be using : java:jaas/secureDomain – Duran Wesley Harris May 26 '16 at 05:59

0 Answers0