Mixer Client

    APIKey defines the explicit configuration for generating the attribute from HTTP requests.

    See API Keysfor a general overview of API keys as defined by OpenAPI.

    AttributeMatch

    Specifies a match clause to match Istio attributes

    FieldTypeDescriptionRequired
    clausemap<string, StringMatch>Map of attribute names to StringMatch type.Each map element specifies one condition to match.Example:clause:source.uid:exact: SOURCE_UIDrequest.http_method:exact: POSTNo

    HTTPAPISpec

    HTTPAPISpec defines the canonical configuration for generatingAPI-related attributes from HTTP requests based on the method anduri templated path matches. It is sufficient for defining the APIsurface of a service for the purposes of API attributegeneration. It is not intended to represent auth, quota,documentation, or other information commonly found in other APIspecifications, e.g. OpenAPI.

    Existing standards that define operations (or methods) in terms ofHTTP methods and paths can be normalized to this format for use inIstio. For example, a simple petstore API described by OpenAPIv2herecan be represented with the following HTTPAPISpec.

    FieldTypeDescriptionRequired
    attributesList of attributes that are generated when any of the HTTPpatterns match. This list typically includes the “api.service”and “api.version” attributes.No
    patternsHTTPAPISpecPattern[]List of HTTP patterns to match.No
    apiKeysList of APIKey that describes how to extract an API-KEY from anHTTP request. The first API-Key match found in the list is used,i.e. ‘OR’ semantics.The following default policies are used to generate therequest.api_key attribute if no explicit APIKey is defined.
    1. query: key,query: api_key, and thenheader: x-api-key`
    No

    HTTPAPISpecBinding

    HTTPAPISpecBinding defines the binding between HTTPAPISpecs and one or moreIstioService. For example, the following establishes a bindingbetween the HTTPAPISpec petstore and service foo in namespace bar.

    1. apiVersion: config.istio.io/v1alpha2
    2. kind: HTTPAPISpecBinding
    3. metadata:
    4. name: my-binding
    5. spec:
    6. services:
    7. - name: foo
    8. namespace: bar
    9. apiSpecs:
    10. - name: petstore
    11. namespace: default
    FieldTypeDescriptionRequired
    servicesOne or more services to map the listed HTTPAPISpec onto.Yes
    apiSpecsHTTPAPISpecReference[]One or more HTTPAPISpec references that should be mapped tothe specified service(s). The aggregate collection of matchconditions defined in the HTTPAPISpecs should not overlap.Yes

    HTTPAPISpecPattern

    HTTPAPISpecPattern defines a single pattern to match againstincoming HTTP requests. The per-pattern list of attributes isgenerated if both the http_method and uri_template match. Inaddition, the top-level list of attributes in the HTTPAPISpec is alsogenerated.

    FieldTypeDescriptionRequired
    attributesAttributesList of attributes that are generated if the HTTP request matchesthe specified http_method and uri_template. This typicallyincludes the “api.operation” attribute.No
    httpMethodstringHTTP request method to match against as defined by. Forexample: GET, HEAD, POST, PUT, DELETE.No
    uriTemplatestring (oneof)URI template to match against as defined byrfc6570. For example, thefollowing are valid URI templates:
    1. /pets/pets/{id}/dictionary/{term:1}/{term}/search{?q,lang}
    Yes
    regexstring (oneof)EXPERIMENTAL:ecmascript style regex-based match as defined by. Forexample,
    1. "^/pets/(.?)?"
    Yes

    HTTPAPISpecReference

    HTTPAPISpecReference defines a reference to an HTTPAPISpec. This istypically used for establishing bindings between an HTTPAPISpec and anIstioService. For example, the following defines anHTTPAPISpecReference for service foo in namespace .

    FieldTypeDescriptionRequired
    namestringThe short name of the HTTPAPISpec. This is the resourcename defined by the metadata name field.Yes
    namespacestringOptional namespace of the HTTPAPISpec. Defaults to the encompassingHTTPAPISpecBinding’s metadata namespace field.No

    IstioService

    IstioService identifies a service and optionally service version.The FQDN of the service is composed from the name, namespace, and implementation-specific domain suffix(e.g. on Kubernetes, “reviews” + “default” + “svc.cluster.local” -> “reviews.default.svc.cluster.local”).

    FieldTypeDescriptionRequired
    namestringThe short name of the service such as “foo”.No
    namespacestringOptional namespace of the service. Defaults to value of metadata namespace field.No
    domainstringDomain suffix used to construct the service FQDN in implementations that support such specification.No
    servicestringThe service FQDN.No
    labelsmap<string, string>Optional one or more labels that uniquely identify the service version.Note: When used for a VirtualService destination, labels MUST be empty.No

    NetworkFailPolicy

    Specifies the behavior when the client is unable to connect to Mixer.

    FieldTypeDescriptionRequired
    policySpecifies the behavior when the client is unable to connect to Mixer.No
    maxRetryuint32Max retries on transport error.No
    baseRetryWaitDurationBase time to wait between retries. Will be adjusted by exponentialbackoff and jitter.No
    maxRetryWaitMax time to wait between retries.No

    NetworkFailPolicy.FailPolicy

    Describes the policy.

    NameDescription
    FAIL_OPENIf network connection fails, request is allowed and delivered to theservice.
    FAIL_CLOSEIf network connection fails, request is rejected.

    Quota

    Specifies a quota to use with quota name and amount.

    FieldTypeDescriptionRequired
    quotastringThe quota name to chargeNo
    chargeint32The quota amount to chargeNo

    QuotaRule

    Specifies a rule with list of matches and list of quotas.If any clause matched, the list of quotas will be used.

    FieldTypeDescriptionRequired
    matchIf empty, match all request.If any of match is true, it is matched.No
    quotasQuota[]The list of quotas to charge.No

    Determines the quotas used for individual requests.

    QuotaSpecBinding

    QuotaSpecBinding defines the binding between QuotaSpecs and one or moreIstioService.

    FieldTypeDescriptionRequired
    servicesIstioService[]One or more services to map the listed QuotaSpec onto.Yes
    quotaSpecsOne or more QuotaSpec references that should be mapped tothe specified service(s). The aggregate collection of matchconditions defined in the QuotaSpecs should not overlap.Yes

    QuotaSpecBinding.QuotaSpecReference

    QuotaSpecReference uniquely identifies the QuotaSpec used in theBinding.

    FieldTypeDescriptionRequired
    namestringThe short name of the QuotaSpec. This is the resourcename defined by the metadata name field.Yes
    namespacestringOptional namespace of the QuotaSpec. Defaults to the value of themetadata namespace field.No

    ServiceConfig

    FieldTypeDescriptionRequired
    disableCheckCallsIf true, do not call Mixer Check.No
    disableReportCallsboolIf true, do not call Mixer Report.No
    mixerAttributesAttributesSend these attributes to Mixer in both Check and Report. Thistypically includes the “destination.service” attribute.In case of a per-route override, per-route attributes take precedenceover the attributes supplied in the client configuration.No
    httpApiSpecHTTP API specifications to generate API attributes.No
    quotaSpecQuotaSpec[]Quota specifications to generate quota requirements.No
    networkFailPolicySpecifies the behavior when the client is unable to connect to Mixer.This is the service-level policy. It overrides[mesh-levelpolicy][istio.mixer.v1.config.client.TransportConfig.network_fail_policy].No
    forwardAttributesAttributesDefault attributes to forward to upstream. This typicallyincludes the “source.ip” and “source.uid” attributes.In case of a per-route override, per-route attributes take precedenceover the attributes supplied in the client configuration.Forwarded attributes take precedence over the static Mixer attributes,except in cases where there is clear configuration to ignore forwardedattributes. Gateways, for instance, should never use forwarded attributes.The full order of application is as follows:1. static Mixer attributes from the filter config;2. static Mixer attributes from the route config;3. forwarded attributes from the source filter config (if any and not ignored);4. forwarded attributes from the source route config (if any and not ignored);5. derived attributes from the request metadata.No

    StringMatch

    Describes how to match a given string in HTTP headers. Match iscase-sensitive.

    FieldTypeDescriptionRequired
    exactstring (oneof)exact string matchYes
    prefixstring (oneof)prefix-based matchYes
    regexstring (oneof)ECMAscript style regex-based matchYes

    TcpClientConfig

    Defines the client config for TCP.

    FieldTypeDescriptionRequired
    transportThe transport config.No
    mixerAttributesAttributesDefault attributes to send to Mixer in both Check andReport. This typically includes “destination.ip” and“destination.uid” attributes.No
    disableCheckCallsboolIf set to true, disables Mixer check calls.No
    disableReportCallsboolIf set to true, disables Mixer check calls.No
    connectionQuotaSpecQuota specifications to generate quota requirements.It applies on the new TCP connections.No
    reportIntervalDurationSpecify report interval to send periodical reports for long TCPconnections. If not specified, the interval is 10 seconds. This intervalshould not be less than 1 second, otherwise it will be reset to 1 second.No

    Defines the transport config on how to call Mixer.

    istio.mixer.v1.Attributes

    Attributes represents a set of typed name/value pairs. Many of Mixer’sAPI either consume and/or return attributes.

    Istio uses attributes to control the runtime behavior of services running in the service mesh.Attributes are named and typed pieces of metadata describing ingress and egress traffic and theenvironment this traffic occurs in. An Istio attribute carries a specific pieceof information such as the error code of an API request, the latency of an API request, or theoriginal IP address of a TCP connection. For example:

    1. request.path: xyz/abc
    2. request.size: 234
    3. request.time: 12:34:56.789 04/17/2017
    4. source.ip: 192.168.0.1

    A given Istio deployment has a fixed vocabulary of attributes that it understands.The specific vocabulary is determined by the set of attribute producers being usedin the deployment. The primary attribute producer in Istio is Envoy, althoughspecialized Mixer adapters and services can also generate attributes.

    The common baseline set of attributes available in most Istio deployments is definedhere.

    Attributes are strongly typed. The supported attribute types are defined by.Each type of value is encoded into one of the so-called transport types presentin this message.

    FieldTypeDescriptionRequired
    map<string, AttributeValue>A map of attribute name to its value.No