opentelemetry-java-instrume.../javaagent-tooling/javaagent-tooling-java9
Lauri Tulmin 2f0819ae20
Improve compatibility with SecurityManager (#7983)
This pr gives classes defined in agent and extension class loaders all
permissions. Injected helper classes are also defined with all
permissions. Agent startup is altered so that we won't call methods that
require permission before we are able to get those permissions.
This pr does not attempt to address issues where agent code could allow
user code to circumvent security manager e.g.
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/javaagent-bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/InstrumentationHolder.java
gives access to `Instrumentation` that could be used to redefine classes
and remove security checks. Also this pr does not address failed
permission checks that could arise from user code calling agent code.
When user code, that does not have privileges, calls agent code, that
has the privileges, and agent code performs a sensitive operation then
permission check would fail because it is performed for all calling
classes, including the user classes. To fix this agent code should uses
`AccessController.doPrivileged` which basically means that, hey I have
done all the checks, run this call with my privileges and ignore the
privileges of my callers.
2023-04-05 15:41:37 +03:00
..
src Improve compatibility with SecurityManager (#7983) 2023-04-05 15:41:37 +03:00
build.gradle.kts Convert all logging statements from slf4j to jul (#5674) 2022-03-25 10:02:51 -07:00