Skip to content

Commit

Permalink
still need to make secure pass
Browse files Browse the repository at this point in the history
  • Loading branch information
missylbytes committed Jun 7, 2023
1 parent 81f0180 commit e09ccc1
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
8 changes: 3 additions & 5 deletions acceptance/tests/api-gateway/api_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func TestAPIGateway_Basic(t *testing.T) {
// check that intentions keep our connection from happening
k8s.CheckStaticServerHTTPConnectionFailing(t, k8sOptions, StaticClientName, targetAddress)

k8s.CheckStaticServerConnectionFailing(t, k8sOptions, StaticClientName, targetAddress+":8181")
//k8s.CheckStaticServerConnectionFailing(t, k8sOptions, StaticClientName, targetAddress+":8181")

// Now we create the allow intention.
_, _, err = consulClient.ConfigEntries().Set(&api.ServiceIntentionsConfigEntry{
Expand All @@ -238,10 +238,8 @@ func TestAPIGateway_Basic(t *testing.T) {
logger.Log(t, "trying calls to api gateway http: ", targetAddress)
k8s.CheckStaticServerConnectionSuccessful(t, k8sOptions, StaticClientName, targetAddress)

logger.Log(t, "trying calls to api gateway tcp")
k8s.CheckStaticServerConnectionSuccessful(t, k8sOptions, StaticClientName, targetAddress+":81")

time.Sleep(10000 * time.Minute)
logger.Log(t, "trying calls to api gateway tcp, just want to make sure the connection is opened")
k8s.CheckStaticServerConnection(t, k8sOptions, StaticClientName, false, []string{"Received HTTP/0.9 when not allowed"}, "", targetAddress+":81")
})
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: static-server-tcp-openshift-anyuid
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:anyuid
subjects:
- kind: ServiceAccount
name: static-server-tcp
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ resources:
- deployment.yaml
- service.yaml
- serviceaccount.yaml
- servicedefaults.yaml
- servicedefaults.yaml
- psp-rolebinding.yaml
- anyuid-scc-rolebinding.yaml
- privileged-scc-rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: static-server-tcp-openshift-privileged
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:privileged
subjects:
- kind: ServiceAccount
name: static-server-tcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: static-server-tcp
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: test-psp
subjects:
- kind: ServiceAccount
name: static-server-tcp

0 comments on commit e09ccc1

Please sign in to comment.