Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Dev testing env #116

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this would work, this also changed the type tho! It's now int(1) ... but will be erased and will be 1, just as if you had it as "\"1\"" in there, which would be closer semantically to what this was before...

tl;dr not wrong, but... ;)

}
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
Loading