Configuring security for Derby

Derby can be deployed in a number of ways and in a number of different environments, ranging from a single-user deployment for small-scale development and testing to a multi-user deployment of a large database. For all but the smallest deployments, however, it is essential to make the Derby system secure.

To secure a Derby database or databases, take the following steps.

  1. Understand the concept of identity in Derby.

    See Identity in Derby for details.

  2. Understand the basic tasks involved in configuring security in a client-server environment or an embedded environment.

    See Basic security configuration tasks for details.

  3. Configure authentication by setting up users and passwords.

    Authentication determines whether someone is a legal user. It establishes a user's identity. Derby verifies user names and passwords before permitting access to the Derby system.

    For more information about authentication, see Working with user authentication.

  4. Configure user authorization for the system.

    Authorization determines what operations can be performed by a user's Derby identity. Authorization grants users or roles permission to read a database or to write to a database.

    For more information about authorization, see User authorizations.

  5. Encrypt your databases.

    Derby provides ways to encrypt data stored on disk.

    For more information about encryption, see Encrypting databases on disk.

  6. Sign any jar files that you use in your databases.

    Derby validates certificates for classes loaded from signed jar files.

    For more information about using signed jar files, see Signed jar files.

  7. Encrypt network traffic with SSL/TLS.

    SSL/TLS certificate authentication is also supported. See "Network encryption and authentication with SSL/TLS" in the Derby Server and Administration Guide for details.

  8. Customize the default security policy.

    For details, see Running Derby under a security manager, and see "Running the Network Server under the security manager" in the Derby Server and Administration Guide.

  9. If necessary, restrict database file access to the operating system account that started the JVM.

    For details, see "Controlling database file access" in the Derby Server and Administration Guide.

The section "Derby Network Server advanced topics" in the Derby Server and Administration Guide has more information on security issues. The Derby Reference Manual describes many security-related properties and system procedures, as well as such statements as GRANT, REVOKE, CREATE ROLE, DROP ROLE, CREATE PROCEDURE, and CREATE FUNCTION.