Commit Graph

184 Commits

Author SHA1 Message Date
Dave Syer
aa8d680c3f Add GrpcSecurity 2025-01-28 08:57:56 +00:00
Бацура Сергей Александрович
aa809aaf8a Fixed typo in GrpcClientProperties
Signed-off-by: Sergei Batsura <batsura.sa@gmail.com>
2025-01-27 10:17:45 -06:00
Dave Syer
3ac7569d5c Add authorizeRequests() example 2025-01-24 13:10:20 +00:00
Dave Syer
be643c3627 Disable CSRF for Servlet apps by default 2025-01-24 09:06:04 +00:00
Dave Syer
758ddba92e Harmonize dependency versions 2025-01-23 13:53:53 +00:00
Dave Syer
cdd6ce9a95 Catch exceptions in interceptors as well 2025-01-23 13:39:10 +00:00
Dave Syer
1a734c10cb Missing dependency from Gradle sample 2025-01-22 14:59:15 +00:00
Dave Syer
d43823c575 Wrists slapped 2025-01-22 07:59:59 +00:00
Dave Syer
8219e26c1e Make sample run OOTB with 2 ports 2025-01-22 07:55:44 +00:00
Dave Syer
c7b1ed3684 Make Tomcat sample work with grpcurl 2025-01-22 07:55:44 +00:00
Chris Bono
495d14b48d Fix getting-started.adoc steps
Updates the fix-getting-started.adoc section of the reference
guide to remove the requirement of the "web" and "graalvm"
dependencies as the former requires other information besides
dependencies to work properly and the latter is just complication
that is not needed for a simple quick start.

See #97
2025-01-21 06:18:45 +00:00
Dave Syer
8d863acc42 Add reactive test 2025-01-20 08:46:33 +00:00
Dave Syer
24b9e42a6f Add Gradle build for new sample 2025-01-17 14:31:30 +00:00
Dave Syer
4dd2158a90 Add reactive sample 2025-01-17 14:10:35 +00:00
Dave Syer
cfe1ca9a57 Add some convenience methods to GrpcServiceDiscoverer 2025-01-16 17:28:29 +00:00
Dave Syer
ec190ae74d Change indents 2025-01-16 09:34:35 +00:00
Dave Syer
4779cae338 Add note on local.grpc.port 2025-01-15 09:20:44 +00:00
Dave Syer
4efd23aa4e Revert to snapshots and add whats new 2025-01-15 09:07:25 +00:00
Dave Syer
406532e44e Bump to 0.3.0 for release 2025-01-15 08:46:48 +00:00
Dave Syer
40820b4a45 Add DCO config 2025-01-15 07:08:56 +00:00
Dave Syer
71355e6ff6 Allow StatusException to set its own headers 2025-01-13 10:35:28 +00:00
Chris Bono
87e26c378e Move named channel back into autoconfigure module
This commit moves the channel config ("NamedChannel") back to
autoconfigure module as the effort to move to core turns out to
be more trouble than it is worth at this time.

Fixes #92
2025-01-13 08:18:11 +00:00
Chris Bono
5ef993fe19 Add graceful shutdown of channels
This commit provides graceful shutdown of all channels
created by the channel factory.

Resolves #12

