Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370240 - Read and write access policy to system properties are required by the server
Summary: Read and write access policy to system properties are required by the server
Status: CLOSED WONTFIX
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 8.1.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 7.5.x   Edit
Assignee: Joakim Erdfelt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 11:23 EST by Jens Lindman CLA
Modified: 2012-07-26 13:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Lindman CLA 2012-01-31 11:23:37 EST
When running the Jetty server with a security manager it is now (wasn't so in 7.2) required to grant access for both read and write to all system properties in the policy file:

permission java.util.PropertyPermission "*", "read, write";

This is due to a call to System.getProperties() has been introduced in Log.java (in org.eclipse.jetty.util.log). This is unfortunate since this call not only requires read access to all system properties but also write access, making it impossible to set grant policies for system properties.

The preferred way should be to call System.getProperty(String) for known properties instead.
Comment 1 Joakim Erdfelt CLA 2012-07-26 13:24:20 EDT
Default operation cannot know the full list of properties that is required at runtime to avoid this.