views:

324

answers:

3

I'm currently trying to create a policy file for the Nexus repository manager running on Tomcat.

Nexus tries to read the file WEB-INF/plexus.properties (for which I already granted permission), and seems to try to read all properties from there, which fails because it is missing the following permission:

java.security.PropertyPermission * read,write

How do I configure the SecurityManager to allow reading all properties from this specific file? If I add this to the policy-file:

permission java.security.PropertyPermision "*", "read,write"

I'll grant the permission to read and alter all Properties, even System properties, won't I?

+1  A: 
  1. There is no java.security.PropertyPermission, you probably meant java.util.PropertyPermission
  2. As far as I understand the java.util.PropertyPermission has nothing to do with reading properties from user-defined .property-files. It is only checked for system properties (i.e. System.getProperty() and System.setProperty().

Which errors do you get that make you think you need anything but the read-file permission?

Joachim Sauer
There is no class but the String "java.security.PropertyPermission" is used in the SecurityManager.
Aaron Digulla
@Aaron: that's what I thought first, but I don't find any documentation mentioning "java.security.PropertyPermission". Can you point me at such documentation? Preferably by Sun itself.
Joachim Sauer
A: 

Instead of "*", specify the name of the properties files.

Aaron Digulla
A: 

sorry, It's java.util.PropertyPermission, not java.security.PropertyPermission

This is not an answer : you should edit your question.
Silence