File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Security and the fly likes looking for a simple configuration file (JAAS) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "looking for a simple configuration file (JAAS)" Watch "looking for a simple configuration file (JAAS)" New topic

looking for a simple configuration file (JAAS)

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
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!
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
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?
K Aditi
Ranch Hand

Joined: Mar 17, 2008
Posts: 89
Hi Peter,
Maybe link can give you a bird-eye view of the configuration file required in JAAS.

Chase Simms

Joined: Mar 21, 2008
Posts: 13
Hi Peter,
I'm working on the same thing. Here's what I have:"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 agree. Here's the link:
subject: looking for a simple configuration file (JAAS)
It's not a secret anymore!