This resource is experimental.
It requires MeshService to be enabled.
It works on Kubernetes since version 2.12, and on Universal since version 2.13.
MeshIdentity is a resource that defines how workloads in a mesh obtain their cryptographic identity.
It separates the responsibility of issuing identities from establishing trust,
enabling Kong Mesh to adopt SPIFFE compliant practices
while remaining flexible and easy to use.
With MeshIdentity, users can:
Enable secure mTLS between services, using trusted certificate authorities.
Switch identity providers without downtime, for example when migrating from built-in certificates to Spire.
Assign different identity providers to subsets of workloads, allowing more granular control.
The selector field controls which data plane proxies a MeshIdentity applies to.
It uses matchLabels selectors on data plane proxy tags.
You can scope an identity to all workloads, a subset of workloads, or none at all.
When multiple MeshIdentity resources apply to the same data plane proxy,
the one with the most specific selector (the greatest number of matching labels) takes precedence.
If two policies have selectors with the same number of labels, Kong Mesh compares their names lexicographically.
The policy whose name comes first in alphabetical order takes precedence.
The spiffeID field lets you override how SPIFFE IDs are constructed for the data plane proxies selected by this MeshIdentity.
By default, Kong Mesh generates a SPIFFE ID based on the mesh and zone.
With spiffeID, you can customize the trustDomain and the path template.
The default path template depends on the environment:
When using {{ label "kuma.io/workload" }} or {{ .Workload }} in the path template, data plane proxies selected by this MeshIdentity must have the kuma.io/workload label. This label can be provided either: