Enabling user authentication

To enable user authentication, set the derby.connection.requireAuthentication property to true. Otherwise, Derby does not require a user name and password. You can set this property as a system-wide property or as a database-wide property.

For a multi-user product, you would typically set it for the system in the derby.properties file for your server, since it is in a trusted environment.

Note: If you start a Derby system with user authentication enabled but without defining at least one user, you will not be able to shut down the system gracefully. When Derby is running in a connectivity server and user authentication is turned on, stopping the server requires a user name and password. You will need to alter shutdown scripts accordingly.
Related concepts
Defining users
External directory service
Built-in Derby users
Programming applications for Derby user authentication
Related reference
List of user-authentication properties