• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

looking for a simple configuration file (JAAS)

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Quick JAAS question:

I'm trying to execute a simple code with JAAS. I get this error message:


Exception in thread "main" java.lang.SecurityException: Unable to locate a login configuration

the exception comes from:



I wonder what 'login configuration file' is needed, where should I place it and if anyone has any example

Thank you!
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have a direct answer, but this article includes example code showing how to set up and use a login config file. Maybe that's helpful?
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter,
Maybe http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas.html?page=3 link can give you a bird-eye view of the configuration file required in JAAS.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter,
I'm working on the same thing. Here's what I have:

-Djava.security.auth.login.config="C:/absolutePathTo/workspace/ADTest/data/jaas.conf

passed as a VM argument.

Contents of jaas.conf:


fwiw, I'm not up and running, but I'm almost positive this is all good info. I think my problem is specific to Active Directory. I had the tutorial running fine till I started trying to authenticate against AD. Best of luck.
 
I've been selected to go to the moon! All thanks to this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic