Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jaas authentification-get Password  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was wandering how can I get the credentials like, password from a jaas authentification. I am using FORM authentification.

Thanks!
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have never done this.

Higher versions of Tomcat supports JAAS as one of the authenticate realms.
In that case they might be storing the password as credential in the subject.
Not sure on this.What might be the reason to look for password after the authentication has passed.
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The point of container-managed authentication is that it's container-managed; it provides no access to the details, beyond the Principal (which includes the username but not the password).

If you really need to do this, and are up for a bit of hacking and a Tomcat-only solution, then this article (written by -ahem- myself) tells you how to get access to the Realm, and how to alter it to get at the password.

What is the purpose of accessing the password?
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!