Filtering Agent

Runs on a JVM to prevent some class code to be executed.

License

License

GroupId

GroupId

com.github.rmannibucau
ArtifactId

ArtifactId

filtering-agent
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Filtering Agent
Runs on a JVM to prevent some class code to be executed.
Project URL

Project URL

https://github.com/rmannibucau/filtering-agent
Source Code Management

Source Code Management

https://github.com/rmannibucau/filtering-agent

Download filtering-agent

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.rmannibucau/filtering-agent/ -->
<dependency>
    <groupId>com.github.rmannibucau</groupId>
    <artifactId>filtering-agent</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.rmannibucau/filtering-agent/
implementation 'com.github.rmannibucau:filtering-agent:1.0.1'
// https://jarcasting.com/artifacts/com.github.rmannibucau/filtering-agent/
implementation ("com.github.rmannibucau:filtering-agent:1.0.1")
'com.github.rmannibucau:filtering-agent:jar:1.0.1'
<dependency org="com.github.rmannibucau" name="filtering-agent" rev="1.0.1">
  <artifact name="filtering-agent" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.rmannibucau', module='filtering-agent', version='1.0.1')
)
libraryDependencies += "com.github.rmannibucau" % "filtering-agent" % "1.0.1"
[com.github.rmannibucau/filtering-agent "1.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.ow2.asm : asm jar 7.1

Project Modules

There are no modules declared in this project.

Filtering Agent

Prevent some classes to be loaded through a javaagent. It avoids to set a security manager on the JVM when not possible or desired - because it will impact more than just the classloading or because custom classloaders don’t use the security manager.

Configuration

Configuration is passed to the runtime using key1=value1|key2=value2 syntax. Supported keys are:

Key Description

include

set of rules which will trigger a class to not be instantiable.

exclude

set of rules which will trigger a class to be instantiable.

order

allows to determine if include wins over exclude or not, values can respectively be include-exclude or exclude-include.

A rule is a value with a potential prefix. If no prefix is set the rule if of type prefix. The supported prefixes are:

Prefix Description

prefix

This will test the value with a startsWith logic.

regex

This will test the value with a java Pattern logic.

Example:

-javaagent:/tmp/filtering-agent-${version}-shaded.jar=include=org.company

Versions

Version
1.0.1
1.0.0