Class AttributeContext

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, AttributeContextOrBuilder, Serializable

    public final class AttributeContext
    extends com.google.protobuf.GeneratedMessageV3
    implements AttributeContextOrBuilder
     An attribute is a piece of metadata that describes an activity on a network.
     For example, the size of an HTTP request, or the status code of an HTTP response.
     Each attribute has a type and a name, which is logically defined as a proto message field
     of the `AttributeContext`. The `AttributeContext` is a collection of individual attributes
     supported by Envoy authorization system.
     [#comment: The following items are left out of this proto
     Request.Auth field for jwt tokens
     Request.Api for api management
     Origin peer that originated the request
     Caching Protocol
     request_context return values to inject back into the filter chain
     peer.claims -- from X.509 extensions
     Configuration
     - field mask to send
     - which return values from request_context are copied back
     - which return values are copied into request_headers]
     [#next-free-field: 12]
     
    Protobuf type envoy.service.auth.v2.AttributeContext
    See Also:
    Serialized Form
    • Field Detail

      • DESTINATION_FIELD_NUMBER

        public static final int DESTINATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CONTEXT_EXTENSIONS_FIELD_NUMBER

        public static final int CONTEXT_EXTENSIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • METADATA_CONTEXT_FIELD_NUMBER

        public static final int METADATA_CONTEXT_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasSource

        public boolean hasSource()
         The source of a network activity, such as starting a TCP connection.
         In a multi hop network activity, the source represents the sender of the
         last hop.
         
        .envoy.service.auth.v2.AttributeContext.Peer source = 1;
        Specified by:
        hasSource in interface AttributeContextOrBuilder
        Returns:
        Whether the source field is set.
      • getSource

        public AttributeContext.Peer getSource()
         The source of a network activity, such as starting a TCP connection.
         In a multi hop network activity, the source represents the sender of the
         last hop.
         
        .envoy.service.auth.v2.AttributeContext.Peer source = 1;
        Specified by:
        getSource in interface AttributeContextOrBuilder
        Returns:
        The source.
      • hasDestination

        public boolean hasDestination()
         The destination of a network activity, such as accepting a TCP connection.
         In a multi hop network activity, the destination represents the receiver of
         the last hop.
         
        .envoy.service.auth.v2.AttributeContext.Peer destination = 2;
        Specified by:
        hasDestination in interface AttributeContextOrBuilder
        Returns:
        Whether the destination field is set.
      • getDestination

        public AttributeContext.Peer getDestination()
         The destination of a network activity, such as accepting a TCP connection.
         In a multi hop network activity, the destination represents the receiver of
         the last hop.
         
        .envoy.service.auth.v2.AttributeContext.Peer destination = 2;
        Specified by:
        getDestination in interface AttributeContextOrBuilder
        Returns:
        The destination.
      • getDestinationOrBuilder

        public AttributeContext.PeerOrBuilder getDestinationOrBuilder()
         The destination of a network activity, such as accepting a TCP connection.
         In a multi hop network activity, the destination represents the receiver of
         the last hop.
         
        .envoy.service.auth.v2.AttributeContext.Peer destination = 2;
        Specified by:
        getDestinationOrBuilder in interface AttributeContextOrBuilder
      • hasRequest

        public boolean hasRequest()
         Represents a network request, such as an HTTP request.
         
        .envoy.service.auth.v2.AttributeContext.Request request = 4;
        Specified by:
        hasRequest in interface AttributeContextOrBuilder
        Returns:
        Whether the request field is set.
      • getContextExtensionsCount

        public int getContextExtensionsCount()
        Description copied from interface: AttributeContextOrBuilder
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        getContextExtensionsCount in interface AttributeContextOrBuilder
      • containsContextExtensions

        public boolean containsContextExtensions​(String key)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        containsContextExtensions in interface AttributeContextOrBuilder
      • getContextExtensionsMap

        public Map<String,​String> getContextExtensionsMap()
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        getContextExtensionsMap in interface AttributeContextOrBuilder
      • getContextExtensionsOrDefault

        public String getContextExtensionsOrDefault​(String key,
                                                    String defaultValue)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        getContextExtensionsOrDefault in interface AttributeContextOrBuilder
      • getContextExtensionsOrThrow

        public String getContextExtensionsOrThrow​(String key)
         This is analogous to http_request.headers, however these contents will not be sent to the
         upstream server. Context_extensions provide an extension mechanism for sending additional
         information to the auth server without modifying the proto definition. It maps to the
         internal opaque context in the filter chain.
         
        map<string, string> context_extensions = 10;
        Specified by:
        getContextExtensionsOrThrow in interface AttributeContextOrBuilder
      • hasMetadataContext

        public boolean hasMetadataContext()
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
        Specified by:
        hasMetadataContext in interface AttributeContextOrBuilder
        Returns:
        Whether the metadataContext field is set.
      • getMetadataContext

        public Metadata getMetadataContext()
         Dynamic metadata associated with the request.
         
        .envoy.api.v2.core.Metadata metadata_context = 11;
        Specified by:
        getMetadataContext in interface AttributeContextOrBuilder
        Returns:
        The metadataContext.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static AttributeContext parseFrom​(ByteBuffer data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(ByteBuffer data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(com.google.protobuf.ByteString data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(com.google.protobuf.ByteString data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(byte[] data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(byte[] data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws IOException
        Throws:
        IOException
      • newBuilderForType

        public AttributeContext.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public AttributeContext.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected AttributeContext.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<AttributeContext> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public AttributeContext getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder