JAAS question...

J

Joel Beach

Hi everyone,

I am developing a Swing application at the moment and am a little confused
about JAAS. Mainly the authentication part of the equation. I want to use
a simple provider (as a prototype) which authenticates against something like
an XML file, with usernames and MD5-hashed passwords.

It seems that I need a Configuration telling JAAS how to authenticate and
so on, allowing me to plug in different ways to authenticate later without a
recompile.

My question is: How do you protect the text file containing the Configuration
from the user in Windows? Couldn't they simply edit it to point to some RDMBS
where they've setup some bogus user accounts?

Also, I realise that a user could also generate their own MD5 hash and edit
the XML file I'm authenticating against. For the prototype, I don't really
care about this, but I was wondering how people generally deal with users
editing files like this manually?

Thanks,

Joel
 
M

Michiel Konstapel

Joel Beach said:
Hi everyone,

I am developing a Swing application at the moment and am a little confused
about JAAS. Mainly the authentication part of the equation. I want to use
a simple provider (as a prototype) which authenticates against something like
an XML file, with usernames and MD5-hashed passwords.

It seems that I need a Configuration telling JAAS how to authenticate and
so on, allowing me to plug in different ways to authenticate later without a
recompile.

My question is: How do you protect the text file containing the Configuration
from the user in Windows? Couldn't they simply edit it to point to some RDMBS
where they've setup some bogus user accounts?

Also, I realise that a user could also generate their own MD5 hash and edit
the XML file I'm authenticating against. For the prototype, I don't really
care about this, but I was wondering how people generally deal with users
editing files like this manually?

I think the general idea is that you have your user/pass values stored
securely on some server you control (or at least, the user doesn't).
Then you can have a JAAS client module on one end, communicating to a
server module on the other end, which does the actual database lookup.
Of course, the user can be assumed to have modified the client side
program, so your crucial business logic should also be run on the
server. If you let the client (application, applet, web app) talk
directly to the database, or execute privileged code, you must assume
this can be compromised.
Michiel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top