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
AccessControl.doPrivileged Problems
I'm having a problem with extensions, privileges, permissions, and the SecurityManager in Java. I'm using a SecurityManager because I'm using RMI, but that doesn't really come into this. If I can just get to the point where I'm dealing with RMI…

JDeveloper
- 91
- 2
- 11
0
votes
1 answer
Is there a way to use multiple SecurityManager(s) in Java?
I'd like to know if there is a way to use multiple security managers in java, and if so, how to specify them a particular .policy file?
I've been looking at the java se 6 doc about Security, but couldn't find any answer there...
Thanks everyone for…

Yoann Chambonnet
- 1,313
- 16
- 22
0
votes
0 answers
Is it possible to start the OrientDb server without using reflection?
I'm running OrientDb 2.2.6 in embedded mode. I have to grant security permissions to my code so the SecurityManager allows it to run. One permission I would particularly prefer not to grant is ("java.lang.reflect.ReflectPermission"…

Erik
- 503
- 1
- 7
- 26
0
votes
1 answer
Tomcat AccessControlException despite using AllPermission
I'm attempting to deploy a WAR to Tomcat and running into problems with the Java Security Manager. This is Tomcat 7.0.55 running Java 1.8.0, and Tomcat is started with parameters like…

jpappe
- 365
- 4
- 12
0
votes
1 answer
bluetooth app not working iphone
I have created an app that allows people to play a game of checkers over bluetooth from on iOS device to another. Each user takes turns being the peripheral and the central.
I have everything working ok except if a player ponders too long (over 20…

user4826471
- 51
- 4
0
votes
1 answer
Alternative to policy files when granting permissions?
Is it possible to grant Permissions through something other than a policy file? What I'd like to achieve is a permissions-based system that can be modified at runtime.

James P.
- 19,313
- 27
- 97
- 155
0
votes
1 answer
RMISecurityManager - load client.policy
I want to load SecurityManager policy from file client.policy.
I read that I could do it specifying -Djava.security.policy=client.policy.
But I don't want to specify this in command line.
I try to specify it in properties file.
Actually my code…

Wojciech Kałuski
- 192
- 3
- 10
0
votes
3 answers
Call class, wait for it to exit, call again
I'm working on a program where I want to loop through several config files, and with each file, call a class with that filename as an argument and wait for it to finish. Currently I am doing:
for (int i = 1; i <= 3; i++){
String[] a =…

Andrew Latham
- 5,982
- 14
- 47
- 87
0
votes
2 answers
Nashorn NullPointerException with SecurityManager
I am creating a sandbox program with the nashorn js interpreter, and using a minimalist security manager to restrict what it can do.
The problem is when I call engine.eval(reader) I get a null pointer exception.
I know the reader works because I was…

Thomas
- 871
- 2
- 8
- 21
0
votes
1 answer
Jaas tomcat "no security manager"
I am trying to write a loginmodule for jaas authentication/authorization. I thought I would try an example first. I am running tomcat 7 with the following example
http://www.byteslounge.com/tutorials/jaas-authentication-in-tomcat-example
I get the…

Marrrrio
- 1
0
votes
1 answer
Java : Is there an API to find which class needs the permission in a Custom security manager class?
I'm trying to find which class has requested the permission dynamically in a custom security manager. I was not able to find any API which helps me to get the codebase location of the invoking class. Below is what I'm trying to do,
I have a testApp…
0
votes
3 answers
How can I determine what class called System.exit() from the checkExit() method of a custom SecurityManager?
I am writing a SecurityManager that should only allow System.exit() calls from a single class. The problem is that this class is also the one containing the main() method which is running the app, so using SecurityManager.inClass() won't work -…

DuckPuppy
- 1,336
- 1
- 12
- 21
0
votes
1 answer
How to define a java security policy file in WAS?
I am developing an enterprise application using RMI, and I get an error while trying to (re)bind the object :
Naming.rebind(url, this);
// The object "this" is a subclass of UnicastRemoteObject
Before this instruction I create a new…

horfee
- 19
- 4
0
votes
1 answer
Grant permission to a particular directory to avoid java.security.AccessControlException
I am trying to read a text file after I have set the security manager with a policy file which is-
grant
{
permission java.io.FilePermission "/home/esamsar/NetBeansProjects/FilePermissionDemo/src/cheese.txt", "write";
};
It is working fine but…

Sameer Sarmah
- 1,052
- 4
- 15
- 33
0
votes
1 answer
Access denied in JAAS authorisation
I am designing a JAAS authentication and authorisation application.In the authentication part,the username and password entered by the user is matched against the values retrieved from the database.There are three principals for each…

Sameer Sarmah
- 1,052
- 4
- 15
- 33