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

[data-plane]: TokenVerifier: execute blocking calls in parallel (ordered = false) #3673

Closed
creydr opened this issue Feb 6, 2024 · 5 comments · Fixed by #3728
Closed

[data-plane]: TokenVerifier: execute blocking calls in parallel (ordered = false) #3673

creydr opened this issue Feb 6, 2024 · 5 comments · Fixed by #3728
Assignees
Labels
area/data-plane good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/good-first-issue Denotes an issue ready for a new contributor. triage/accepted Issues which should be fixed (post-triage)

Comments

@creydr
Copy link
Contributor

creydr commented Feb 6, 2024

Currently we don't disable the ordering of the blocking call in

return this.vertx.<JwtClaims>executeBlocking(promise -> {
// execute blocking, as jose .process() is blocking
JwtConsumer jwtConsumer = new JwtConsumerBuilder()
.setVerificationKeyResolver(this.oidcDiscoveryConfig.getJwksVerificationKeyResolver())
.setExpectedAudience(expectedAudience)
.setExpectedIssuer(this.oidcDiscoveryConfig.getIssuer())
.build();
try {
JwtContext jwtContext = jwtConsumer.process(token);
promise.complete(jwtContext.getJwtClaims());
} catch (InvalidJwtException e) {
promise.fail(e);
}
});
.
This leads to non-parallel/serial calls and thus reduced throughput.

...
ordered – if true then if executeBlocking is called several times on the same context, the executions for that context will be executed serially, not in parallel. if false then they will be no ordering guarantees

Therefor we should check if we can use vertx.executeBlocking(handler, ordered) with ordered = false.

Additional Information:

@creydr creydr moved this to 🔖 Ready in Eventing Sender Identity Feb 6, 2024
@creydr creydr changed the title TokenVerifier: execute blocking calls in parallel (ordered = false) [data-plane]: TokenVerifier: execute blocking calls in parallel (ordered = false) Feb 6, 2024
@pierDipi
Copy link
Member

pierDipi commented Feb 6, 2024

@creydr do you think this could be a good first issue ?

@pierDipi
Copy link
Member

pierDipi commented Feb 6, 2024

/triage accepted

@knative-prow knative-prow bot added the triage/accepted Issues which should be fixed (post-triage) label Feb 6, 2024
@creydr
Copy link
Contributor Author

creydr commented Feb 6, 2024

@creydr do you think this could be a good first issue ?

I think so. I added some more information in the description.

/kind good-first-issue

@knative-prow knative-prow bot added the kind/good-first-issue Denotes an issue ready for a new contributor. label Feb 6, 2024
@creydr creydr added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Feb 6, 2024
@parth721
Copy link
Contributor

Hi @creydr I would love to work on this good first issue.

@parth721
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/data-plane good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/good-first-issue Denotes an issue ready for a new contributor. triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants