-
Notifications
You must be signed in to change notification settings - Fork 160
feat: lock gprc enpoints thought grpc bridge #12949
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
base: main
Are you sure you want to change the base?
Changes from all commits
bb601fb
18cd5cf
e1fa440
b8af25a
655a8cf
d07e08a
dca1f00
5704f40
991c05c
d2631c5
1202aaf
592a691
6b8635b
6d16449
05dbdc9
a37444f
25c337f
ab85976
a54f4ad
1493885
449bb18
0b58a29
46af6fc
b3f7cde
732d759
23fda12
eabd271
5c6e17f
69cb3c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,4 +17,6 @@ | |
| */ | ||
| String[] scopes() default {}; | ||
|
|
||
| String grpcMethodName() default ""; | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| /* | ||
| * Janssen Project software is available under the Apache License (2004). See http://www.apache.org/licenses/ for full text. | ||
| * | ||
| * Copyright (c) 2025, Janssen Project | ||
| */ | ||
|
|
||
| package io.jans.service.security.protect; | ||
|
|
||
| import jakarta.ws.rs.container.ResourceInfo; | ||
| import jakarta.ws.rs.core.Response; | ||
|
|
||
| public interface BaseAuthorizationProtection { | ||
| Response processAuthorization(String bearerToken, ResourceInfo resourceInfo); | ||
yurem marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -56,6 +56,8 @@ def __init__(self): | |||||||||||||||||
|
|
||||||||||||||||||
| def install(self): | ||||||||||||||||||
| self.make_pairwise_calculation_salt() | ||||||||||||||||||
| if Config.install_jans_lock: | ||||||||||||||||||
| self.jetty_app_configuration[self.service_name]['jetty']['modules'] += ',http2c' | ||||||||||||||||||
| self.install_jettyService(self.jetty_app_configuration[self.service_name], True) | ||||||||||||||||||
|
Comment on lines
+59
to
61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Potential duplicate module addition on repeated calls. The string concatenation Consider guarding against duplicate additions: Proposed fix self.make_pairwise_calculation_salt()
if Config.install_jans_lock:
- self.jetty_app_configuration[self.service_name]['jetty']['modules'] += ',http2c'
+ modules = self.jetty_app_configuration[self.service_name]['jetty']['modules']
+ if 'http2c' not in modules.split(','):
+ self.jetty_app_configuration[self.service_name]['jetty']['modules'] = modules + ',http2c'
self.install_jettyService(self.jetty_app_configuration[self.service_name], True)📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.14.13)61-61: Boolean positional value in function call (FBT003) 🤖 Prompt for AI Agents |
||||||||||||||||||
| self.set_class_path([os.path.join(self.custom_lib_dir, '*')]) | ||||||||||||||||||
| self.external_libs() | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
resteasy-grpc-bom 1.0.0.Final compatibility RESTEasy 6.2.12💡 Result:
Short answer: Yes — resteasy-grpc-bom 1.0.0.Final is compatible with RESTEasy 6.2.12.Final.
Why: the resteasy-grpc-bom:1.0.0.Final BOM manages jakarta.ws.rs 3.1.x and other Jakarta 3 / RESTEasy 6-era artifacts and explicitly includes dev.resteasy.grpc:grpc-bridge:1.0.0.Final, so it is intended to be used with RESTEasy 6.x (RESTEasy 6.2.12.Final is a 6.x release). See the BOM managed deps and the RESTEasy 6.2.12.Final release announcement. [1][2][3]
Sources:
🏁 Script executed:
Repository: JanssenProject/jans
Length of output: 81
🏁 Script executed:
Repository: JanssenProject/jans
Length of output: 4514
🏁 Script executed:
Repository: JanssenProject/jans
Length of output: 770
🌐 Web query:
grpc-bom 1.78.0 grpc-bridge 1.0.0.Final compatibility💡 Result:
Short answer: there’s no published incompatibility between io.grpc:grpc-bom:1.78.0 and the resteasy-grpc "grpc-bridge" 1.0.0.Final series, but resteasy-grpc does not declare or guarantee a specific grpc-java BOM version in its public docs — so you should test your build/runtime combination. Sources: grpc-bom artifact page and the resteasy-grpc project docs. [1][2]
What I recommend
Sources
If you want, I can: (a) check the grpc-bridge 1.0.0.Final POM for its io.grpc dependency versions, or (b) run a quick sample Maven/Gradle dependency resolution to show exactly which versions would be selected. Which would you prefer?
🌐 Web query:
grpc-bridge 1.0.0.Final POM managed dependencies grpc-java version💡 Result:
The RESTEasy gRPC BOM (which includes grpc-bridge 1.0.0.Final) manages io.grpc's protoc-gen-grpc-java at version 1.73.0. [1]
Source: resteasy-grpc-bom (dev.resteasy.grpc:resteasy-grpc-bom:1.0.0.Final) managed-dependencies. [1]
🏁 Script executed:
Repository: JanssenProject/jans
Length of output: 345
Verify and test gRPC 1.78.0 with resteasy-grpc-bom 1.0.0.Final.
While resteasy-grpc-bom 1.0.0.Final is compatible with RESTEasy 6.2.12.Final, note that resteasy-grpc-bom manages
protoc-gen-grpc-javaat version 1.73.0, whereas the BOM uses gRPC 1.78.0 (which includes protoc-gen-grpc-java 1.78.0). Although gRPC maintains backward compatibility across patch/minor versions, this version mismatch should be validated via build and runtime testing to rule out classpath conflicts.🤖 Prompt for AI Agents