Add an interceptor to support AuthenticationManagerResolver#1034
Add an interceptor to support AuthenticationManagerResolver#1034mehrabisajad wants to merge 14 commits intogrpc-ecosystem:masterfrom
Conversation
...nfigure/src/main/java/net/devh/boot/grpc/server/security/interceptors/GrpcServerRequest.java
Outdated
Show resolved
Hide resolved
...nfigure/src/main/java/net/devh/boot/grpc/server/security/interceptors/GrpcServerRequest.java
Outdated
Show resolved
Hide resolved
...nfigure/src/main/java/net/devh/boot/grpc/server/security/interceptors/GrpcServerRequest.java
Outdated
Show resolved
Hide resolved
...h/boot/grpc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
...h/boot/grpc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
|
Nice suggestion, I'm currently quite busy so I might be slow to respond. |
ST-DDT
left a comment
There was a problem hiding this comment.
Please add a test that checks whether this works as expected.
...net/devh/boot/grpc/server/security/interceptors/AbstractAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
...net/devh/boot/grpc/server/security/interceptors/AbstractAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
.../net/devh/boot/grpc/server/security/interceptors/DefaultAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
.../net/devh/boot/grpc/server/security/interceptors/DefaultAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
...nfigure/src/main/java/net/devh/boot/grpc/server/security/interceptors/GrpcServerRequest.java
Outdated
Show resolved
Hide resolved
...h/boot/grpc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
...h/boot/grpc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
...h/boot/grpc/server/autoconfigure/GrpcServerSecurityWithManagerResolverAutoConfiguration.java
Show resolved
Hide resolved
...net/devh/boot/grpc/server/security/interceptors/AbstractAuthenticatingServerInterceptor.java
Show resolved
Hide resolved
...net/devh/boot/grpc/server/security/interceptors/AbstractAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
...h/boot/grpc/server/autoconfigure/GrpcServerSecurityWithManagerResolverAutoConfiguration.java
Show resolved
Hide resolved
...nfigure/src/main/java/net/devh/boot/grpc/server/security/interceptors/GrpcServerRequest.java
Outdated
Show resolved
Hide resolved
...ava/net/devh/boot/grpc/test/config/WithBasicAuthAndManagerResolverSecurityConfiguration.java
Outdated
Show resolved
Hide resolved
|
We moved some files. Could you please fix the merge conflicts? |
# Conflicts: # grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/security/interceptors/AbstractAuthenticatingServerInterceptor.java # grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/security/interceptors/GrpcServerRequest.java # grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
|
Great, I've fixed the merge conflicts that arose due to the file movements. I've carefully reviewed the changes and believe everything is now in sync. I've pushed the changes to the branch. Could you please take a look at the latest version and let me know if you have any further questions or require additional modifications? |
ST-DDT
left a comment
There was a problem hiding this comment.
Implementation wise looks good to me, but I have no time to check the security/config side effects.
...h/boot/grpc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
…pc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
...h/boot/grpc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
Show resolved
Hide resolved
…pc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
ST-DDT
left a comment
There was a problem hiding this comment.
I haven't tested this myself and I'm unsure about the change in condition regarding when the security config is enabled.
Other than that, it looks good to me.
...h/boot/grpc/server/security/interceptors/ManagerResolverAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
.../net/devh/boot/grpc/server/security/interceptors/DefaultAuthenticatingServerInterceptor.java
Outdated
Show resolved
Hide resolved
If on of the interceptors condition met, then it will be registered. On the other hand if both conditions met then the first one will be registered according to the priority. According to existing If you have any other situation to consider, please let me know. |
This proposal introduces the
AuthenticationManagerResolver<GrpcServerRequest>to Spring's gRPC authentication framework. This provides a flexible mechanism for implementing dynamic authentication based on your specific needs.The Problem:
The Solution: