If the user has explicitly disabled CSRF protection in a custom
SecurityFilterChain, we should be able to back off and not try
to disable it just for the gRPC endpoints (accidentally switching
it back on for the other endpoints).
Fixes gh-142
This extracts the Spring Boot managed dependencies from
the spring-grpc-dependencies BOM module into a new
module (`spring-grpc-build-dependencies`) that includes
the dependencies from the BOM as well as the Spring
Boot managed dependencies.
Resolves#118
Signed-off-by: Chris Bono <chris.bono@gmail.com>
The recent move to do config props generation only at docs
generation time left the docs.yml broken as it requires the
config props generator class to be compiled prior to running.
This updates the './build-docs.sh' to include the package command
as well as update the docs.yml to use the same script.
Signed-off-by: Chris Bono <chris.bono@gmail.com>
Adds a GHA workflow to check Spring Boot compatability of the framework.
The workflow exercises the samples and dynamically sets the version of
each samples Spring Boot plugin.
We do the dynamic version setting using the power of Gradle init scripts
and the fact that each of the samples is exposed as a Gradle module.
Doing this has a positive side effect that our samples are kept up to date
for both Maven and Gradle.
Reworks the Gradle aspect of the samples as follows:
- removes settings.xml in each sample in favor of root samples/setting.xml
- removes Gradle wrapper from each sample in favor of root samples/gradlew
- cleans up build.gradle (they were missing dependencies to work)
- adds README-GRADLE.md at samples/
Signed-off-by: Chris Bono <chris.bono@gmail.com>
In an app with servlets *and* a native gRPC server for instance,
the global AuthenticationManagerBuilder (the @Bean) should be
treated as a parent for the one used by GrpcSecurity. It's the
same in HttpSecurity. Slightly more complicated than necessary
when there is only native gRPC security, but at least it now
works, and makes it easier to introduce multiple GrpcSecurity
instances in future if necessary (like with HttpSecurity it
could be a prototype).
This adds a coarse-grained conditional guard that will disable the
server autoconfiguration if `spring.grpc.server.enabled` is set to
false or `BindableService` class is not available on the classpath.
Signed-off-by: Chris Bono <chris.bono@gmail.com>
This adds a coarse-grained conditional guard that will disable the
client autoconfiguration if `spring.grpc.client.enabled` is set to
false or the `io.grpc:grpc-stub` module is not on the classpath.
Signed-off-by: Chris Bono <chris.bono@gmail.com>
This adds a new starter module (`spring-grpc-server-spring-boot-starter`)
for gRPC Netty server and updates the current coarse-grained starter
(`spring-grpc-spring-boot-starter`) to include the newly added server
and client starter modules.
Signed-off-by: Chris Bono <chris.bono@gmail.com>