Policies · Kong Mesh
OPAPolicy
Legacy Kong Mesh Open Policy Agent authorization policy.
Behaviour per target
Output: MeshOPA
OPAPolicy |
MeshOPA |
|---|---|
conf.policies[].inlineString / .inline / .secret |
spec.default.appendPolicies[].rego.* (same key) |
conf.agentConfig.inlineString / .inline / .secret |
spec.default.agentConfig.* (same key) |
other conf fields |
spec.default.*, with a warning |
selectors[] |
spec.targetRef (kuma.io/service: '*' → Mesh); several selectors split into one MeshOPA each |
top-level mesh (Kubernetes layout) |
metadata.labels["kuma.io/mesh"] |
no namespace (OPAPolicy is cluster-scoped) |
metadata.namespace: the control-plane namespace, so the CP gives the MeshOPA the system role (Namespace on Kubernetes) |
The output keeps the flat DataSource shape, which the 2.x MeshOPA accepts for all three
keys (inline stays base64). A policies[] entry or agentConfig with none of the three
keys is left out with a "NOT migrated" warning instead of being emitted as an empty
rego: {}; unrecognised extra keys are reported as dropped. The output then gets the
MeshOPA v2 advisories.
Output: MeshOPA
Same conversion, then the MeshOPA v3 rewrites: DataSources to
SecureDataSource (a base64 inline is decoded into insecureInline.value),
targetRef.name/namespace/mesh to labels. The source object is
listed under "Delete Before Upgrading to 3.0".
Timeline
| Version | Change |
|---|---|
| 2.13 | Non-functional under the default dynamic-config OPA runtime (opt out with KMESH_OPA_EXPERIMENTAL_USE_DYNAMIC_CONFIG=false on the data plane). |
| 3.0 | Removed with its CRD. Leftover objects are rejected. |
Related topics
- Access control — MeshTrafficPermission from[] versus SPIFFE rules[], MeshOPA, and the Kong Mesh RBAC changes in 3.0 — what kuma-migrator converts and what stays manual.