Updated on 2023-05-22 GMT+08:00

Configuring Parameters

This section describes how to configure common parameters for a gateway to adjust component functions.

Constraint

Modifying gateway configuration parameters will interrupt services. Do this during off-peak hours or when no service is running.

Procedure

  1. Log in to the APIG console.
  1. In the navigation pane, choose Gateways.
  2. Click Access Console or the name of the target gateway.
  3. Click the Parameters tab, and click Modify in the row that contains the target parameter. The configuration parameters vary depending on the gateway edition.

    Table 1 Configuration parameters

    Parameter

    Description

    ratelimit_api_limits

    Default request throttling value applied to all APIs. The total number of times an API can be called is determined by this parameter only if no request throttling policy is bound to the API. The Max. API Requests of a request throttling policy cannot exceed the value of this parameter.

    request_body_size

    The maximum body size allowed for an API request.

    backend_timeout

    Backend response timeout. Value range: 1 ms to 600,000 ms.

    app_token

    Determine whether to enable app_token authentication. If you enable this function, an access_token can be added to the API request for authentication.

    • app_token_expire_time: the validity period of an access_token. A new access_token must be obtained before the original access_token expires.
    • refresh_token_expire_time: the validity period of a refresh_token. A refresh_token is used to obtain a new access_token.
    • app_token_uri: the URI used to obtain an access_token.
    • app_token_key: the encryption key of an access token.

    app_basic

    Determine whether to enable app_basic authentication. After this option is enabled, users can add the header parameter Authorization and set the parameter value to "Basic + base64 (appkey + : + appsecret)", in which appkey and appsecret are the key and secret of a credential or the AppKey and AppSecret of a client.

    app_secret

    Determine whether to enable app_secret authentication. If you enable this function, the X-HW-ID and X-HW-AppKey parameters can be added to the API request to carry the key and secret of a credential (the AppKey and AppSecret of a client) for authentication.

    If you want to enable app_secret authentication, app_api_key authentication must be disabled.

    app_route

    Determine whether to support IP address–based API access. If you enable this function, APIs in any group except DEFAULT can be called using IP addresses.

    backend_client_certificate

    Determine whether to enable backend two-way authentication. If you enable this function, you can configure two-way authentication for a backend when creating an API.

    ssl_ciphers

    Supported HTTPS cipher suites. Select cipher suites that meet your requirements.

    real_ip_from_xff

    Determine whether to use the IP addresses in the X-Forwarded-For header for access control and request throttling.

    xff_index: Sequence number of an IP address in the X-Forwarded-For header. The value can be positive, negative, or 0.

    • If the value is 0 or positive, the IP address of the corresponding index in the X-Forwarded-For header will be obtained.
    • If the value is negative, the IP address of the indicated reverse sequence in the X-Forwarded-For header will be obtained.

    For example, assume that the X-Forwarded-For header of a request received by API gateway contains three IP addresses: IP1, IP2, and IP3. If the value of xff_index is 0, IP1 is obtained. If the value is 1, IP2 is obtained. If the value is –1, IP3 is obtained. If the value is –2, IP2 is obtained.

    vpc_name_modifiable

    Determine whether load balance channel names can be modified.

    NOTICE:

    If this option is enabled, load balance channels of the current gateway cannot be managed using project-level load balance channel management APIs.