Patent attributes
A solution is proposed for populating a policy file in a Java environment automatically. For this purpose, there is provided a wrapper for a security manager in charge of controlling any access to protected resources. A generic Java application is run in a test environment. Whenever a specific operation must be executed on a secured resource, the Java application submits a corresponding permission request to the wrapper. The wrapper forwards the permission request to the security manager, which verifies whether the required permission is available in the policy file. The wrapper logs any denied permission. In any case, the wrapper always grants the required permission to the Java application, so that its operation can continue without any problem. At the end of the running of the Java application, the logged missing permissions are added to the policy file.