Commit Graph

14 Commits

Author SHA1 Message Date
Lauri Tulmin 03dffb1e88
Run tests with jdk24 and 25-ea (#13824) 2025-05-09 08:24:34 -07:00
Lauri Tulmin 0915ae70f6
Fix failing javadoc (#13155) 2025-02-01 07:28:53 -08:00
SylvainJuge ca3c685c3c
indy instrumentation - leftovers migration (#13074) 2025-01-31 07:47:07 -08:00
SylvainJuge 93bca0654d
make rmi instrumentation indy-compatible + add module opener (#12585)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2025-01-16 08:48:37 -08:00
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
Mateusz Rzeszutek b668e73e13
Convert all logging statements from slf4j to jul (#5674)
* Convert all logging statements from slf4j to jul

* code review comments

* fix tests

* Fix randomly failing test
2022-03-25 10:02:51 -07:00
Lauri Tulmin c461d22d83
Define helper classes in loadClass (#5528)
* Define helper classes in loadClass similarly to regular classes

* fix test

* spotless

* address review comments
2022-03-09 09:12:25 -08:00
Anuraag Agrawal ec375116be
Fix more lint warnings (#5174)
* Fix more lint warnings

* Redisable lint

* Drift

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-01-20 12:48:46 +09:00
Lauri Tulmin c76345a973
Always set parent of agent class loader to bootstrap class loader (#5169)
* Always set parent of agent class loader to bootstrap class loader

* remove parent class loader argument
2022-01-18 19:36:28 -08:00
Anuraag Agrawal b7a95857c7
Fix some java lint warnings (#5120)
* Convert InstrumentationTestRunner from interface to abstract class

* Foo

* Commit

* Revert unintended
2022-01-17 10:26:03 -08:00
Lauri Tulmin b3d9ae8268
Fix sun.misc.Unsafe generation on jdk17 (#4558)
* Fix sun.misc.Unsafe generation on jdk17

* remove jmxremote argument for now

* spotless

* remove unneeded annotation
2021-11-02 16:05:51 +02:00
Lauri Tulmin c109773f17
Test modular jdk (#4501)
* Test modular jdk

* review comment
2021-10-28 10:54:00 -07:00
Lauri Tulmin 17a85bbc22
Use byte-buddy-dep instead of byte-buddy (#4400)
* Use byte-buddy-dep instead of byte-buddy

* print stacktrace on examples failure

* try to fix gradle plugins

* try to fix extension build

* try to fix extension build

* try to fix extension build

* try to fix extension build

* try removing mavenLocal

* add mavenLocal plugin repository

* publish gradle-plugins to mavenLocal for examples ci build

* Fix bytebuddy exclusion
2021-10-19 13:46:48 -07:00
Lauri Tulmin 0f3d0cb05b
Generate our own sun.misc.Unsafe if it is not available (#4124)
* Generate our own sun.misc.Unsafe if it is not available

* skip generating invokeCleaner method

* grpc isn't shaded so setting system property doesn't affect only our bundled copy

* generate invokeCleaner when it is present in internal unsafe
2021-09-22 20:18:20 -07:00