Path normalization converts the paths of HTTP requests into a clearer and more efficient standardized form. Configure a path normalization policy for an Alibaba Cloud Service Mesh (ASM) instance to keep the paths of HTTP requests in the mesh standardized and prevent the mesh proxy from unexpectedly rejecting requests.
Background information
The paths of HTTP requests are critical to how a service mesh processes traffic. For example, you may use authorization policies to protect workloads in a Kubernetes cluster. If a request path does not conform to the standard, the mesh proxy may unexpectedly reject the request, which can create security issues for the services in the cluster.
A path normalization policy ensures that the paths of HTTP requests in the service mesh always remain standardized. The mesh proxy normalizes request paths in a different way for each policy, so the policy that you select determines the form in which request paths reach your workloads.
Path normalization policies
The following table describes the path normalization policies that ASM supports:
| Path normalization policy | Description |
| NONE | No path normalization is performed. |
| BASE | Normalizes paths according to the RFC 3986 standard. For example, /a/../b is normalized to /b. |
| MERGE_SLASHES | Builds on the BASE policy and merges adjacent slashes. For example, /a//b is normalized to /a/b. |
| DECODE_AND_MERGE_SLASHES | Builds on the MERGE_SLASHES policy. Percent-encoded slash characters in the path are first decoded and then adjacent slashes are merged. %2F is decoded to /, and %5C is decoded to \. For example, /a%2F/b is normalized to /a/b. |
Configure a path normalization policy
-
Log on to the ASM console. In the left-side navigation pane, choose .
-
On the Mesh Management page, click the name of the ASM instance that you want to configure. On the Base Information page, find Path Normalization Policy under Config Info, and then click Edit on the right.
-
In the dialog box that appears, select one of the path normalization policies and then click OK to save the settings.