3

I am investigating java security manager. I see that 'grant' is required attribute for *.policy file and it is global. But how it will behave in case if I add 'grant codeBase' for the same resoure. For example:

    grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/log4j-1.2.17.jar!/-" {
    permission java.io.FilePermission "${catalina.base}/logs/-", "delete";
};

grant {
    permission java.io.FilePermission "${catalina.base}/logs/-", "write";
};
  1. Will log4j-1.2.17.jar has a permission to delete files in the log folder?
  2. Can 'grant codeBase' override 'grant' section?

Thank you!

Alex85
  • 135
  • 1
  • 3
  • 10

0 Answers0