FirebirdSQL and JDBCLoginModule example

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

FirebirdSQL and JDBCLoginModule example

Anthony Cook-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all,

Does anybody have a working configuration using FirebirdSQL as a JAAS
authentication source in Jetty?  Though I believe I have everything
configured correctly, I keep getting a LoginException ("all modules
ignored").  Any help is appreciated.  Please include all relevant
information: web-app Realm config, login.conf, etc.  Thank-you.

Regards,

Tony Cook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFClkY78KND+nha8AoRAn++AJ9uy77/7HJa7kQ/0smjKVE0JgTkqgCeOUt9
CV8gNWWXEYSPHm+QKiqLlrY=
=yW0k
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: FirebirdSQL and JDBCLoginModule example

Anthony Cook-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all,

I figured this out.  It took writing a new login module with some
gratuitious exception tracing to do it.  For the curious, since I
already knew my JNDI datasource was working I just modified Mortbay's
JDBCLoginModule to use a datasource, instead of a JDBC driver, and
configured it with my working datasource. :-p

Anyway, the problem was not in any part of the Jetty or JAAS
configurations (whew!), but in that the supplied JDBCLoginModule class
passes the queried authentication credentials /as is/ back up the chain.
~ IOW, my authentication table in FirebirdSQL uses a 32 character long
/CHAR/ column (ultimately, for MD5 password hashes, though this is not
being used in testing).  When JDBCLoginModule reads this column, it
passes /all 32 characters, including white-space padding/, back to the
UserRealm for checking against the user input!

The fix, of course, is to trim() the white-space when reading in this
information in loadUser().

Regards,

Tony Cook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCl4Hc8KND+nha8AoRArcmAJ9sTkfmUu5L/GBIO0i0XCEkJNRwXQCfaAO0
b1iTrHwyXvRsG21um8n2wQM=
=J0T7
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support