Class GrpcSecurityMethodConfig.BuilderBase<BUILDER extends GrpcSecurityMethodConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends GrpcSecurityMethodConfig>

java.lang.Object
io.helidon.webserver.grpc.security.GrpcSecurityMethodConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
GrpcSecurityMethodConfig.Builder
Enclosing interface:
GrpcSecurityMethodConfig

public abstract static class GrpcSecurityMethodConfig.BuilderBase<BUILDER extends GrpcSecurityMethodConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends GrpcSecurityMethodConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for GrpcSecurityMethodConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(GrpcSecurityMethodConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(GrpcSecurityMethodConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • addObject

      public BUILDER addObject(Object object)
      Register a custom object for security request(s).
      Parameters:
      object - object expected by a security provider
      Returns:
      updated builder instance
    • addObject

      public BUILDER addObject(Class<?> objectType, Object object)
      Register a custom object for security request(s).
      Parameters:
      objectType - type to use for the object
      object - object expected by a security provider
      Returns:
      updated builder instance
    • config

      @Deprecated public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends GrpcSecurityMethodConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends GrpcSecurityMethodConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends GrpcSecurityMethodConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends GrpcSecurityMethodConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • name

      public BUILDER name(String name)
      Bare gRPC method name such as Upper, not the full gRPC method path such as StringService/Upper.
      Parameters:
      name - gRPC method name
      Returns:
      updated builder instance
      See Also:
    • clearRolesAllowed

      public BUILDER clearRolesAllowed()
      Clear all rolesAllowed.
      Returns:
      updated builder instance
      See Also:
    • rolesAllowed

      public BUILDER rolesAllowed(Set<String> rolesAllowed)
      An array of allowed roles for this gRPC method.
      Parameters:
      rolesAllowed - if subject is any of these roles, allow access
      Returns:
      updated builder instance
      See Also:
    • addRolesAllowed

      public BUILDER addRolesAllowed(Set<String> rolesAllowed)
      An array of allowed roles for this gRPC method.
      Parameters:
      rolesAllowed - if subject is any of these roles, allow access
      Returns:
      updated builder instance
      See Also:
    • addRoleAllowed

      public BUILDER addRoleAllowed(String roleAllowed)
      An array of allowed roles for this gRPC method.
      Parameters:
      roleAllowed - add single if subject is any of these roles, allow access
      Returns:
      updated builder instance
      See Also:
    • clearAuthenticator

      public BUILDER clearAuthenticator()
      Clear existing value of authenticator.
      Returns:
      updated builder instance
      See Also:
    • authenticator

      public BUILDER authenticator(String authenticator)
      Use a named authenticator.
      Parameters:
      authenticator - name of authenticator as configured in Security
      Returns:
      updated builder instance
      See Also:
    • clearAuthorizer

      public BUILDER clearAuthorizer()
      Clear existing value of authorizer.
      Returns:
      updated builder instance
      See Also:
    • authorizer

      public BUILDER authorizer(String authorizer)
      Use a named authorizer.
      Parameters:
      authorizer - name of authorizer as configured in Security
      Returns:
      updated builder instance
      See Also:
    • clearAuthenticate

      public BUILDER clearAuthenticate()
      Clear existing value of authenticate.
      Returns:
      updated builder instance
      See Also:
    • authenticate

      public BUILDER authenticate(boolean authenticate)
      Whether to authenticate this request.
      Parameters:
      authenticate - whether to authenticate
      Returns:
      updated builder instance
      See Also:
    • clearAuthenticationOptional

      public BUILDER clearAuthenticationOptional()
      Clear existing value of authenticationOptional.
      Returns:
      updated builder instance
      See Also:
    • authenticationOptional

      public BUILDER authenticationOptional(boolean authenticationOptional)
      Whether authentication failure should continue as anonymous.
      Parameters:
      authenticationOptional - whether authentication is optional
      Returns:
      updated builder instance
      See Also:
    • clearAudit

      public BUILDER clearAudit()
      Clear existing value of audit.
      Returns:
      updated builder instance
      See Also:
    • audit

      public BUILDER audit(boolean audit)
      Whether to audit this request.
      Parameters:
      audit - whether to audit
      Returns:
      updated builder instance
      See Also:
    • clearAuthorize

      public BUILDER clearAuthorize()
      Clear existing value of authorize.
      Returns:
      updated builder instance
      See Also:
    • authorize

      public BUILDER authorize(boolean authorize)
      Whether to authorize this request.
      Parameters:
      authorize - whether to authorize
      Returns:
      updated builder instance
      See Also:
    • clearAuditEventType

      public BUILDER clearAuditEventType()
      Clear existing value of auditEventType.
      Returns:
      updated builder instance
      See Also:
    • auditEventType

      public BUILDER auditEventType(String auditEventType)
      Override for audit event type.
      Parameters:
      auditEventType - audit event type
      Returns:
      updated builder instance
      See Also:
    • clearAuditMessageFormat

      public BUILDER clearAuditMessageFormat()
      Clear existing value of auditMessageFormat.
      Returns:
      updated builder instance
      See Also:
    • auditMessageFormat

      public BUILDER auditMessageFormat(String auditMessageFormat)
      Override for audit message format.
      Parameters:
      auditMessageFormat - audit message format
      Returns:
      updated builder instance
      See Also:
    • clearCustomObjects

      public BUILDER clearCustomObjects()
      Clear existing value of customObjects.
      Returns:
      updated builder instance
      See Also:
    • customObjects

      public BUILDER customObjects(ClassToInstanceStore<Object> customObjects)
      A store of custom objects, that can be used to customize specific security providers.
      Parameters:
      customObjects - custom objects
      Returns:
      updated builder instance
      See Also:
    • name

      public Optional<String> name()
      Bare gRPC method name such as Upper, not the full gRPC method path such as StringService/Upper.
      Returns:
      gRPC method name
    • rolesAllowed

      public Set<String> rolesAllowed()
      An array of allowed roles for this gRPC method.
      Returns:
      if subject is any of these roles, allow access
    • authenticator

      public Optional<String> authenticator()
      Use a named authenticator.
      Returns:
      name of authenticator as configured in Security
    • authorizer

      public Optional<String> authorizer()
      Use a named authorizer.
      Returns:
      name of authorizer as configured in Security
    • authenticate

      public Optional<Boolean> authenticate()
      Whether to authenticate this request.
      Returns:
      whether to authenticate
    • authenticationOptional

      public Optional<Boolean> authenticationOptional()
      Whether authentication failure should continue as anonymous.
      Returns:
      whether authentication is optional
    • audit

      public Optional<Boolean> audit()
      Whether to audit this request.
      Returns:
      whether to audit
    • authorize

      public Optional<Boolean> authorize()
      Whether to authorize this request.
      Returns:
      whether to authorize
    • auditEventType

      public Optional<String> auditEventType()
      Override for audit event type.
      Returns:
      audit event type
    • auditMessageFormat

      public Optional<String> auditMessageFormat()
      Override for audit message format.
      Returns:
      audit message format
    • customObjects

      public Optional<ClassToInstanceStore<Object>> customObjects()
      A store of custom objects, that can be used to customize specific security providers.
      Returns:
      custom objects
    • config

      public Optional<Config> config()
      Configuration associated with this security handler.
      Returns:
      the configuration
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.