A security manager is an object that defines a security policy for an application. This policy specifies actions that are unsafe or sensitive. Any actions not allowed by the security policy cause a SecurityException to be thrown. An application can also query its security manager to discover which actions are allowed.
Questions tagged [securitymanager]
218 questions
0
votes
0 answers
AccessControlException for newly created File
I'm having trouble understanding/ignorant to an error I'm facing regarding the security manager and a file created solely by the running application so wondering if people can provide some insight. This started happening after I started using the…

user3842274
- 21
- 6
0
votes
1 answer
Hybris, ant clean all command failes with message Error occurred during initialization of VM
I'm getting this error while trying to build my Hybris project via ant clean all && ./hybrisserver.sh debug:
Error occurred during initialization of VM
java.lang.Error: Could not create SecurityManager
at…

Riccardo
- 33
- 8
0
votes
0 answers
How to run Tomcat 9 as a Windows service with a security manager
I'm installing Tomcat9 as a Windows service using the service.bat.
In order to use the security manager I understand that I need to use the
"-security" option but where do I configure it (before starting the installation)?
I saw that the service…

Meron
- 453
- 2
- 6
- 15
0
votes
1 answer
Surefire marks tests as failed when they set SecurityManager
I have some tests that need to check if the main code did a System.exit(...). This works very nicely with suggestions from https://stackoverflow.com/a/309427/1023341. But when running these tests in Jenkins (in stead of in my IDE Eclipse) and later…

gkephorus
- 1,232
- 18
- 31
0
votes
1 answer
ClassCircularityError inside custom SecurityManager
I am writing a SecurityManager and getting ClassCircularityError exceptions while running a unit test. Examining the stacktrace shows it is complaining about some class that is referenced inside my SM.checkPermission method. To guarantee all classes…

mP.
- 18,002
- 10
- 71
- 105
0
votes
0 answers
Restricting certain public APIs/classes to users in java
I have a application where users can write their customizations using the exposed public APIs.
There are few public classes and API that are public but we don't want them to be accessible in the customization code for the users.
Is there any way in…

user1300073
- 11
- 2
0
votes
1 answer
How to checkMemberAccess(SomeClass.class, Member.DECLARED) in Java 11
given the following Java8 code, how can this be implemented in Java11 ?
The checkMemberAccess() method has been replaced with the new checkPermission() method.
Java 8 code:
SecurityManager securityManager =…

P4uL
- 1
0
votes
1 answer
Tomcat security manager asking for permissions for spring boot application
I have a spring boot application that I want to deploy to external tomcat server. The tomcat has Tomcat Security Manager enabled, so when I place the war file in /webapps/ folder of tomcat and start the server, the tomcat asks for permissions as…

Syed Iftekharuddin
- 166
- 4
- 21
0
votes
2 answers
Unable to deploy spring boot application on external tomcat
I am trying to deploy spring boot application to external tomcat, I am getting the following exception in the catalina.log file as shown below.
The war file name is : com#myApp.war.
I wanted to set the context-path of the application to com/myApp in…

Syed Iftekharuddin
- 166
- 4
- 21
0
votes
0 answers
Security Manager in Tomcat
I have a Tomcat Java application, and I want it to be secure, so I created a custom SecurityManager where I blocked all actions I thought was dangerous (I probably missed some, but that's for another question). It worked well for a while, but then…

Erel Segal-Halevi
- 33,955
- 36
- 114
- 183
0
votes
1 answer
Why the RMI code is throwing AccessControlException?
I have a java Class in which RMI code is written as :
public class Test{
public static void main(String[] args){
System.setProperty("java.security.policy","file:/C:/myFloder/server.policy");
if (System.getSecurityManager() == null) {
…

Neeraj N
- 53
- 5
0
votes
0 answers
How to run Apache Sling with an enabled SecurityManager?
Did anybody run Apache Sling with an enabled Java SecurityManager? That'd need a special java.policy file to allow the actions done by all deployed bundles, and it'd be extremely helpful to have a basic version that already allows what's needed by…

Dr. Hans-Peter Störr
- 25,298
- 30
- 102
- 139
0
votes
0 answers
Java SecurityManager only block reflection invoke and set
I want my SecurityManager to only block invoke for method and set for field reflection. getDeclaredMethods or similar should stay allowed. Is this possible? I want to block change of the security field of the private java.lang.System class, but…

Aura Lee
- 416
- 3
- 11
0
votes
1 answer
Tomcat9 slow response with security manager in OpenJdk11
We added -Djava.security.manager parameter in java options of tomcat9 to enable security manager . Tomcat is running without any issue but when I try to perform some operation then it takes 9-10 min to process that(login, logout of deployed…

rahul sharma
- 33
- 1
- 7
0
votes
0 answers
SecurityManager is not allowing read file although stated in the policy
This is my error:
java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Temp\SettingsApp.policy" "read")
This is my policy (dynamically made for each app)
grant signedBy "SmartMirror" {
permission…

Jaquarh
- 6,493
- 7
- 34
- 86