changeset 53:0160569a17c4

add a blog entry about JAAS
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 23 Dec 2014 09:01:11 +0100
parents 94cc5f43d9d1
children 6c1752a66dd0
files content/Java/jaas-pam.md
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/content/Java/jaas-pam.md	Tue Dec 23 09:01:11 2014 +0100
@@ -0,0 +1,12 @@
+Title: JAAS login module using PAM
+Date: 2014-12-23
+Tags: JDK
+Lang: en
+
+I recently had a look into [JAAS](http://docs.oracle.com/javase/7/docs/technotes/guides/security/jaas/JAASRefGuide.html) for a customer project. The API is not 100% straightforward due to its design goal of hiding implementation specifics but I guess that's the price you have to pay when specifying a generic API.
+
+The JAAS guide talks about JAAS's similarity to [PAM](https://en.wikipedia.org/wiki/Pluggable_authentication_module). This lead me to think that there should be a default implementation of a bridge between JAAS and PAM out there. Well there is [the jaas-pam project on Sourceforge](http://jaas-pam.sourceforge.net/) but the project's code hasn't been updated in years and on top of that the project uses [JNI](http://docs.oracle.com/javase/7/docs/technotes/guides/jni/index.html).
+
+Then I stumbled over [Leonid Dubinsky's blog](http://blog.dub.podval.org/2011/02/java-and-pam.html) which suggests using [libpam4j](https://github.com/kohsuke/libpam4j) to implement a LoginModule for PAM. Now that sounds like some interesting project to get my feet wet with JAAS! 
+
+It only took me an hour or so to come up with a LoginModule implementation using libpam4j. I put the code up [on github](https://github.com/dirk-olmes/jaas-pam) in case I need it later.