You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ossm-configuring-the-threescale-wasm-auth-module.adoc
+19-25Lines changed: 19 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,10 @@
7
7
8
8
Cluster administrators on {product-title} can configure the `threescale-wasm-auth` module to authorize HTTP requests to 3scale API Management through an application binary interface (ABI). The ABI defines the interaction between host and the module, exposing the hosts services, and allows you to use the module to process proxy requests.
9
9
10
-
[id="the-service-mesh-extension_{context}"]
11
-
== The Service Mesh extension
10
+
[id="the-wasmplugin-api-extension_{context}"]
11
+
== The WasmPlugin API extension
12
12
13
-
14
-
{SMProductShortName} provides a custom resource definition to specify and apply Proxy-WASM extensions to sidecar proxies, known as xref:../../service_mesh/v2x/ossm-extensions.adoc#ossm-extensions[`ServiceMeshExtension`]. {SMProductShortName} applies this custom resource to the set of workloads that require HTTP API management with 3scale.
13
+
{SMProductShortName} provides a custom resource definition to specify and apply Proxy-WASM extensions to sidecar proxies, known as xref:../../service_mesh/v2x/ossm-extensions.adoc#ossm-extensions-wasmplugin-format_ossm-extensions[`WasmPlugin`]. {SMProductShortName} applies this custom resource to the set of workloads that require HTTP API management with 3scale.
15
14
16
15
ifdef::openshift-enterprise[]
17
16
See xref:../../operators/understanding/crds/crd-extending-api-with-crds.adoc#crd-extending-api-with-crds[custom resource definition] for more information.
@@ -26,43 +25,38 @@ Configuring the WebAssembly extension is currently a manual process. Support for
26
25
27
26
* Identify a Kubernetes workload and namespace on your {SMProductShortName} deployment that you will apply this module.
28
27
* You must have a 3scale tenant account. See link:https://www.3scale.net/signup[SaaS] or link:https://access.redhat.com/documentation/en-us/red_hat_3scale_api_management/2.11/html-single/installing_3scale/index#install-threescale-on-openshift-guide[3scale 2.11 On-Premises] with a matching service and relevant applications and metrics defined.
29
-
* If you apply the module to the `productpage` microservice in the `bookinfo` namespace, see the xref:../../service_mesh/v1x/prepare-to-deploy-applications-ossm.html#ossm-tutorial-bookinfo-overview_deploying-applications-ossm-v1x[Bookinfo sample application].
28
+
* If you apply the module to the `<product_page>` microservice in the `bookinfo` namespace, see the xref:../../service_mesh/v1x/prepare-to-deploy-applications-ossm.html#ossm-tutorial-bookinfo-overview_deploying-applications-ossm-v1x[Bookinfo sample application].
30
29
** The following example is the YAML format for the custom resource for `threescale-wasm-auth` module.
31
-
This example refers to the upstream Maistra version of {SMProductShortName}, ServiceMeshExtension API. You must declare the namespace where the `threescale-wasm-auth` module is deployed, alongside a `WorkloadSelector` to identify the set of applications the module will apply to:
30
+
This example refers to the upstream Maistra version of {SMProductShortName}, `WasmPlugin` API. You must declare the namespace where the `threescale-wasm-auth` module is deployed, alongside a `selector` to identify the set of applications the module will apply to:
* The `spec.config` field depends on the module configuration and it is not populated in the previous example. Instead, the example uses the `<yaml_configuration>` placeholder value. You can use the format of this custom resource example.
52
-
** The `spec.config` field varies depending on the application. All other fields persist across multiple instances of this custom resource. As examples:
49
+
<2> The `selector`.
50
+
* The `spec.pluginConfig` field depends on the module configuration and it is not populated in the previous example. Instead, the example uses the `<yaml_configuration>` placeholder value. You can use the format of this custom resource example.
51
+
** The `spec.pluginConfig` field varies depending on the application. All other fields persist across multiple instances of this custom resource. As examples:
53
52
+
54
53
--
55
-
*** `image`: Only changes when newer versions of the module are deployed.
54
+
*** `url`: Only changes when newer versions of the module are deployed.
56
55
*** `phase`: Remains the same, since this module needs to be invoked after the proxy has done any local authorization, such as validating OpenID Connect (OIDC) tokens.
57
56
--
58
-
* After you have the module configuration in `spec.config` and the rest of the custom resource, apply it with the `oc apply` command:
57
+
* After you have the module configuration in `spec.pluginConfig` and the rest of the custom resource, apply it with the `oc apply` command:
Copy file name to clipboardExpand all lines: modules/ossm-threescale-configuring-the-threescale-webassembly-module.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,4 +14,4 @@ The prerequisites are a set of minimum mandatory fields in all cases:
14
14
* For the 3scale account and authorization service: the `backend-listener` URL.
15
15
* For the list of services to handle: the service IDs and at least one credential look up method and where to find it.
16
16
* You will find examples for dealing with `userkey`, `appid` with `appkey`, and OpenID Connect (OIDC) patterns.
17
-
* The WebAssembly module uses the settings you specified in the static configuration. For example, if you add a mapping rule configuration to the module, it will always apply, even when the 3scale Admin Portal has no such mapping rule. The rest of the `ServiceMeshExtension` resource exists around the `spec.config` YAML entry.
17
+
* The WebAssembly module uses the settings you specified in the static configuration. For example, if you add a mapping rule configuration to the module, it will always apply, even when the 3scale Admin Portal has no such mapping rule. The rest of the `WasmPlugin` resource exists around the `spec.pluginConfig` YAML entry.
The `ServiceMeshExtension` custom resource spec provides the configuration that the `Proxy-WASM` module reads from.
8
+
The `WasmPlugin` custom resource spec provides the configuration that the `Proxy-WASM` module reads from.
9
9
10
-
The spec is embedded in the host and read by the `Proxy-WASM` module. Typically, the configurations are in the JSON file format for the modules to parse, however the `ServiceMeshExtension` resource can interpret the spec value as YAML and convert it to JSON for consumption by the module.
10
+
The spec is embedded in the host and read by the `Proxy-WASM` module. Typically, the configurations are in the JSON file format for the modules to parse, however the `WasmPlugin` resource can interpret the spec value as YAML and convert it to JSON for consumption by the module.
11
11
12
-
If you use the `Proxy-WASM` module in stand-alone mode, you must write the configuration using the JSON format. Using the JSON format means using escaping and quoting where needed within the `host` configuration files, for example `Envoy`. When you use the WebAssembly module with the `ServiceMeshExtension` resource, the configuration is in the YAML format. In this case, an invalid configuration forces the module to show diagnostics based on its JSON representation to a sidecar's logging stream.
12
+
If you use the `Proxy-WASM` module in stand-alone mode, you must write the configuration using the JSON format. Using the JSON format means using escaping and quoting where needed within the `host` configuration files, for example `Envoy`. When you use the WebAssembly module with the `WasmPlugin` resource, the configuration is in the YAML format. In this case, an invalid configuration forces the module to show diagnostics based on its JSON representation to a sidecar's logging stream.
13
13
14
14
[IMPORTANT]
15
15
====
16
-
The `EnvoyFilter` custom resource is not a supported API, although it can be used in some 3scale Istio adapter or {SMProductShortName} releases. Using the `EnvoyFilter` custom resource is not recommended. Use the `ServiceMeshExtension` API instead of the `EnvoyFilter` custom resource.
16
+
The `EnvoyFilter` custom resource is not a supported API, although it can be used in some 3scale Istio adapter or {SMProductShortName} releases. Using the `EnvoyFilter` custom resource is not recommended. Use the `WasmPlugin` API instead of the `EnvoyFilter` custom resource.
17
17
If you must use the `EnvoyFilter` custom resource, you must specify the spec in JSON format.
Copy file name to clipboardExpand all lines: modules/ossm-threescale-webassembly-module-services-object.adoc
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,12 @@ The `services` field is required. It is an array that must contain at least one
13
13
14
14
[source,yaml]
15
15
----
16
-
apiVersion: maistra.io/v1
17
-
kind: ServiceMeshExtension
16
+
apiVersion: extensions.istio.io/v1alpha1
17
+
kind: WasmPlugin
18
18
metadata:
19
-
name: threescale-wasm-auth
19
+
name: <threescale_wasm_plugin_name>
20
20
spec:
21
-
config:
21
+
pluginConfig:
22
22
...
23
23
services:
24
24
- id: "2555417834789"
@@ -46,7 +46,7 @@ a|`token`
46
46
a|This `token` can be found in the proxy configuration for your service in System or you can retrieve the it from System with following `curl` command:
|An array of strings, each one representing the _Authority_ of a _URL_ to match. These strings accept glob patterns supporting the asterisk (_*_), plus sign (_+_), and question mark (_?_) matchers.
@@ -58,5 +58,5 @@ a|`credentials`
58
58
59
59
a|`mapping_rules`
60
60
|An array of objects representing mapping rules and 3scale methods to hit.
0 commit comments