Using a Java security policy file

You can bring up the Network Server with a security manager and a customized policy file.

The following command line starts the Network Server with the policy file created in Sample customized Java security policy file. It tells the server to authenticate users with the NATIVE credentials stored in the testdb database created in Configuring NATIVE authentication.

java -Djava.security.manager \
-Djava.security.policy=/Users/me/myServer.policy \
-Dderby.authentication.provider=NATIVE:testdb \
org.apache.derby.drda.NetworkServerControl start -p 8246

If you start the Network Server without specifying a security manager, the Network Server will install a default Java security manager that enforces a Basic policy.

To shut down the Network Server, use the following command:

java org.apache.derby.drda.NetworkServerControl shutdown \
-p 8246 -user tquist -password tquist

You will need to shut down the server before using the examples in Putting it all together.

Related concepts
Running embedded Derby with a security manager
Related tasks
Running the Network Server with a security manager
Running the Network Server without a security manager
Related reference
Basic security policy template
Sample customized Java security policy file