java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
io.envoyproxy.envoy.extensions.filters.http.basic_auth.v3.BasicAuth.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, BasicAuthOrBuilder, Cloneable
Enclosing class:
BasicAuth

public static final class BasicAuth.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder> implements BasicAuthOrBuilder
 Basic HTTP authentication.

 Example:

 .. code-block:: yaml

   users:
     inline_string: |-
       user1:{SHA}hashed_user1_password
       user2:{SHA}hashed_user2_password
 
Protobuf type envoy.extensions.filters.http.basic_auth.v3.BasicAuth
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • clear

      public BasicAuth.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • getDefaultInstanceForType

      public BasicAuth getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public BasicAuth build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public BasicAuth buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public BasicAuth.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • setField

      public BasicAuth.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • clearField

      public BasicAuth.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • clearOneof

      public BasicAuth.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • setRepeatedField

      public BasicAuth.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • addRepeatedField

      public BasicAuth.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • mergeFrom

      public BasicAuth.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BasicAuth.Builder>
    • mergeFrom

      public BasicAuth.Builder mergeFrom(BasicAuth other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • mergeFrom

      public BasicAuth.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BasicAuth.Builder>
      Throws:
      IOException
    • hasUsers

      public boolean hasUsers()
       Username-password pairs used to verify user credentials in the "Authorization" header.
       The value needs to be the htpasswd format.
       Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
       
      .envoy.config.core.v3.DataSource users = 1 [(.udpa.annotations.sensitive) = true];
      Specified by:
      hasUsers in interface BasicAuthOrBuilder
      Returns:
      Whether the users field is set.
    • getUsers

      public DataSource getUsers()
       Username-password pairs used to verify user credentials in the "Authorization" header.
       The value needs to be the htpasswd format.
       Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
       
      .envoy.config.core.v3.DataSource users = 1 [(.udpa.annotations.sensitive) = true];
      Specified by:
      getUsers in interface BasicAuthOrBuilder
      Returns:
      The users.
    • setUsers

      public BasicAuth.Builder setUsers(DataSource value)
       Username-password pairs used to verify user credentials in the "Authorization" header.
       The value needs to be the htpasswd format.
       Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
       
      .envoy.config.core.v3.DataSource users = 1 [(.udpa.annotations.sensitive) = true];
    • setUsers

      public BasicAuth.Builder setUsers(DataSource.Builder builderForValue)
       Username-password pairs used to verify user credentials in the "Authorization" header.
       The value needs to be the htpasswd format.
       Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
       
      .envoy.config.core.v3.DataSource users = 1 [(.udpa.annotations.sensitive) = true];
    • mergeUsers

      public BasicAuth.Builder mergeUsers(DataSource value)
       Username-password pairs used to verify user credentials in the "Authorization" header.
       The value needs to be the htpasswd format.
       Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
       
      .envoy.config.core.v3.DataSource users = 1 [(.udpa.annotations.sensitive) = true];
    • clearUsers

      public BasicAuth.Builder clearUsers()
       Username-password pairs used to verify user credentials in the "Authorization" header.
       The value needs to be the htpasswd format.
       Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
       
      .envoy.config.core.v3.DataSource users = 1 [(.udpa.annotations.sensitive) = true];
    • getUsersBuilder

      public DataSource.Builder getUsersBuilder()
       Username-password pairs used to verify user credentials in the "Authorization" header.
       The value needs to be the htpasswd format.
       Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
       
      .envoy.config.core.v3.DataSource users = 1 [(.udpa.annotations.sensitive) = true];
    • getUsersOrBuilder

      public DataSourceOrBuilder getUsersOrBuilder()
       Username-password pairs used to verify user credentials in the "Authorization" header.
       The value needs to be the htpasswd format.
       Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
       
      .envoy.config.core.v3.DataSource users = 1 [(.udpa.annotations.sensitive) = true];
      Specified by:
      getUsersOrBuilder in interface BasicAuthOrBuilder
    • getForwardUsernameHeader

      public String getForwardUsernameHeader()
       This field specifies the header name to forward a successfully authenticated user to
       the backend. The header will be added to the request with the username as the value.
      
       If it is not specified, the username will not be forwarded.
       
      string forward_username_header = 2 [(.validate.rules) = { ... }
      Specified by:
      getForwardUsernameHeader in interface BasicAuthOrBuilder
      Returns:
      The forwardUsernameHeader.
    • getForwardUsernameHeaderBytes

      public com.google.protobuf.ByteString getForwardUsernameHeaderBytes()
       This field specifies the header name to forward a successfully authenticated user to
       the backend. The header will be added to the request with the username as the value.
      
       If it is not specified, the username will not be forwarded.
       
      string forward_username_header = 2 [(.validate.rules) = { ... }
      Specified by:
      getForwardUsernameHeaderBytes in interface BasicAuthOrBuilder
      Returns:
      The bytes for forwardUsernameHeader.
    • setForwardUsernameHeader

      public BasicAuth.Builder setForwardUsernameHeader(String value)
       This field specifies the header name to forward a successfully authenticated user to
       the backend. The header will be added to the request with the username as the value.
      
       If it is not specified, the username will not be forwarded.
       
      string forward_username_header = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The forwardUsernameHeader to set.
      Returns:
      This builder for chaining.
    • clearForwardUsernameHeader

      public BasicAuth.Builder clearForwardUsernameHeader()
       This field specifies the header name to forward a successfully authenticated user to
       the backend. The header will be added to the request with the username as the value.
      
       If it is not specified, the username will not be forwarded.
       
      string forward_username_header = 2 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setForwardUsernameHeaderBytes

      public BasicAuth.Builder setForwardUsernameHeaderBytes(com.google.protobuf.ByteString value)
       This field specifies the header name to forward a successfully authenticated user to
       the backend. The header will be added to the request with the username as the value.
      
       If it is not specified, the username will not be forwarded.
       
      string forward_username_header = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for forwardUsernameHeader to set.
      Returns:
      This builder for chaining.
    • getAuthenticationHeader

      public String getAuthenticationHeader()
       This field specifies the request header to load the basic credential from.
      
       If it is not specified, the filter loads the credential from  the "Authorization" header.
       
      string authentication_header = 3 [(.validate.rules) = { ... }
      Specified by:
      getAuthenticationHeader in interface BasicAuthOrBuilder
      Returns:
      The authenticationHeader.
    • getAuthenticationHeaderBytes

      public com.google.protobuf.ByteString getAuthenticationHeaderBytes()
       This field specifies the request header to load the basic credential from.
      
       If it is not specified, the filter loads the credential from  the "Authorization" header.
       
      string authentication_header = 3 [(.validate.rules) = { ... }
      Specified by:
      getAuthenticationHeaderBytes in interface BasicAuthOrBuilder
      Returns:
      The bytes for authenticationHeader.
    • setAuthenticationHeader

      public BasicAuth.Builder setAuthenticationHeader(String value)
       This field specifies the request header to load the basic credential from.
      
       If it is not specified, the filter loads the credential from  the "Authorization" header.
       
      string authentication_header = 3 [(.validate.rules) = { ... }
      Parameters:
      value - The authenticationHeader to set.
      Returns:
      This builder for chaining.
    • clearAuthenticationHeader

      public BasicAuth.Builder clearAuthenticationHeader()
       This field specifies the request header to load the basic credential from.
      
       If it is not specified, the filter loads the credential from  the "Authorization" header.
       
      string authentication_header = 3 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setAuthenticationHeaderBytes

      public BasicAuth.Builder setAuthenticationHeaderBytes(com.google.protobuf.ByteString value)
       This field specifies the request header to load the basic credential from.
      
       If it is not specified, the filter loads the credential from  the "Authorization" header.
       
      string authentication_header = 3 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for authenticationHeader to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final BasicAuth.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>
    • mergeUnknownFields

      public final BasicAuth.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BasicAuth.Builder>