how to set the location of the identity database

Marianne Mueller (mrm@eng.sun.com)
Tue, 15 Apr 1997 17:11:43 -0700

Date: Tue, 15 Apr 1997 17:11:43 -0700
Message-Id: <199704160011.RAA18135@puffin.eng.sun.com>
From: Marianne Mueller <mrm@eng.sun.com>
To: ZAHMED@us.oracle.com
Subject: how to set the location of the identity database

Since this is a FAQ, I thought I would cc: the java-security alias.
The java-security Q&A is archived at

http://jeeves.javasoft.com/hypermail/java-security-archive/index.html

> Question about identity database. If we don't specify a location for the
> identity DB, where does the JDK run-time, by default, maintain the
> identitydb.obj file? It seems that only when the property is set in
> java.security file does the file get created, and that too at the specified
> location. Is it true that by default the file does not exist unless we set it
> in the security propery file?

By default, each JVM gets an identity database which is stored in
${HOME}/identitydb.obj.

For example, on my unix system, this ends up in
/home/moi/identitydb.obj.

On my win95 system, this ends up in c:\users\mrm since that folder is
setup as my "home."

You can override this by setting the property

identity.database=/my/favorite/secured/directory/mydatabasefile

in the lib/security/java.security file.

Note that you don't need to name it identitydb.obj but you could if
you like.

Once the JVM is initialized with that system property, javakey will
store identities, keys and certs there. This is one way for a group
of people to use the same identity database. They just need to make
sure either they use the same JVM, or, each of them uses a JVM that
has the same identity.database property setting.

Marianne