Skip to content

Add DelegatingGrpcAuthenticationExtractor - #425

Merged
dsyer merged 1 commit into
spring-projects:mainfrom
Adrastopoulos:gh-420
Aug 21, 2026
Merged

Add DelegatingGrpcAuthenticationExtractor#425
dsyer merged 1 commit into
spring-projects:mainfrom
Adrastopoulos:gh-420

Conversation

@Adrastopoulos

@Adrastopoulos Adrastopoulos commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Extracts the first-non-null composition out of the private GrpcSecurity.CompositeAuthenticationExtractor into a public DelegatingGrpcAuthenticationExtractor, mirroring DelegatingAuthenticationConverter.

Fixes #420

Spring Security exposes first-non-null converter composition as public
API on both stacks, but the gRPC equivalent was a private inner class
of GrpcSecurity. An application could only compose extractors through
the builder, so it could not wrap a composition, pass one to another
component, or test one without a full GrpcSecurity.

Extract the composition into a public final class that mirrors
DelegatingAuthenticationConverter, with list and varargs constructors
that reject an empty argument. GrpcSecurity behaves as before: it
sorts the extractors before it composes them, and a configuration with
no extractor still leaves the call unauthenticated.

Fixes spring-projectsgh-420

Signed-off-by: Gabriel Hall <gabriel.hall@cox.net>
@dsyer
dsyer merged commit 143f6c7 into spring-projects:main Aug 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose the composite GrpcAuthenticationExtractor as public API

2 participants