Skip to content

Add opt-in BlockHound startup allowances - #765

Open
Mityushin wants to merge 1 commit into
pgjdbc:mainfrom
Mityushin:gh-764
Open

Mityushin wants to merge 1 commit into
pgjdbc:mainfrom
Mityushin:gh-764

Conversation

@Mityushin

Copy link
Copy Markdown

Make sure that:

Issue description

Resolves #764.

BlockHound reports NativePRNG file reads on the Netty event loop during TLS context and SCRAM client construction. This change adds an opt-in integration that allows blocking calls within those two driver methods. The TLS customizer runs outside the allowance.

New Public APIs

io.r2dbc.postgresql.util.PostgresqlBlockHoundIntegration can be registered explicitly with BlockHound.builder().loadIntegrations().with(new PostgresqlBlockHoundIntegration()).install(). BlockHound is an optional Maven dependency.

Additional context

The allowances affect BlockHound reporting. Provider I/O can still occur on the event loop. TLS verification, SCRAM behavior, and JVM security settings are unchanged.

Unit tests verify that the integration registers exactly the two startup allowances and that service discovery does not load it automatically.

Validation: ./mvnw clean verify passed. 1,301 tests reported, with 0 failures, 0 errors, and 11 skipped.

Scope allowances to TLS context and SCRAM client construction.
Keep TLS customizers outside the allowance and require explicit
registration. Add tests for the allowed methods and opt-in behavior.

[resolves pgjdbc#764]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opt-in BlockHound allowances for TLS and SCRAM startup

1 participant