Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Set weight for WebClientTracing provider greater than that for WebClientSecurity provider #8274

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

tjquinno
Copy link
Member

Description

Likely/possibly resolves #8192

Assign an explicit weight to WebClientTracingProvider that is greater than the weight for WebClientSecurityProvider (which is the default). This makes sure that Helidon invokes WebClientTracing#handle before WebClientSecurity#handle. The latter depends on the request context containing span information which is set by WebClientTracing#handle.

With no explicit weight set, the order of execution is indeterminate and could create the kind of failure noted in the issue.

(I tried creating a simple test but, because without explicit weighting the order is indeterminate, the test passed even without the fix because the order just happened to be the order that works: tracing, then security. So the PR contains no test.)

Documentation

bug fix; no doc impact

@tjquinno tjquinno self-assigned this Jan 19, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…entSecurity provider; security needs to have the span context set before it runs

Signed-off-by: Tim Quinn <[email protected]>
@tjquinno tjquinno force-pushed the 4.x-webclient-tracing-security branch from 885ff0d to 217f578 Compare January 22, 2024 20:11
@tjquinno tjquinno merged commit 1b8873a into helidon-io:main Jan 22, 2024
12 checks passed
@tjquinno tjquinno deleted the 4.x-webclient-tracing-security branch January 22, 2024 21:08
hrstoyanov pushed a commit to hrstoyanov/helidon that referenced this pull request Feb 23, 2024
…r `WebClientSecurity` provider (helidon-io#8274)

* Set weight for WebClientTracing provider greater than that for WebClientSecurity provider; security needs to have the span context set before it runs

Signed-off-by: Tim Quinn <[email protected]>

* Add test for service provider weights

---------

Signed-off-by: Tim Quinn <[email protected]>
tvallin pushed a commit to tvallin/helidon that referenced this pull request Feb 28, 2024
…r `WebClientSecurity` provider (helidon-io#8274)

* Set weight for WebClientTracing provider greater than that for WebClientSecurity provider; security needs to have the span context set before it runs

Signed-off-by: Tim Quinn <[email protected]>

* Add test for service provider weights

---------

Signed-off-by: Tim Quinn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x WebClientSecurity throws NPE trying to use current span in security context as parent for new span
3 participants