Skip to content

Commit 71fd51e

Browse files
committed
release 4.7.1
1 parent 32d0ac5 commit 71fd51e

File tree

3 files changed

+37
-3
lines changed

3 files changed

+37
-3
lines changed

README.adoc

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,10 +707,29 @@ a|
707707

708708
=== Server side configuration
709709

710-
GRPC security configuration follows the same principals and APIs as Spring WEB security configuration.
710+
GRPC security configuration follows the same principals and APIs as Spring WEB security configuration, it's enabled by default if you have `org.springframework.security:spring-security-config` dependency in your classpath.
711+
712+
You can use `@Secured` annotation on services/methods to protect your endpoints, or by using API and overriding defaults (which precesses `@Secured` annotation ):
713+
714+
[source,java]
715+
----
716+
@Configuration
717+
class MySecurityCfg extends GrpcSecurityConfigurerAdapter {
718+
@Override
719+
public void configure(GrpcSecurity builder) throws Exception {
720+
MethodsDescriptor<?,?> adminMethods = MyServiceGrpc.getSomeMethod();
721+
builder
722+
.authorizeRequests()
723+
.methods(adminMethods).hasAnyRole("admin")
724+
.anyMethodExcluding(adminMethods).hasAnyRole("user")
725+
.withSecuredAnnotation();<1>
726+
}
727+
}
728+
----
729+
<1> or combine `API` with `@Secured` annotations.
711730

712731
==== Default
713-
GRPC security is enabled by default if you have `org.springframework.security:spring-security-config` dependency in your classpath.
732+
714733

715734
This default configuration secures GRPC methods/services annotated with `org.springframework.security.access.annotation.@Secured` annotation. +
716735
Leaving value of the annotation empty (`@Secured({})`) means : `authenticate` only, no authorization will be performed.

ReleaseNotes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
| Starter Version | gRPC versions | Spring Boot version
22
|-------------------------|:-------------:|:-------------------:|
3+
| [4.7.1](#version-471) | 1.47.0 | 2.6.8 |
34
| [4.7.0](#version-470) | 1.45.1 | 2.6.6 |
45
| [4.6.0](#version-460) | 1.43.2 | 2.6.2 |
56
| [4.5.10](#version-4510) | 1.42.0 | 2.5.6 |
@@ -31,6 +32,20 @@
3132
| [4.0.0](#version-400) | 1.32.1 | 2.3.3.RELEASE |
3233
| [3.5.7](#version-357) | 1.31.1 | 1.5.13.RELEASE |
3334

35+
# Version 4.7.1
36+
## :star: New Features
37+
38+
- Security API enhancements [#296](https://github.com/LogNet/grpc-spring-boot-starter/issues/296)
39+
40+
## :lady_beetle: Bug Fixes
41+
42+
- Class ConsulDiscoveryProperties is not found when accessing /configprops [#295](https://github.com/LogNet/grpc-spring-boot-starter/issues/295)
43+
44+
## :hammer: Dependency Upgrades
45+
46+
- Support spring boot 2.6.8 [#298](https://github.com/LogNet/grpc-spring-boot-starter/issues/298)
47+
- Upgrade grpc to 1.47.0 [#297](https://github.com/LogNet/grpc-spring-boot-starter/issues/297)
48+
3449
# Version 4.7.0
3550
## :hammer: Dependency Upgrades
3651

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gradleErrorPronePluginVersion=2.0.2
55
errorProneVersion=2.7.1
66
lombokVersion=1.18.20
77

8-
version=4.7.1-SNAPSHOT
8+
version=4.7.1
99
group=io.github.lognet
1010
description=Spring Boot starter for Google RPC.
1111
gitHubUrl=https\://github.com/LogNet/grpc-spring-boot-starter

0 commit comments

Comments
 (0)