Class GrpcSecurity

java.lang.Object
org.springframework.security.config.annotation.AbstractSecurityBuilder<AuthenticationProcessInterceptor>
org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder<AuthenticationProcessInterceptor, GrpcSecurity>
org.springframework.grpc.server.security.GrpcSecurity
All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityBuilder<AuthenticationProcessInterceptor>

public final class GrpcSecurity extends org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder<AuthenticationProcessInterceptor, GrpcSecurity>
The GrpcSecurity class is responsible for configuring the security settings for a gRPC server. It provides methods to configure authentication providers, user details service, and authentication extractors. The class also defines some static constants, such as the AUTHORIZATION_KEY can be used in your security configuration. The class also provides various methods to configure different authentication mechanisms, such as pre-authentication, HTTP basic authentication, and custom authentication extractors.
Author:
Dave Syer
  • Field Details

    • CONTEXT_FILTER_ORDER

      public static final int CONTEXT_FILTER_ORDER
      The order value for the context filter in the gRPC security framework. This constant defines the position of the context filter in the filter chain. A lower value indicates higher precedence.
      See Also:
    • SECURITY_CONTEXT_KEY

      public static io.grpc.Context.Key<org.springframework.security.core.context.SecurityContext> SECURITY_CONTEXT_KEY
      Key for the SecurityContext in the gRPC Context.
  • Constructor Details

    • GrpcSecurity

      public GrpcSecurity(org.springframework.security.config.ObjectPostProcessor<Object> objectPostProcessor, org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder authenticationBuilder, org.springframework.context.ApplicationContext context)
  • Method Details