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
1
vote
2 answers
Swing app with security manager causing strange GUI-refresh issues
I have a Swing app (residing in an executable, signed jar) that is a client. The app also connects to a server. When certain conditions are met, I perform a refresh of the GUI (more specifically, delete all nodes of a JTree and then repopulate it).…

Vivin Paliath
- 94,126
- 40
- 223
- 295
1
vote
0 answers
Specify multiple different policy files when invoking execution of an application in Java
In the documentation and this it says it is also possible to specify an additional or a different policy file when invoking execution of an application. This can be done via the "-Djava.security.policy" command line argument, which sets the value of…

prime
- 14,464
- 14
- 99
- 131
1
vote
1 answer
java 9 b132 eclipse neon setsecuritymanager cannot be resolved
Using java 1.9 (b132), Eclipse Neon (4.6.0), I am working through a large legacy java client front end project in preparation for java 9. Most of the code works, but this problem I cannot resolve. I have added the following to the…

AlanH
- 11
- 2
1
vote
1 answer
Java set security permission of created instances
So I have a bit of code, that creates an instance of a class.
Class> c = Class.forName("MyClass");
Constructor> cons = c.getConstructor();
cons.setAccessible(true);
Object instance = cons.newInstance();
Now I want to set some restrictions to…

N10
- 429
- 2
- 4
- 17
1
vote
2 answers
Java Security Manager for JRuby
When using Java Security Manager for Jruby scripts, Is it possible give a particular script alone full permissions?

user314362
- 1,205
- 2
- 11
- 12
1
vote
2 answers
How to set a SecurityManager for this thread and not for System?
I have a program that is running a basic RMISecurityManager in all its threads. But I would like to do more control to several threads and set another SecurityManager specially for these threads.
How can I do that ? ...if this is possible !?
thank…

Creasixtine
- 740
- 3
- 11
- 33
1
vote
2 answers
How to automatically copy data to new RMI threads?
I am adapting a little rmi client-server application. I have written several things :
HelloInterface -> A Hello World interface for RMI
Server -> The server app'
Client -> The client app'
Nothing special, but... I have put my hands in a new…

Creasixtine
- 740
- 3
- 11
- 33
1
vote
0 answers
How can I perform a package specific security check
I would like to invoke my SecurityManager checkPackageAccess for a named package.
Here is my code:
System.setProperty("java.security.policy", "file:/C:/Temp/java.policy");
System.setSecurityManager(new MySecurityManager() {
@Override
…

orion_kid
- 405
- 1
- 7
- 20
1
vote
0 answers
Turn on Security Manager cause ClassNotFoundException
This demo, I want to understand AccessController.doPrivileged() better.In jetty-xml module, the main() methods has the following code:
AccessController.doPrivileged(new PrivilegedAction

ykgarfield
- 33
- 5
1
vote
1 answer
console log not goes to tomcat.log(catalina start -security > tomcat.log)
Im using security manager in my tomcat.
I need all the consol logs to be written in the tomcat.log file.
Fo this im using this cmd
catalina start -security > tomcat.log
But the log not goes to tomcat.log rather it is again writing in console…

Hariprasath
- 828
- 4
- 15
- 41
1
vote
2 answers
java.security.AccessControlException:access denied("java.io.FilePermission" "File path" "write" )
I'm using tomcat security manager for my application. In my application, i have placed my running tomcat in
path: usr/local/tomcat-7/webapps/myapplication
And when i run my application i will logged all the actions in logger. That logger file is…

Hariprasath
- 828
- 4
- 15
- 41
1
vote
0 answers
Can a JRE be configured to require SecurityManager settings?
I'd like to set up a unix user with a highly restricted set of permissions for any java code they might try to execute. (This is a layer of security in addition to unix file permissions and iptables.)
I can set up the system-wide java policy file at…

Ken Koster
- 408
- 3
- 9
1
vote
0 answers
Securing Java application with trusted and untrusted code
Suppose I want to ship a Java application that supports plugins. For security reasons, I want the first party code (i.e. my code) to run basically unrestricted, but I want to limit the operations that the plugins would be able to perform. What's…

Max
- 4,882
- 2
- 29
- 43
1
vote
1 answer
Exception: access denied ("java.net.SocketPermission" "localhost:80" "listen,resolve")
Using Eclipse Kepler (Windows 7) for a project which opens a ServerSocket on localhost, port 80.
I use a security manager with a policy file located at:
C:\Users\John\Developpement\workspace\security\my.policy
In Eclipse, for the project launch…

mins
- 6,478
- 12
- 56
- 75
1
vote
3 answers
Small and fast .NET programs? - 65% runtime in ResolvePolicy
I tried to build a very very small .NET app in F#.
It just has to convert a small string into another string and print the result to the console like:
convert.exe myString ==> prints something like "myConvertedString"
I used dottrace to analyze the…

forki23
- 2,784
- 1
- 28
- 42