• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Jaas via Wildfly  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello community,

I want to use a JAAS-Authentication in a JAVA application via Wildfly (8.2.0).

I have tried serveral methods and configurations....but I still get errors at the login (LoginContext)



I have started to configure the standalone.xml (wildfly):


--- created a new security realm „TPRealm“ with the Jaas-authentication:



--- set the realm as default?:


--- at Last, I have created a security domain „TPLogin“ with the login module:




In Java:


at "new LoginContext(...)", I get following error
javax.security.auth.login.LoginException: No LoginModules configured for TPRealm


Moreoften i read, that a config-file is needed (jaas.config):


I added this file to the System.Properties.



With this, I can compile "new LoginContext(...)" but compiling failes at the next line at loginContext.login():

javax.security.auth.login.LoginException: unable to find LoginModule class: org.jboss.security.auth.spi.TPLogin

I also watched the log of wildfly expecting anything to be logged while running the code, but nothing was logged.


In the Java Application i have added also these properties:




Do i need to set further properties?
Should i take notice on something else?


I would be really pleased, if anyone could help me
 
Sheriff
Posts: 21743
102
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Please KeepItDown next time. I removed all those unnecessary size tags because frankly, I found them annoying.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!