grpc-spring-boot-starter icon indicating copy to clipboard operation
grpc-spring-boot-starter copied to clipboard

Updating spring-boot to 3.2.0 breaks with "An AuthenticationManager is required"

Open benallard opened this issue 1 year ago • 9 comments

I'm using the spring-boot-starter-oauth2-resource-server, and I thought that should be enough to setup the security processing.

Spring-boot 3.2.0 has spring-security 6.2

EDIT: The AbstractSecurityInterceptor is actually deprecated:

Use org.springframework.security.web.access.intercept.AuthorizationFilter instead for filter security, org.springframework.security.messaging.access.intercept.AuthorizationChannelInterceptor for messaging security, or org.springframework.security.authorization.method.AuthorizationManagerBeforeMethodInterceptor and org.springframework.security.authorization.method.AuthorizationManagerAfterMethodInterceptor for method security.

benallard avatar Nov 24 '23 09:11 benallard

I am currently updating to Spring boot 3.2.0. And faced the exact same issue. Our standart rest api security ended up breaking grpc, we don't do grpc security. Did you find a way to fix this issue?

alicanhaman avatar Dec 14 '23 13:12 alicanhaman

Disabled grpc security in properties which did the trick.

grpc:
  security:
    auth:
      enabled: false

alicanhaman avatar Dec 14 '23 13:12 alicanhaman

Right, @alicanhaman, this is the way till 3.2.0 is supported.

jvmlet avatar Dec 14 '23 15:12 jvmlet

So grpc security doesn't work with 3.2.0 at all? When will 3.2.0 be supported? Is there a workaround in the mean time?

mwong38 avatar Jan 05 '24 08:01 mwong38

@jvmlet is there any plan to support Spring 3.2.0? what's the blocker here in terms of security? Anyway I can help?

sheinbergon avatar Feb 19 '24 17:02 sheinbergon

Hi, yes, planned. Basically, they removed the filter that drives authentication , I asked spring security team to resurrect this class, but no 😒 What needs to be done is to copy-paste the base class of grpc security interceptor (the essential part of it)

jvmlet avatar Feb 19 '24 22:02 jvmlet

@jvmlet will you accept PRs?

sheinbergon avatar Feb 20 '24 09:02 sheinbergon

@sheinbergon, sure, בשמחה FYI https://github.com/spring-projects/spring-security/issues/13444

jvmlet avatar Feb 20 '24 12:02 jvmlet

https://grpc-ecosystem.github.io/grpc-spring/ started supporting spring boot 3.2.0

debraj-spotnana avatar Apr 09 '24 19:04 debraj-spotnana

I just bumped to 3.3 (security 6.3), and it seems to work, so I will close that ticket.

benallard avatar Jun 04 '24 06:06 benallard