Skip to content

Commit ead6016

Browse files
therepaniconobc
authored andcommitted
Migrate to SubjectX500PrincipalExtractor in SslContextPreAuthenticationExtractor
Switch to SubjectX500PrincipalExtractor to avoid usage of deprecated API and string-based DN parsing. Signed-off-by: Andrey Litvitski <[email protected]>
1 parent 8e0b10a commit ead6016

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-grpc-core/src/main/java/org/springframework/grpc/server/security/SslContextPreAuthenticationExtractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
import org.springframework.security.core.Authentication;
3232
import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken;
33-
import org.springframework.security.web.authentication.preauth.x509.SubjectDnX509PrincipalExtractor;
33+
import org.springframework.security.web.authentication.preauth.x509.SubjectX500PrincipalExtractor;
3434
import org.springframework.security.web.authentication.preauth.x509.X509PrincipalExtractor;
3535
import org.springframework.util.Assert;
3636

@@ -46,7 +46,7 @@ public class SslContextPreAuthenticationExtractor implements GrpcAuthenticationE
4646
private X509PrincipalExtractor principalExtractor;
4747

4848
public SslContextPreAuthenticationExtractor() {
49-
this(new SubjectDnX509PrincipalExtractor());
49+
this(new SubjectX500PrincipalExtractor());
5050
}
5151

5252
public SslContextPreAuthenticationExtractor(X509PrincipalExtractor principalExtractor) {

0 commit comments

Comments
 (0)