MeshTrafficPermissions 정책 구성 참조
MeshTrafficPermissions 정책 구성 참조 (MeshTrafficPermissions Policy Configuration Reference)
이 문서는 Kong Mesh의 MeshTrafficPermissions 정책을 설정할 때 참고하는 구성 레퍼런스예요. 어떤 클라이언트 그룹에게 접근을 허용(Allow)하거나 거부(Deny)할지 정의하는 from 항목과, 클라이언트 그룹을 가리키는 targetRef의 구조를 스키마 형태로 자세히 설명해요. targetRef에서 지정할 수 있는 리소스 종류(Mesh, MeshService, MeshGateway 등)와 라벨, 네임스페이스 같은 필드까지 다루고 있어서, 메시 안에서 서비스 간 접근 권한을 세밀하게 제어하고 싶을 때 유용해요
출처: 문서
본문
구성
{
"description": "Spec is the specification of the Kuma MeshTrafficPermission resource.",
"properties": {
"from": {
"description": "From list makes a match between clients and corresponding configurations",
"items": {
"properties": {
"default": {
"description": "Default is a configuration specific to the group of clients referenced in\n'targetRef'",
"properties": {
"action": {
"description": "Action defines a behavior for the specified group of clients:",
"enum": [
"Allow",
"Deny",
"AllowWithShadowDeny"
],
"type": "string"
}
},
"type": "object"
},
"targetRef": {
"description": "TargetRef is a reference to the resource that represents a group of\nclients.",
"properties": {
"kind": {
"description": "Kind of the referenced resource",
"enum": [
"Mesh",
"MeshSubset",
"MeshGateway",
"MeshService",
"MeshExternalService",
"MeshMultiZoneService",
"MeshServiceSubset",
"MeshHTTPRoute",
"Dataplane"
],
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Labels are used to select group of MeshServices that match labels. Either Labels or\nName and Namespace can be used.",
"type": "object"
},
"mesh": {
"description": "Mesh is reserved for future use to identify cross mesh resources.",
"type": "string"
},
"name": {
"description": "Name of the referenced resource. Can only be used with kinds: `MeshService`,\n`MeshServiceSubset` and `MeshGatewayRoute`",
"type": "string"
},
"namespace": {
"description": "Namespace specifies the namespace of target resource. If empty only resources in policy namespace\nwill be targeted.",
"type": "string"
},
"proxyTypes": {
"description": "ProxyTypes specifies the data plane types that are subject to the policy. When not specified,\nall data plane types are targeted by the policy.",
"items": {
"enum": [
"Sidecar",
"Gateway"
],
"type": "string"
},
"type": "array"
},
"sectionName": {
"description": "SectionName is used to target specific section of resource.\nFor example, you can target port from MeshService.ports[] by its name. Only traffic to this port will be affected.",
"type": "string"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"description": "Tags used to select a subset of proxies by tags. Can only be used with kinds\n`MeshSubset` and `MeshServiceSubset`",
"type": "object"
}
},
"required": [
"kind"
],
"type": "object"
}
},
"required": [
"targetRef"
],
"type": "object"
},
"type": "array"
},
"rules": {
"description": "Rules defines inbound permissions configuration",
"items": {
"properties": {
"default": {
"properties": {
"allow": {
"description": "Allow definees a list of matches for which access will be allowed",
"items": {
"properties": {
"sni": {
"description": "SNI defines a matcher configuration for matching by SNI value carried on the TLS connection",
"properties": {
"type": {
"description": "Type defines how to match traffic by SNI. Only `Exact` is supported.",
"enum": [
"Exact"
],
"type": "string"
},
"value": {
"description": "Value is the SNI carried on the TLS connection that needs to match for the configuration to be applied",
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
},
"spiffeID": {
"description": "SpiffeID defines a matcher configuration for SpiffeID matching",
"properties": {
"type": {
"description": "Type defines how to match incoming traffic by SpiffeID. `Exact` or `Prefix` are allowed.",
"enum": [
"Exact",
"Prefix"
],
"type": "string"
},
"value": {
"description": "Value is SpiffeID of a client that needs to match for the configuration to be applied",
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"allowWithShadowDeny": {
"description": "AllowWithShadowDeny defines a list of matches for which access will be allowed but emits logs as if\nrequests are denied",
"items": {
"properties": {
"sni": {
"description": "SNI defines a matcher configuration for matching by SNI value carried on the TLS connection",
"properties": {
"type": {
"description": "Type defines how to match traffic by SNI. Only `Exact` is supported.",
"enum": [
"Exact"
],
"type": "string"
},
"value": {
"description": "Value is the SNI carried on the TLS connection that needs to match for the configuration to be applied",
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
},
"spiffeID": {
"description": "SpiffeID defines a matcher configuration for SpiffeID matching",
"properties": {
"type": {
"description": "Type defines how to match incoming traffic by SpiffeID. `Exact` or `Prefix` are allowed.",
"enum": [
"Exact",
"Prefix"
],
"type": "string"
},
"value": {
"description": "Value is SpiffeID of a client that needs to match for the configuration to be applied",
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"deny": {
"description": "Deny defines a list of matches for which access will be denied",
"items": {
"properties": {
"sni": {
"description": "SNI defines a matcher configuration for matching by SNI value carried on the TLS connection",
"properties": {
"type": {
"description": "Type defines how to match traffic by SNI. Only `Exact` is supported.",
"enum": [
"Exact"
],
"type": "string"
},
"value": {
"description": "Value is the SNI carried on the TLS connection that needs to match for the configuration to be applied",
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
},
"spiffeID": {
"description": "SpiffeID defines a matcher configuration for SpiffeID matching",
"properties": {
"type": {
"description": "Type defines how to match incoming traffic by SpiffeID. `Exact` or `Prefix` are allowed.",
"enum": [
"Exact",
"Prefix"
],
"type": "string"
},
"value": {
"description": "Value is SpiffeID of a client that needs to match for the configuration to be applied",
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
},
"required": [
"default"
],
"type": "object"
},
"type": "array"
},
"targetRef": {
"description": "TargetRef is a reference to the resource the policy takes an effect on.\nThe resource could be either a real store object or virtual resource\ndefined inplace.",
"properties": {
"kind": {
"description": "Kind of the referenced resource",
"enum": [
"Mesh",
"MeshSubset",
"MeshGateway",
"MeshService",
"MeshExternalService",
"MeshMultiZoneService",
"MeshServiceSubset",
"MeshHTTPRoute",
"Dataplane"
],
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Labels are used to select group of MeshServices that match labels. Either Labels or\nName and Namespace can be used.",
"type": "object"
},
"mesh": {
"description": "Mesh is reserved for future use to identify cross mesh resources.",
"type": "string"
},
"name": {
"description": "Name of the referenced resource. Can only be used with kinds: `MeshService`,\n`MeshServiceSubset` and `MeshGatewayRoute`",
"type": "string"
},
"namespace": {
"description": "Namespace specifies the namespace of target resource. If empty only resources in policy namespace\nwill be targeted.",
"type": "string"
},
"proxyTypes": {
"description": "ProxyTypes specifies the data plane types that are subject to the policy. When not specified,\nall data plane types are targeted by the policy.",
"items": {
"enum": [
"Sidecar",
"Gateway"
],
"type": "string"
},
"type": "array"
},
"sectionName": {
"description": "SectionName is used to target specific section of resource.\nFor example, you can target port from MeshService.ports[] by its name. Only traffic to this port will be affected.",
"type": "string"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"description": "Tags used to select a subset of proxies by tags. Can only be used with kinds\n`MeshSubset` and `MeshServiceSubset`",
"type": "object"
}
},
"required": [
"kind"
],
"type": "object"
}
},
"type": "object"
}
더 알아보기 (Learn more)
이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.