Skip to content

Commit 446feee

Browse files
committed
Update credential fixtures and verify router header validation
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
1 parent de11449 commit 446feee

6 files changed

Lines changed: 14 additions & 11 deletions

File tree

‎charts/substrate/templates/atenet-router.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ data:
9696
- path:
9797
pathPrefix: /
9898
policies: &substrate-ingress
99-
# Inspect every value before forwarding; substrateIngress reads only
100-
# the first actor header. Apply this to HTTP, gRPC, and CONNECT traffic.
99+
# Reject duplicates in both CONNECT and inner request headers, even
100+
# when actor selection uses only one of those header maps.
101101
directResponse:
102102
conditional:
103103
- condition: >-

‎cmd/ate-setup/internal/steps/overlay_test.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,11 @@ func TestRenderAgentgatewayStaticMTLS(t *testing.T) {
10031003
t.Fatalf("rendering static-mtls AgentGateway manifests: %v", err)
10041004
}
10051005
cm := agentgatewayRouterConfig(t, manifest)
1006+
for _, headerMap := range []string{"source.connectHeaders", "request.headers"} {
1007+
if !strings.Contains(cm.Data["config.yaml"], "size("+headerMap+".raw()['ate-target-actor']) != 1") {
1008+
t.Errorf("router config does not reject duplicate actor headers in %s", headerMap)
1009+
}
1010+
}
10061011
var gateway map[string]interface{}
10071012
if err := yaml.Unmarshal([]byte(cm.Data["config.yaml"]), &gateway); err != nil {
10081013
t.Fatalf("parsing rendered AgentGateway config: %v", err)

‎docs/egress-trust-bundle.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ bundle did the validating.
141141
the most likely cause is that your actor is not configured to trust the MITM
142142
CA correctly.
143143
* This CA configuration does not help the actor authenticate to the destination.
144-
For that, refer to our documentation on egress credential injection.
144+
For that, refer to our documentation on egress credential injection.
145145

146146
## See also
147147

‎internal/e2e/suites/credentials/credentials_test.go‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ func TestKubernetesCredentialInjection(t *testing.T) {
4040
if os.Getenv("E2E_CREDENTIAL_PROVIDER") == "" {
4141
t.Skip("requires credential E2E namespace grants and E2E_CREDENTIAL_PROVIDER=1")
4242
}
43-
env, err := e2e.CheckEnv("BUCKET_NAME", "KO_DOCKER_REPO")
44-
require.NoError(t, err)
4543
ctx := t.Context()
4644
clients := e2e.GetClients()
47-
namespace, template := e2e.DeployProbe(t, env["BUCKET_NAME"], "credentials")
48-
deniedAtespace, deniedTemplate := e2e.DeployProbe(t, env["BUCKET_NAME"], "credentials-denied")
45+
namespace, template := e2e.DeployProbe(t, "credentials")
46+
deniedAtespace, deniedTemplate := e2e.DeployProbe(t, "credentials-denied")
4947
otherNamespace := e2e.CreateNamespace(t).Name
5048

5149
for _, secret := range []struct{ namespace, name string }{

‎manifests/ate-install/components/agentgateway-static-mtls/configmap.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ data:
7070
- path:
7171
pathPrefix: /
7272
policies: &substrate-ingress
73-
# Inspect every value before forwarding; substrateIngress reads only
74-
# the first actor header. Apply this to HTTP, gRPC, and CONNECT traffic.
73+
# Reject duplicates in both CONNECT and inner request headers, even
74+
# when actor selection uses only one of those header maps.
7575
directResponse:
7676
conditional:
7777
- condition: >-

‎manifests/ate-install/components/agentgateway/configmap.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ data:
7777
- path:
7878
pathPrefix: /
7979
policies: &substrate-ingress
80-
# Inspect every value before forwarding; substrateIngress reads only
81-
# the first actor header. Apply this to HTTP, gRPC, and CONNECT traffic.
80+
# Reject duplicates in both CONNECT and inner request headers, even
81+
# when actor selection uses only one of those header maps.
8282
directResponse:
8383
conditional:
8484
- condition: >-

0 commit comments

Comments
 (0)