Skip to content

Commit

Permalink
Merge pull request #116 from Kuadrant/dev-testing-env
Browse files Browse the repository at this point in the history
Updating Dev testing env
  • Loading branch information
didierofrivia authored Oct 25, 2024
2 parents fcff575 + 1f8f580 commit 9b6766f
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 74 deletions.
13 changes: 5 additions & 8 deletions e2e/remote-address/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ The Wasm configuration defines a set of rules for `*.example.com`.
"hostnames": [
"*.example.com"
],
"matches": [
{
"selector": "source.remote_address",
"operator": "neq",
"value": "50.0.0.1"
}
"predicates": [
"source.remote_address != 50.0.0.1"
]
},
"actions": [
Expand All @@ -32,8 +28,9 @@ The Wasm configuration defines a set of rules for `*.example.com`.
"scope": "ratelimit-source",
"data": [
{
"selector": {
"selector": "source.remote_address"
"expression": {
"key": "source.remote_address",
"value": "source.remote_address"
}
}
]
Expand Down
13 changes: 5 additions & 8 deletions e2e/remote-address/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,8 @@ static_resources:
"hostnames": [
"*.example.com"
],
"matches": [
{
"selector": "source.remote_address",
"operator": "neq",
"value": "50.0.0.1"
}
"predicates": [
"source.remote_address != '50.0.0.1'"
]
},
"actions": [
Expand All @@ -71,8 +67,9 @@ static_resources:
"scope": "ratelimit-source",
"data": [
{
"selector": {
"selector": "source.remote_address"
"expression": {
"key": "source.remote_address",
"value": "source.remote_address"
}
}
]
Expand Down
8 changes: 8 additions & 0 deletions utils/deploy/authconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ spec:
"identity":
json:
properties:
"anonymous":
value: false
"userid":
selector: auth.identity.metadata.annotations.secret\.kuadrant\.io/user-id
"user_group":
value: "the authentic"
"answer":
value: 42
"missing":
value: null
---
apiVersion: v1
kind: Secret
Expand Down
80 changes: 22 additions & 58 deletions utils/deploy/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,8 @@ data:
"hostnames": [
"*.a.auth.com"
],
"matches": [
{
"selector": "request.path",
"operator": "eq",
"value": "/get"
}
"predicates": [
"request.path == '/get'"
]
},
"actions": [
Expand Down Expand Up @@ -198,12 +194,8 @@ data:
"hostnames": [
"*.b.rlp.com"
],
"matches": [
{
"selector": "request.url_path",
"operator": "startswith",
"value": "/unknown-path"
}
"predicates": [
"request.url_path.startsWith('/unknown-path')"
]
},
"actions": [
Expand All @@ -212,7 +204,7 @@ data:
"scope": "rlp-ns-B/rlp-name-B",
"data": [
{
"static": {
"expression": {
"key": "rlp-ns-B/rlp-name-B/limit-not-to-be-activated",
"value": "1"
}
Expand All @@ -227,22 +219,10 @@ data:
"hostnames": [
"*.c.rlp.com"
],
"matches": [
{
"selector": "request.url_path",
"operator": "startswith",
"value": "/get"
},
{
"selector": "request.host",
"operator": "eq",
"value": "test.c.rlp.com"
},
{
"selector": "request.method",
"operator": "eq",
"value": "GET"
}
"predicates": [
"request.url_path.startsWith('/get')",
"request.host == 'test.c.rlp.com'",
"request.method == 'GET'"
]
},
"actions": [
Expand All @@ -251,7 +231,7 @@ data:
"scope": "rlp-ns-C/rlp-name-C",
"data": [
{
"static": {
"expression": {
"key": "limit_to_be_activated",
"value": "1"
}
Expand Down Expand Up @@ -282,12 +262,8 @@ data:
"hostnames": [
"*.d.rlp.com"
],
"matches": [
{
"selector": "source.remote_address",
"operator": "neq",
"value": "50.0.0.1"
}
"predicates": [
"source.remote_address != '50.0.0.1'"
]
},
"actions": [
Expand Down Expand Up @@ -318,12 +294,8 @@ data:
"hostnames": [
"*.a.multi.com"
],
"matches": [
{
"selector": "request.path",
"operator": "eq",
"value": "/get"
}
"predicates": [
"request.path == '/get'"
]
},
"actions": [
Expand All @@ -336,9 +308,9 @@ data:
"scope": "multi-ns-A/multi-name-A",
"data": [
{
"selector": {
"selector": "filter_state.wasm\\.kuadrant\\.identity\\.userid",
"key": "user_id"
"expression": {
"key": "user_id",
"value": "auth.identity.userid"
}
}
]
Expand All @@ -351,12 +323,8 @@ data:
"hostnames": [
"*.b.multi.com"
],
"matches": [
{
"selector": "request.path",
"operator": "eq",
"value": "/get"
}
"predicates": [
"request.path == '/get'"
]
},
"actions": [
Expand All @@ -367,16 +335,12 @@ data:
{
"service": "limitador",
"scope": "multi-ns-B/multi-name-B",
"conditions": [
{
"selector": "filter_state.wasm\\.kuadrant\\.identity\\.userid",
"operator": "eq",
"value": "alice"
}
"predicates": [
"auth.identity.userid == 'alice'"
],
"data": [
{
"static": {
"expression": {
"key": "user_id",
"value": "alice"
}
Expand Down

0 comments on commit 9b6766f

Please sign in to comment.