The general process to getting the security manager working with an existing application is:
* start application server with security manager enabled
* access application while monitoring logs
* when a failure occurs; update the policy file based on data in the log, clear logs and start this process over again
The app server logging is pretty good; it almost always contains 'denied' in the message and many times the remainder of the content can be cut/pasted nearly as is into the policy file. There are times that debugging isn't easy; as when there are problems with components which start up early and/or eat exceptions instead of logging.
I would not bother trying to debug the security manager polices by setting
-Djava.security.debug=allthat just generates way too much useless data. I think that
-Djava.security.debug=policy,accessis a better setting which gives a good amount of data to help in resolving failures and understanding what the application is accessing.
No comments:
Post a Comment