Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

looking for a simple configuration file (JAAS)

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • 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: 43016
76
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Space pants. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic