mirror of https://github.com/hashicorp/consul
122 lines
3.6 KiB
Plaintext
122 lines
3.6 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": {
|
|
"googleRe2": {},
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/db$"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"googleRe2": {},
|
|
"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": {
|
|
"googleRe2": {},
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/api$"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"andIds": {
|
|
"ids": [
|
|
{
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"googleRe2": {},
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/[^/]+$"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"notId": {
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"googleRe2": {},
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/unsafe$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"consul-intentions-layer4-1": {
|
|
"permissions": [
|
|
{
|
|
"any": true
|
|
}
|
|
],
|
|
"principals": [
|
|
{
|
|
"authenticated": {
|
|
"principalName": {
|
|
"safeRegex": {
|
|
"googleRe2": {},
|
|
"regex": "^spiffe://test.consul/ns/default/dc/[^/]+/svc/web$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"statPrefix": "connect_authz"
|
|
}
|
|
}
|
|
]
|
|
} |