mirror of https://github.com/hashicorp/consul
116 lines
3.3 KiB
Plaintext
116 lines
3.3 KiB
Plaintext
{
|
|
"filters": [
|
|
{
|
|
"name": "envoy.filters.network.rbac",
|
|
"typedConfig": {
|
|
"@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC",
|
|
"rules": {
|
|
"action": "DENY",
|
|
"policies": {
|
|
"consul-intentions-layer4": {
|
|
"permissions": [
|
|
{
|
|
"any": true
|
|
}
|
|
],
|
|
"principals": [
|
|
{
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/db$"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/cron$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"statPrefix": "connect_authz"
|
|
}
|
|
},
|
|
{
|
|
"name": "envoy.filters.network.rbac",
|
|
"typedConfig": {
|
|
"@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC",
|
|
"rules": {
|
|
"policies": {
|
|
"consul-intentions-layer4-0": {
|
|
"permissions": [
|
|
{
|
|
"any": true
|
|
}
|
|
],
|
|
"principals": [
|
|
{
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/api$"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"andIds": {
|
|
"ids": [
|
|
{
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/[^/]+$"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"notId": {
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/unsafe$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"consul-intentions-layer4-1": {
|
|
"permissions": [
|
|
{
|
|
"any": true
|
|
}
|
|
],
|
|
"principals": [
|
|
{
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/web$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"statPrefix": "connect_authz"
|
|
}
|
|
}
|
|
]
|
|
} |