Questions tagged [java-security-manager]
69 questions
2
votes
1 answer
SecurityManager deprecation and reflection with suppressAccessChecks
I'm an university lecturer and I'm revising my lecture on Java reflection.
Other years when teaching about the horrors of suppressAccessChecks I was showing
that you could set up a SecurityManager and do something like
if…

Marco Servetto
- 684
- 1
- 5
- 14
2
votes
2 answers
Getting this error - public key protected PKCS12 not supported
I'm trying to use java.security.Keystore in scala application
Below is how my code looks like -
val ks: KeyStore = KeyStore.getInstance("PKCS12")
val keyManagerFactory: KeyManagerFactory = KeyManagerFactory.getInstance("SunX509")
val…

Amey Lokhande
- 402
- 5
- 11
2
votes
1 answer
Why it is necessary to grant All Permission for java security manager in OSGi Security
I want to enable Java Security Manager in my server. But, by doing that, as stated in the question [1], it grants all permission to the OSGI bundles.
When trying to enable Security for OSGi bundles, it is mentioned that to grant all permission from…

menaka_
- 1,092
- 1
- 13
- 23
2
votes
0 answers
Permission to allow JavaFX 8 windows to display always on top?
I have the Java Security Manager enabled on my application along with a custom security policy configured in the project directory. I am trying to display a JavaFX window always on top, however with the Security Manager enabled, I am unable to do…

Brandon
- 409
- 4
- 8
- 18
2
votes
0 answers
Spring fat jar boot throws class not found exception after installing security manager
I tried to use "java -jar " commandto boot the spring packaged fat jar after I installed my own security manager. It is just merely delegate all functions to its parent class. Then I can't start my application in command line, and it gives me the…

Landy Li
- 21
- 2
2
votes
0 answers
java SecurityManager denies explicitly allowed permissions on some systems
I am running an application with Drools in a WildFly 10.1.0-Final Application Server. As the code executed by Drools is untrusted, I decided to build a custom sandbox to allow for secure execution.
Since no external modules may be added to the…

Stefan Helmerichs
- 502
- 6
- 19
2
votes
1 answer
JVM Security Manager File permissions - custom policy
I've found a somehow unexpected behaviour using JVM Security Manager custom policies.
repo: https://github.com/pedrorijo91/jvm-sec-manager
in branch master, go into the /code folder:
custom policy file grants File read permission for file…

pedrorijo91
- 7,635
- 9
- 44
- 82
2
votes
0 answers
Configuring WebLogic and Java Security Manager
I'm trying to configure the Java Security Manager to protect WebLogic Resources, but when I start the WL, I get an error:

AbrakadabrA
- 21
- 2
1
vote
0 answers
How to doPrivileged in kotlin coroutines?
In Java I can raise privileges by calling java.security.AccessController.doPrivileged().
How can I raise privileges in kotlin coroutines?
Example: When I call the program
import java.security.AccessControlContext
import…

splint
- 11
- 2
1
vote
1 answer
create AmazonHttpClient in a protected environment which does not allow getEnv calls
Switching from version 1.11.700 to 1.11.908 of AWS SDK one of our libraries is now unable to work in a protected environment. More specifically the new SDK version has changed ClientConfiguration so that it now instantiates a RetryPolicy by checking…

Simone Avogadro
- 789
- 8
- 23
1
vote
2 answers
Access denied ("javax.net.ssl.SSLPermission" "setDefaultSSLContext")
I am using below code to trust all certificates and the code is running in a containerized environment, I am getting exception as Access denied ("javax.net.ssl.SSLPermission" "setDefaultSSLContext") and same code which is running on normal tomcat…

ajay kumar
- 11
- 2
1
vote
1 answer
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Tomcat]]" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
I get an error when starting my spring-boot application. The exception occurs in combination with the `java secuirity manager´.
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Tomcat]]" java.lang.NoClassDefFoundError:…

pbrandstetter
- 21
- 2
1
vote
1 answer
In openjdk, security policies are not taking effect
In redhat-openjdk:1.8.0, jvm java.policy and custom.policy file's java.version is being effective on the activeprocess
I've configured the java process to use java security manager and it uses Apache server to run the process. So Apache client look…

anvesh mora
- 23
- 5
1
vote
1 answer
How can I configure, disable, or override the sbt SecurityManager?
I'm trying to embed Apache Derby into an application. When I run it directly from IntelliJ, everything works fine, but sbt run generates the exception:
Caused by: java.security.AccessControlException: access denied…

Ben McKenneby
- 481
- 4
- 15
1
vote
1 answer
Prevent Java Application from performing malicious activities
I need to download and run a Jar file. Is there a way to know what it can/will do? I mean what permissions it has? Specifically I need to know if it will try to access my files and if it will try to use my internet. When I download an android…

Science Guy
- 13
- 5