Co-authored-by: Andrey Litvitski <andrey1010102008@gmail.com>
2025-01-13 08:16:38 +00:00
Chris Bono
fc1de937a8 Polish "Update broken code examples in docs"
This continues the effort of the previous commit to update
broken code examples.
2025-01-12 12:14:51 -06:00
Dumildes Paulo
b861d9301b Update broken code example in docs
This commit updates a broken code example in the docs.
The breakage was introduced in commit b08e11a.
2025-01-12 12:08:04 -06:00
Dave Syer
1559843b43 Exception handler interceptor is ordered correctly
The exception handler interceptor has to be called first so that
it can handle exceptions thrown by other interceptors. Tests up
to now didn't assert that (they focused on exceptions thrown
in services).
2025-01-11 08:45:09 +00:00
Dave Syer
6dc5d85509 Wrist slapped 2025-01-08 09:53:45 +00:00
Dave Syer
4c4bcb4643 Add some docs on security configuration 2025-01-08 09:50:56 +00:00
Dave Syer
d9731500fa Use GrpcUtil to create shared executor 2025-01-07 16:39:19 +00:00
Dave Syer
6cc3a2ab89 Use GrpcServiceDiscoverer in GrpcServletRequestMatcher 2025-01-07 09:14:59 +00:00
Dave Syer
f1ed1ce93a Add BearerTokenAuthenticationInterceptor for client 2025-01-07 09:14:59 +00:00
Dave Syer
f3b0ac11e6 Add BasicAuthenticationInterceptor for client 2025-01-07 09:14:59 +00:00
Dave Syer
f1a8299887 Add support for request matchers 2025-01-07 09:14:59 +00:00
Dave Syer
abcf83e8cc Make Spring Security work in a Tomcat app 2025-01-07 09:14:59 +00:00
Chris Bono
c936d6a876 Move NamedChannel model to core module (#89)
This commit introduces the NamedChannelRegistry which allows
moving the NamedChannel model to the core package and decouples
it from the client properties.
2025-01-06 21:19:07 -06:00
Dave Syer
bca2eff2b0 Upgrade grpc-java to 1.69.0 2025-01-06 16:30:51 +00:00
Dave Syer
e0a744ba25 Add stack walker to discover main class 2025-01-06 15:15:23 +00:00
Andrey Litvitski
ddef9007af Disable in-process transport by default and add @AutoConfigureInProcessTransport annotation 2025-01-06 14:07:04 +00:00
Dave Syer
f8c6070eaa Upgrade Spring Boot to latest 2025-01-06 11:23:52 +00:00
Chris Bono
81990f0fd6 Use channel factory API w/o customizer in tests 2025-01-03 22:04:28 +00:00
Chris Bono
b08e11ad39 Improve channel factory API
This commit improves the GrpcChannelFactory createChannel API by
introducing `ChannelBuilderOptions` that can be specified during
channel creation.

Additionally, concrete Netty channel factory implementations have
been added as well as adding type to the GrpcChannelBuilderCustomizer
which helps match customizers to channel factories.
2025-01-03 22:04:28 +00:00
Dave Syer
b3271be918 Add explicit support for running on separate port
If the user wants a second port for gRPC that should be possible
(and was the only way with the old ecosystem projects). This change
adds a webflux sample and support for
spring.grpc.server.{servlet,reactive}.enabled to be explicitly
"false" to disable the embedded services.

N.B. embedded services are not yet supported in webflux so the flag
has no effect, except to disable gRPC completely if it is "true".
2024-12-23 15:02:45 +00:00
Dave Syer
133bfec5e5 Upgrade Spring Boot in sample 2024-12-23 11:30:09 +00:00
Dave Syer
0cf50bde36 Upgrade netty to same version as Boot 2024-12-23 11:05:38 +00:00
Dave Syer
e979a13ecf Add config for new protoc versions 2024-12-20 14:41:03 +00:00
Dave Syer
8b91ebd86a Tidy up README 2024-12-20 14:40:34 +00:00
Josh Long
780f8e61ea Add more detailed getting started to readme 2024-12-20 14:30:49 +00:00
Jonas Bjørge Andersen
4149ed552e Add autoconfiguration for client side observation interceptor
[resolves #51]

Signed-off-by: Jonas Bjørge Andersen <dev@jonasandersen.no>
2024-12-20 08:00:47 +00:00
Chris Bono
a21748aba2 Add autoconfiguration guard on GrpcServlet
This commit adds a guard on the Servlet gRPC server auto-configuration
to ensure that the `io.grpc:grpc-servlet-jakarta` lib is on the classpath.

Resolves #83

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-12-20 07:22:09 +00:00
Andrey Litvitski
8628aa1c8a Prevent duplicate entries in channels map
Prevents duplicate entries from being added to the named channels map
in client properties.  

Resolves #67
2024-12-19 10:33:25 -06:00