Derby provides several ways to define the repository of users and passwords. To specify which of these services to use with your Derby system, set the property derby.authentication.provider to the appropriate value as discussed here.
Setting the property as a system-wide property creates system-wide users. Setting the property as a database-wide property creates users for a single database only.