Skip to content

Commit

Permalink
Merge branch 'main' into otel-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoard committed Oct 31, 2024
2 parents df2fef9 + 16ae69e commit 2d96f10
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/schedule-build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Scheduled Build (every hour)
name: Scheduled Build (hourly)
on:
schedule:
- cron: "0 * * * *"
Expand Down
26 changes: 17 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,24 +256,32 @@ httpServer:

---

### Java agent use of a custom com.sun.net.httpserver.Authenticator class
It is possible to provide a custom Authenticator implementation for the Java agent.
## Pluggable Authenticator (Optional)

It is possible to use a custom Authenticator (`com.sun.net.httpserver.Authenticator`) implementation for the Java agent.

The custom class needs to be on the jvm classpath.
The class name to load is provided through `authentication/customAuthenticator` configuration as follows:

The class name to load is provided through `authentication/plugin` configuration as follows:

```yaml
httpServer:
authentication:
customAuthenticator:
authenticatorClass: my.custom.AuthenticatorWithNoArgConstructor
plugin:
class: my.custom.AuthenticatorWithNoArgConstructor
```
If the custom authenticatorClass needs to provide an authenticated Subject visible to the application, it can set a named attribute on the HttpExchange with that subject. The agent will arrange that subsequent calls occur in a Subject.doAs().

If the custom authenticatorClass needs to provide an authenticated Subject visible to the application, it can set a named attribute on the HttpExchange with that subject.

The agent will arrange that subsequent calls occur in a Subject.doAs().

The name of the attributed must be provided through `subjectAttributeName` configuration as follows:

```yaml
httpServer:
authentication:
customAuthenticator:
authenticatorClass: my.custom.AuthenticatorWithNoArgConstructorThatSetsASubjectAttribute
plugin:
class: my.custom.AuthenticatorWithNoArgConstructorThatSetsASubjectAttribute
subjectAttributeName: "custom.subject.for.doAs");
```

Expand Down Expand Up @@ -359,7 +367,7 @@ httpServer:

## Integration Test Suite

The JMX exporter project uses [Verifyica](https://github.com/verifyica-team/verifyica) and [Testcontainers](https://www.testcontainers.org/) to run integration tests with different Java versions.
The JMX exporter uses [Verifyica](https://github.com/verifyica-team/verifyica) and [Testcontainers](https://www.testcontainers.org/) to run integration tests with different Java versions.

You need to have Docker installed to run the integration test suite.

Expand Down
35 changes: 16 additions & 19 deletions integration_test_suite/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Integration Test Suite
Integration Test Suite
---

### Smoke test Java Docker images tested

Expand Down Expand Up @@ -42,46 +43,42 @@ Pulling Docker images (not required, but you may see request timeouts/pull failu
Smoke test Docker images

```shell
./integration_test_suite/pull-smoke-test-java-docker-images.sh
./integration_test_suite/pull-smoke-test-docker-images.sh
```

All Docker images

```shell
./integration_test_suite/pull-java-docker-images.sh
./integration_test_suite/pull-docker-images.sh
```

## Notes

- You may need to set up Docker hub login to pull images

# Docker networks
---

By default, Docker is not configured to run a large number images simultaneously.
### Docker Configuration changes

You can increase Docker networks by creating a Docker network configuration file...
When running the integration test suite, Docker may need to be configured to support network addresses.

```
On Linux:

```shell
/etc/docker/daemon.json
```

... with the content...

```yaml
{
"default-address-pools": [
"default-address-pools" : [
{
"base": "172.16.0.0/16",
"size": 24
"base" : "172.16.0.0/16",
"size" : 24
},
{
"base": "192.168.0.0/16",
"size": 24
"base" : "192.168.0.0/16",
"size" : 24
}
]
}
```

## Notes

- Docker will need to be restarted
```

0 comments on commit 2d96f10

Please sign in to comment.