Skip to content

Commit

Permalink
mutual-auth: Update the wording
Browse files Browse the repository at this point in the history
Relates: cilium/cilium#24867
Signed-off-by: Tam Mach <[email protected]>
  • Loading branch information
sayboras committed Jun 2, 2023
1 parent 44ae187 commit a40253c
Show file tree
Hide file tree
Showing 179 changed files with 10,308 additions and 2,590 deletions.
6 changes: 3 additions & 3 deletions connectivity/check/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const (
FeatureCNP Feature = "cilium-network-policy"
FeatureKNP Feature = "k8s-network-policy"

FeatureAuthMTLSSpiffe Feature = "auth-mtls-spiffe"
FeatureAuthSpiffe Feature = "mutual-auth-spiffe"

FeatureIngressController Feature = "ingress-controller"

Expand Down Expand Up @@ -232,8 +232,8 @@ func (ct *ConnectivityTest) extractFeaturesFromConfigMap(ctx context.Context, cl
Enabled: cm.Data["enable-endpoint-routes"] == "true",
}

result[FeatureAuthMTLSSpiffe] = FeatureStatus{
Enabled: cm.Data["mesh-auth-mtls-enabled"] == "true",
result[FeatureAuthSpiffe] = FeatureStatus{
Enabled: cm.Data["mesh-auth-mutual-enabled"] == "true",
}

result[FeatureIngressController] = FeatureStatus{
Expand Down
4 changes: 2 additions & 2 deletions connectivity/manifests/echo-ingress-auth-fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ spec:
- ports:
- port: "8080"
protocol: TCP
auth:
type: always-fail
authentication:
mode: test-always-fail
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: auth-ingress
namespace: cilium-test
spec:
description: "Allow other client to contact echo after mTLS"
description: "Allow other client to contact echo after mutual authentication"
endpointSelector:
matchLabels:
kind: echo
Expand All @@ -17,5 +17,5 @@ spec:
- ports:
- port: "8080"
protocol: TCP
auth:
type: mtls-spiffe
authentication:
mode: required
16 changes: 8 additions & 8 deletions connectivity/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ var (
//go:embed manifests/echo-ingress-auth-fail.yaml
echoIngressAuthFailPolicyYAML string

//go:embed manifests/echo-ingress-mtls.yaml
echoIngressMTLSPolicyYAML string
//go:embed manifests/echo-ingress-mutual-authentication.yaml
echoIngressMutualAuthPolicyYAML string

//go:embed manifests/egress-gateway-policy.yaml
egressGatewayPolicyYAML string
Expand Down Expand Up @@ -929,11 +929,11 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, addExtraTests func(*ch
return check.ResultCurlHTTPError, check.ResultNone // if the header is not set the request will get a 401
})

// Test mTLS auth with always-fail
// Test mutual auth with always-fail
ct.NewTest("echo-ingress-auth-always-fail").WithCiliumPolicy(echoIngressAuthFailPolicyYAML).
// this test is only useful when auth is supported in the Cilium version and it is enabled
// currently this is tested my mtls-spiffe as that is the only functional auth method
WithFeatureRequirements(check.RequireFeatureEnabled(check.FeatureAuthMTLSSpiffe)).
// currently this is tested spiffe as that is the only functional auth method
WithFeatureRequirements(check.RequireFeatureEnabled(check.FeatureAuthSpiffe)).
WithScenarios(
tests.PodToPod(),
tests.PodToPodWithEndpoints(),
Expand All @@ -942,9 +942,9 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, addExtraTests func(*ch
return check.ResultDropCurlTimeout, check.ResultDropAuthRequired
})

// Test mTLS auth with SPIFFE
ct.NewTest("echo-ingress-auth-mtls-spiffe").WithCiliumPolicy(echoIngressMTLSPolicyYAML).
WithFeatureRequirements(check.RequireFeatureEnabled(check.FeatureAuthMTLSSpiffe)).
// Test mutual auth with SPIFFE
ct.NewTest("echo-ingress-mutual-auth-spiffe").WithCiliumPolicy(echoIngressMutualAuthPolicyYAML).
WithFeatureRequirements(check.RequireFeatureEnabled(check.FeatureAuthSpiffe)).
WithScenarios(
tests.PodToPod(),
tests.PodToPodWithEndpoints(),
Expand Down
42 changes: 23 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace
golang.org/x/exp v0.0.0-20230519143937-03e91628a987
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
golang.org/x/mod v0.10.0
google.golang.org/grpc v1.55.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
Expand All @@ -40,6 +40,9 @@ require (
require (
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
go.opentelemetry.io/otel/metric v1.16.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

Expand Down Expand Up @@ -87,7 +90,7 @@ require (
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/runtime v0.25.0 // indirect
github.com/go-openapi/runtime v0.26.0 // indirect
github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
Expand Down Expand Up @@ -145,35 +148,35 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect
github.com/pierrec/lz4/v4 v4.1.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
github.com/prometheus/client_golang v1.15.0 // indirect
github.com/prometheus/client_model v0.3.0
github.com/prometheus/client_golang v1.15.1 // indirect
github.com/prometheus/client_model v0.4.0
github.com/prometheus/common v0.42.0
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/rubenv/sql-migrate v1.3.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/shirou/gopsutil/v3 v3.23.2 // indirect
github.com/shirou/gopsutil/v3 v3.23.4 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/spf13/viper v1.16.0 // indirect
github.com/stretchr/testify v1.8.3
github.com/subosito/gotenv v1.4.2 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/vishvananda/netlink v1.2.1-beta.2.0.20220608195807-1a118fe229fc // indirect
github.com/vishvananda/netlink v1.2.1-beta.2.0.20230420174744-55c8b9515a01 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
Expand All @@ -185,19 +188,18 @@ require (
github.com/zmap/zcrypto v0.0.0-20210511125630-18f1e0152cfc // indirect
github.com/zmap/zlint/v3 v3.1.0 // indirect
go.mongodb.org/mongo-driver v1.11.4 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/term v0.7.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand All @@ -214,3 +216,5 @@ require (
sigs.k8s.io/kustomize/kyaml v0.14.1 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

replace github.com/cilium/cilium => ../cilium
Loading

0 comments on commit a40253c

Please sign in to comment.