-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Describe the bug
When running Password4j in restricted Java environments (such as those with a strict SecurityManager or limited file access permissions), the library may throw exceptions during static initialization or while attempting to load the psw4j.properties configuration file. This makes the library unusable in such environments.
To Reproduce
Configure a JVM with a restrictive SecurityManager or limited file system permissions.
Initialize Password4j (e.g., call a hashing function).
Observe that exceptions are thrown during initialization or config loading.
Expected behavior
Gracefully handle permission restrictions (e.g., skip config file loading), or
Fail safely with clear error messages, without crashing the application.
Environment:
OS: Any (e.g., Linux, Windows with restricted permissions)
JDK: OracleJDK / OpenJDK (e.g., 11, 12, 17)
Password4j Version: e.g., 1.2.0
Additional context
This issue is relevant for enterprise or sandboxed environments where applications run with strict security policies. Enhancing exception handling would improve Password4j’s stability, portability, and adoption in restricted environments.