Skip to content

Commit 2adafa1

Browse files
authored
ports: use high ports, advertise http/3 port as 443 (#1101)
1 parent 9c07889 commit 2adafa1

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

cmd/all_in_one.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
validate "github.com/go-playground/validator/v10"
1313
"github.com/spf13/cobra"
14+
"github.com/volatiletech/null/v9"
1415
"golang.org/x/sync/errgroup"
1516
"google.golang.org/grpc"
1617
"google.golang.org/protobuf/proto"
@@ -114,8 +115,8 @@ func (s *allCmd) setupFlags() error {
114115
flags.BoolVar(&s.debugEnvoy, debugEnvoy, false, "enable debug logging for envoy")
115116
flags.StringVar(&s.metricsBindAddress, metricsBindAddress, "", "host:port for aggregate metrics. host is mandatory")
116117
flags.StringVar(&s.adminBindAddr, debugAdminBindAddr, "", "host:port for admin server")
117-
flags.StringVar(&s.serverAddr, "server-addr", ":443", "the address the HTTPS server would bind to")
118-
flags.StringVar(&s.httpRedirectAddr, "http-redirect-addr", ":80", "the address HTTP redirect would bind to")
118+
flags.StringVar(&s.serverAddr, "server-addr", ":8443", "the address the HTTPS server would bind to")
119+
flags.StringVar(&s.httpRedirectAddr, "http-redirect-addr", ":8080", "the address HTTP redirect would bind to")
119120
flags.StringVar(&s.deriveTLS, "databroker-auto-tls", "", "enable auto TLS and generate server certificate for the domain")
120121
flags.DurationVar(&s.configControllerShutdownTimeout, configControllerShutdown, time.Second*30, "timeout waiting for graceful config controller shutdown")
121122

@@ -265,6 +266,7 @@ func (s *allCmdParam) makeBootstrapConfig(opt allCmdOptions) error {
265266
s.cfg.Options.LogLevel = "debug"
266267
}
267268
s.cfg.Options.EnvoyAdminAddress = opt.adminBindAddr
269+
s.cfg.Options.HTTP3AdvertisePort = null.NewUint32(443, true)
268270

269271
return nil
270272
}

config/pomerium/deployment/no-root.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ spec:
77
spec:
88
securityContext:
99
runAsNonRoot: true
10-
sysctls:
11-
- name: net.ipv4.ip_unprivileged_port_start
12-
value: "80"
1310
containers:
1411
- name: pomerium
1512
securityContext:

config/pomerium/deployment/ports.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ spec:
88
containers:
99
- name: pomerium
1010
ports:
11-
- containerPort: 443
11+
- containerPort: 8443
1212
name: https
1313
protocol: TCP
1414
- containerPort: 443
1515
name: quic
1616
protocol: UDP
1717
- name: http
18-
containerPort: 80
18+
containerPort: 8080
1919
protocol: TCP
2020
- name: metrics
2121
containerPort: 9090

deployment.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -770,13 +770,13 @@ spec:
770770
imagePullPolicy: Always
771771
name: pomerium
772772
ports:
773-
- containerPort: 443
773+
- containerPort: 8443
774774
name: https
775775
protocol: TCP
776776
- containerPort: 443
777777
name: quic
778778
protocol: UDP
779-
- containerPort: 80
779+
- containerPort: 8080
780780
name: http
781781
protocol: TCP
782782
- containerPort: 9090
@@ -805,9 +805,6 @@ spec:
805805
kubernetes.io/os: linux
806806
securityContext:
807807
runAsNonRoot: true
808-
sysctls:
809-
- name: net.ipv4.ip_unprivileged_port_start
810-
value: "80"
811808
serviceAccountName: pomerium-controller
812809
terminationGracePeriodSeconds: 10
813810
volumes:

go.mod

+5-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ require (
1717
github.com/iancoleman/strcase v0.3.0
1818
github.com/martinlindhe/base36 v1.1.1
1919
github.com/open-policy-agent/opa v1.1.0
20-
github.com/pomerium/pomerium v0.28.1-0.20250127214108-332d3dc3345e
20+
github.com/pomerium/csrf v1.7.0
21+
github.com/pomerium/pomerium v0.28.1-0.20250204182906-81a52db74940
2122
github.com/rs/zerolog v1.33.0
2223
github.com/sergi/go-diff v1.3.1
2324
github.com/spf13/cobra v1.8.1
2425
github.com/spf13/pflag v1.0.6
2526
github.com/spf13/viper v1.19.0
2627
github.com/stretchr/testify v1.10.0
28+
github.com/volatiletech/null/v9 v9.0.0
2729
go.uber.org/mock v0.5.0
2830
go.uber.org/zap v1.27.0
2931
golang.org/x/sync v0.10.0
@@ -89,6 +91,7 @@ require (
8991
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
9092
github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
9193
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
94+
github.com/exaring/otelpgx v0.8.0 // indirect
9295
github.com/fatih/color v1.18.0 // indirect
9396
github.com/felixge/httpsnoop v1.0.4 // indirect
9497
github.com/fsnotify/fsnotify v1.8.0 // indirect
@@ -158,7 +161,6 @@ require (
158161
github.com/pkg/errors v0.9.1 // indirect
159162
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
160163
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
161-
github.com/pomerium/csrf v1.7.0 // indirect
162164
github.com/pomerium/datasource v0.18.2-0.20221108160055-c6134b5ed524 // indirect
163165
github.com/pomerium/envoy-custom v1.32.4-0.20250114182541-6f6d2147bea6 // indirect
164166
github.com/pomerium/protoutil v0.0.0-20240813175624-47b7ac43ff46 // indirect
@@ -184,13 +186,13 @@ require (
184186
github.com/tklauser/go-sysconf v0.3.14 // indirect
185187
github.com/tklauser/numcpus v0.8.0 // indirect
186188
github.com/tniswong/go.rfcx v0.0.0-20181019234604-07783c52761f // indirect
187-
github.com/volatiletech/null/v9 v9.0.0 // indirect
188189
github.com/x448/float16 v0.8.4 // indirect
189190
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
190191
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
191192
github.com/yashtewari/glob-intersection v0.2.0 // indirect
192193
github.com/yusufpapurcu/wmi v1.2.4 // indirect
193194
github.com/zeebo/blake3 v0.2.4 // indirect
195+
github.com/zeebo/xxh3 v1.0.2 // indirect
194196
go.opencensus.io v0.24.0 // indirect
195197
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
196198
go.opentelemetry.io/contrib/detectors/gcp v1.32.0 // indirect

go.sum

+4-2
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ
205205
github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
206206
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
207207
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
208+
github.com/exaring/otelpgx v0.8.0 h1:uqoDIW9qKkyz479z2cGrmJ8OJypydyEA+xwey4ukvNo=
209+
github.com/exaring/otelpgx v0.8.0/go.mod h1:ANkRZDfgfmN6yJS1xKMkshbnsHO8at5sYwtVEYOX8hc=
208210
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
209211
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
210212
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
@@ -539,8 +541,8 @@ github.com/pomerium/datasource v0.18.2-0.20221108160055-c6134b5ed524 h1:3YQY1sb5
539541
github.com/pomerium/datasource v0.18.2-0.20221108160055-c6134b5ed524/go.mod h1:7fGbUYJnU8RcxZJvUvhukOIBv1G7LWDAHMfDxAf5+Y0=
540542
github.com/pomerium/envoy-custom v1.32.4-0.20250114182541-6f6d2147bea6 h1:QLVgpx23jcbgR9qJzIicJ+uXGjQXO0GAy55SCo0Jd9o=
541543
github.com/pomerium/envoy-custom v1.32.4-0.20250114182541-6f6d2147bea6/go.mod h1:afbaKE6YfshVUOrYc6XWUWfZcXencWmi1jTc00ki0Oo=
542-
github.com/pomerium/pomerium v0.28.1-0.20250127214108-332d3dc3345e h1:7MqaUPUOpZW8bBLPSAlwK9RTGEVjnxQ3ErT3lx3syQk=
543-
github.com/pomerium/pomerium v0.28.1-0.20250127214108-332d3dc3345e/go.mod h1:ujclJDq2BGZuSe2/9Lz2w4MpTVIR8DrR05qyjk1OcsU=
544+
github.com/pomerium/pomerium v0.28.1-0.20250204182906-81a52db74940 h1:Gi6ZFj2KUoI71thjzNKH4y13ip4LPLjABTQN+33P9IY=
545+
github.com/pomerium/pomerium v0.28.1-0.20250204182906-81a52db74940/go.mod h1:8Uf1ya/wSjJyeUo5X4TqctlrYxbc5iPfFG18x1t0Deo=
544546
github.com/pomerium/protoutil v0.0.0-20240813175624-47b7ac43ff46 h1:NRTg8JOXCxcIA1lAgD74iYud0rbshbWOB3Ou4+Huil8=
545547
github.com/pomerium/protoutil v0.0.0-20240813175624-47b7ac43ff46/go.mod h1:QqZmx6ZgPxz18va7kqoT4t/0yJtP7YFIDiT/W2n2fZ4=
546548
github.com/pomerium/webauthn v0.0.0-20240603205124-0428df511172 h1:TqoPqRgXSHpn+tEJq6H72iCS5pv66j3rPprThUEZg0E=

0 commit comments

Comments
 (0)