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 builderPROTOTYPE- type of the prototype interface that would be built byPrototype.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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRegister a custom object for security request(s).Register a custom object for security request(s).addRoleAllowed(String roleAllowed) An array of allowed roles for this gRPC method.addRolesAllowed(Set<String> rolesAllowed) An array of allowed roles for this gRPC method.audit()Whether to audit this request.audit(boolean audit) Whether to audit this request.Override for audit event type.auditEventType(String auditEventType) Override for audit event type.Override for audit message format.auditMessageFormat(String auditMessageFormat) Override for audit message format.Whether to authenticate this request.authenticate(boolean authenticate) Whether to authenticate this request.Whether authentication failure should continue as anonymous.authenticationOptional(boolean authenticationOptional) Whether authentication failure should continue as anonymous.Use a named authenticator.authenticator(String authenticator) Use a named authenticator.Whether to authorize this request.authorize(boolean authorize) Whether to authorize this request.Use a named authorizer.authorizer(String authorizer) Use a named authorizer.Clear existing value of audit.Clear existing value of auditEventType.Clear existing value of auditMessageFormat.Clear existing value of authenticate.Clear existing value of authenticationOptional.Clear existing value of authenticator.Clear existing value of authorize.Clear existing value of authorizer.Clear existing value of customObjects.Clear all rolesAllowed.config()Configuration associated with this security handler.Deprecated.Update builder from configuration (node of this type).A store of custom objects, that can be used to customize specific security providers.customObjects(ClassToInstanceStore<Object> customObjects) A store of custom objects, that can be used to customize specific security providers.from(GrpcSecurityMethodConfig prototype) Update this builder from an existing prototype instance.from(GrpcSecurityMethodConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.name()Bare gRPC method name such asUpper, not the full gRPC method path such asStringService/Upper.Bare gRPC method name such asUpper, not the full gRPC method path such asStringService/Upper.protected voidHandles providers and decorators.An array of allowed roles for this gRPC method.rolesAllowed(Set<String> rolesAllowed) An array of allowed roles for this gRPC method.toString()protected voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
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
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
addObject
Register a custom object for security request(s).- Parameters:
object- object expected by a security provider- Returns:
- updated builder instance
-
addObject
Register a custom object for security request(s).- Parameters:
objectType- type to use for the objectobject- object expected by a security provider- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.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
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.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
Bare gRPC method name such asUpper, not the full gRPC method path such asStringService/Upper.- Parameters:
name- gRPC method name- Returns:
- updated builder instance
- See Also:
-
clearRolesAllowed
Clear all rolesAllowed.- Returns:
- updated builder instance
- See Also:
-
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
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
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
Clear existing value of authenticator.- Returns:
- updated builder instance
- See Also:
-
authenticator
Use a named authenticator.- Parameters:
authenticator- name of authenticator as configured inSecurity- Returns:
- updated builder instance
- See Also:
-
clearAuthorizer
Clear existing value of authorizer.- Returns:
- updated builder instance
- See Also:
-
authorizer
Use a named authorizer.- Parameters:
authorizer- name of authorizer as configured inSecurity- Returns:
- updated builder instance
- See Also:
-
clearAuthenticate
Clear existing value of authenticate.- Returns:
- updated builder instance
- See Also:
-
authenticate
Whether to authenticate this request.- Parameters:
authenticate- whether to authenticate- Returns:
- updated builder instance
- See Also:
-
clearAuthenticationOptional
Clear existing value of authenticationOptional.- Returns:
- updated builder instance
- See Also:
-
authenticationOptional
Whether authentication failure should continue as anonymous.- Parameters:
authenticationOptional- whether authentication is optional- Returns:
- updated builder instance
- See Also:
-
clearAudit
Clear existing value of audit.- Returns:
- updated builder instance
- See Also:
-
audit
Whether to audit this request.- Parameters:
audit- whether to audit- Returns:
- updated builder instance
- See Also:
-
clearAuthorize
Clear existing value of authorize.- Returns:
- updated builder instance
- See Also:
-
authorize
Whether to authorize this request.- Parameters:
authorize- whether to authorize- Returns:
- updated builder instance
- See Also:
-
clearAuditEventType
Clear existing value of auditEventType.- Returns:
- updated builder instance
- See Also:
-
auditEventType
Override for audit event type.- Parameters:
auditEventType- audit event type- Returns:
- updated builder instance
- See Also:
-
clearAuditMessageFormat
Clear existing value of auditMessageFormat.- Returns:
- updated builder instance
- See Also:
-
auditMessageFormat
Override for audit message format.- Parameters:
auditMessageFormat- audit message format- Returns:
- updated builder instance
- See Also:
-
clearCustomObjects
Clear existing value of customObjects.- Returns:
- updated builder instance
- See Also:
-
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
Bare gRPC method name such asUpper, not the full gRPC method path such asStringService/Upper.- Returns:
- gRPC method name
-
rolesAllowed
An array of allowed roles for this gRPC method.- Returns:
- if subject is any of these roles, allow access
-
authenticator
Use a named authenticator.- Returns:
- name of authenticator as configured in
Security
-
authorizer
Use a named authorizer.- Returns:
- name of authorizer as configured in
Security
-
authenticate
Whether to authenticate this request.- Returns:
- whether to authenticate
-
authenticationOptional
Whether authentication failure should continue as anonymous.- Returns:
- whether authentication is optional
-
audit
Whether to audit this request.- Returns:
- whether to audit
-
authorize
Whether to authorize this request.- Returns:
- whether to authorize
-
auditEventType
Override for audit event type.- Returns:
- audit event type
-
auditMessageFormat
Override for audit message format.- Returns:
- audit message format
-
customObjects
A store of custom objects, that can be used to customize specific security providers.- Returns:
- custom objects
-
config
Configuration associated with this security handler.- Returns:
- the configuration
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-
config(io.helidon.config.Config)