M
Martin Gregorie
I need to implement login security for a database system and would
appreciate some suggestions.
The database will be hosted on a Linux system, but the graphical query
and maintenance applications may be run anywhere - Linux, OS-X or
Windows. The applications access the database directly: there is no
middle tier server.
The database doesn't need to be particularly secure. Its intended to
operate over an office LAN: access over the Internet is extremely
unlikely. The intention is simply to keep visitors and unauthorized
staff members from querying or altering it.
I thought of simply using the database user name and password but this
seems pretty insecure: these tend to become common knowledge. Ideally
I'd use something like the standard *NIX login:
- user is prompted for name and password.
- password is encrypted.
- the name and encrypted password are used as keys to query a database
table.
- the query returns a row count (0 = login fails, 1 = login OK)
Name/password maintenance would be handled by a simple application used
by the admin to create/cancel users and the reset lost passwords to a
default. The user would set and change their own password and would be
forced to change the default on first login
I'd appreciate comments about the security of this scheme, but what I
really need to know is what standard or 3rd party classes are available
to implement it. I've looked through the standard classes and Roedy's
site but all I've found is the JPassportField, which is exactly what I
need for the GUI.
I'm currently still on Java 1.4. Some searching hints that the Crypt
class may be part of Java SE 5. Did I read this right? If so, it looks
like I'd best upgrade to Java 6 ASAP.
BTW, I want to avoid solutions involving pam because that could limit
portability.
appreciate some suggestions.
The database will be hosted on a Linux system, but the graphical query
and maintenance applications may be run anywhere - Linux, OS-X or
Windows. The applications access the database directly: there is no
middle tier server.
The database doesn't need to be particularly secure. Its intended to
operate over an office LAN: access over the Internet is extremely
unlikely. The intention is simply to keep visitors and unauthorized
staff members from querying or altering it.
I thought of simply using the database user name and password but this
seems pretty insecure: these tend to become common knowledge. Ideally
I'd use something like the standard *NIX login:
- user is prompted for name and password.
- password is encrypted.
- the name and encrypted password are used as keys to query a database
table.
- the query returns a row count (0 = login fails, 1 = login OK)
Name/password maintenance would be handled by a simple application used
by the admin to create/cancel users and the reset lost passwords to a
default. The user would set and change their own password and would be
forced to change the default on first login
I'd appreciate comments about the security of this scheme, but what I
really need to know is what standard or 3rd party classes are available
to implement it. I've looked through the standard classes and Roedy's
site but all I've found is the JPassportField, which is exactly what I
need for the GUI.
I'm currently still on Java 1.4. Some searching hints that the Crypt
class may be part of Java SE 5. Did I read this right? If so, it looks
like I'd best upgrade to Java 6 ASAP.
BTW, I want to avoid solutions involving pam because that could limit
portability.