Commit graph

868 commits

Author SHA1 Message Date
Caleb Doxsey
0e258a9ed4 wip 2025-02-10 13:04:27 -07:00
Joe Kralicky
c8323ba744
tracing: handle empty protocol (#5474) 2025-02-06 13:19:50 -05:00
Caleb Doxsey
dc9a6bdb81
replace xxhash with xxh3 (#5457)
* update config file paths hash

* update filemgr

* use xxh3 for hashutil.Hash

* update hashutil digest, fix trace buffer test

* update comments

* update namegen, go mod tidy
2025-01-31 08:44:08 -07:00
Joe Kralicky
5e94b2f8f1
Refactor trace config to match supported otel options (#5447)
* Refactor trace config to match supported otel options

* use duration instead of int64 for otel timeouts

* change 'trace client updated' log level to debug
2025-01-30 11:59:19 -05:00
Joe Kralicky
b5f58997bd
storage/postgres: pgx client tracing (#5438)
* fix testcontainers docker client using the global tracer provider

* storage/postgres: pgx client tracing

* skip postgres test on macos
2025-01-28 17:10:09 -05:00
Kenneth Jenkins
b0f89fc688
authorize: log JWT groups filtering (#5432)
Add a new Authorize Log Fields option for logging the number of groups
removed during JWT groups filtering. This will be enabled by default.

Additionally, when the log level is Debug (or more verbose), store and
log the IDs of any groups removed during JWT groups filtering.
2025-01-27 12:11:52 -08:00
Joe Kralicky
c307ca806a
fix testcontainers docker client using the global tracer provider (#5440) 2025-01-24 14:55:21 -05:00
Joe Kralicky
6ea51149f9
tracing: adjust envoy otel trace batching settings to match go sdk (#5446) 2025-01-24 14:51:07 -05:00
Caleb Doxsey
6e1fabec0b
authorize: cache warming (#5439)
* authorize: cache warming

* add Authorize to test?

* remove tracing querier

* only update connection when it changes
2025-01-22 09:27:22 -07:00
Joe Kralicky
b674d5c19d
Fix small timeout causing test flake (#5436) 2025-01-21 14:31:34 -05:00
Joe Kralicky
396c35b6b4
New tracing system (#5388)
* update tracing config definitions

* new tracing system

* performance improvements

* only configure tracing in envoy if it is enabled in pomerium

* [tracing] refactor to use custom extension for trace id editing (#5420)

refactor to use custom extension for trace id editing

* set default tracing sample rate to 1.0

* fix proxy service http middleware

* improve some existing auth related traces

* test fixes

* bump envoyproxy/go-control-plane

* code cleanup

* test fixes

* Fix missing spans for well-known endpoints

* import extension apis from pomerium/envoy-custom
2025-01-21 13:26:32 -05:00
Joe Kralicky
8f36870650
testenv: embedded envoy cpu/memory profiling config (#5377) 2025-01-03 17:41:54 -05:00
Caleb Doxsey
b3d2ef95e7
fix redirect server proxy protocol (#5405) 2024-12-23 05:37:11 -07:00
Kenneth Jenkins
247cd175fe
metrics: restore global registry in unit tests (#5399)
Currently there appears to be a test order dependency between a couple
of the info_test.go test cases and the Test_PrometheusHandler test. This
can be exposed by running:

  go test -count 2 ./internal/telemetry/metrics

The test cases in info_test.go overwrite the global 'registry' variable,
which seems to prevent Test_PrometheusHandler from being able to export
the internal Go metrics. Add a helper method to restore the original
registry after these test cases.
2024-12-18 13:21:06 -08:00
Kenneth Jenkins
69cb6f53de
metrics: make sure to flush buffered writer (#5398)
The writeMetricsMux() method instantiates a buffered writer but does not
call Flush() after it is done writing. As a result the metrics output
may be incomplete.
2024-12-18 12:50:12 -08:00
Joe Kralicky
ecd2855dcc
add options to adjust databroker lease ttl, and retry initial interval (#5391) 2024-12-13 14:01:43 -05:00
Joe Kralicky
f876e2f31d
registry: fix reporter client context on config change (#5392) 2024-12-13 14:01:34 -05:00
Caleb Doxsey
71bcb4f28e
UDP support (#5390) 2024-12-11 13:07:31 -07:00
Denis Mishin
699679bc57
core/metrics: improve memory usage (#5364) 2024-12-03 11:17:34 -05:00
Joe Kralicky
39e789529e
testenv: avoid dns lookups for *.localhost.pomerium.io (#5372)
* testenv: avoid dns lookups for localhost.pomerium.io

* linter pass
2024-12-02 12:29:15 -05:00
Caleb Doxsey
3a8bdde211
authorize: remove wait for ready (#5376) 2024-11-22 10:17:00 -07:00
Joe Kralicky
3e51b4f905
testenv: configure metrics address (#5368) 2024-11-07 15:42:08 -05:00
Joe Kralicky
135e737d7c
testenv: add Pause() method (#5367) 2024-11-07 15:41:59 -05:00
Joe Kralicky
177f789e63
change Policy.Matches to accept a URL pointer (#5360) 2024-11-07 14:55:44 -05:00
Joe Kralicky
9cd5fe4e25
testenv: Add utility to pause/resume profiling (#5361) 2024-11-07 14:55:33 -05:00
Joe Kralicky
ebd9eea30e
Optimize Policy RouteID (#5359) 2024-11-06 12:31:52 -05:00
Joe Kralicky
526e2a58d6
New integration test fixtures (#5233)
* Initial test environment implementation

* linter pass

* wip: update request latency test

* bugfixes

* Fix logic race in envoy process monitor when canceling context

* skip tests using test environment on non-linux
2024-11-05 14:31:40 -05:00
Caleb Doxsey
8935ed17fa
tests: use testcontainers (#5341)
* tests: use testcontainers for postgres

* tests: use testcontainers for minio

* remove gcs test

* try installing docker

* skip docker on macos
2024-10-30 13:33:30 -06:00
Joe Kralicky
fe31799eb5
Fix many instances of contexts and loggers not being propagated (#5340)
This also replaces instances where we manually write "return ctx.Err()"
with "return context.Cause(ctx)" which is functionally identical, but
will also correctly propagate cause errors if present.
2024-10-25 14:50:56 -04:00
Joe Kralicky
5464cda90e
Add an 'issuer' field to the /.well-known/pomerium endpoint (#5344)
The field contains the route's base uri, including the https:// scheme
and ending with a trailing slash.
2024-10-25 13:07:57 -04:00
Caleb Doxsey
d2c14cd6d2
logging: remove ctx from global log methods (#5337)
* log: remove warn

* log: update debug

* log: update info

* remove level, log

* remove contextLogger function
2024-10-23 14:18:52 -06:00
Caleb Doxsey
075ea01b0a
core/config: allow websockets and spdy by default for k8s urls (#5325) 2024-10-10 17:55:34 -06:00
Joe Kralicky
0e13248685
Core-Zero Import (#5288)
* initial core-zero import implementation

* Update /config/import openapi description and use PUT instead of POST

* update import ui tests

* Add 413 as a possible response for /config/import

* Options/Settings type conversion tests and related bugfixes

* Fixes for proto type conversion and tests

* Update core-zero import client

* Update core-zero import client

* Update import api and environment detection

* update go.mod

* remove old testdata

* Remove usage of deleted setting after merge

* remove extra newline from --version output
2024-10-09 18:51:56 -04:00
Joe Kralicky
da866c1ac0
Fix race condition in databroker restart test (#5320) 2024-10-07 18:48:05 -04:00
Kenneth Jenkins
6f6186a67d
databroker: remove unused serverConfig fields (#5314)
The databroker.serverConfig struct has a few fields which are written
to but never read.
2024-10-04 12:04:59 -07:00
Caleb Doxsey
410354bc00
core/go: use hashicorp/go-set (#5278) 2024-10-03 12:59:11 -06:00
cui fliter
105743be37
refactor: Directly swap variable values (#5305)
Signed-off-by: cuishuang <imcusg@gmail.com>
2024-10-03 10:10:29 -07:00
Caleb Doxsey
bfc782ff06
core/zero: add pseudonymization key (#5290) 2024-09-19 14:43:01 -06:00
Kenneth Jenkins
6171c09596
config: remove unused databroker storage settings (#5285)
Config options concerning the TLS connection from databroker to storage
backend are now unused. TLS options for this connection can instead be
set directly in the databroker storage connection string.
2024-09-16 11:58:57 -07:00
Caleb Doxsey
10e1746471
core/authorize: remove default header logging in debug (#5287) 2024-09-13 13:04:33 -06:00
Kenneth Jenkins
c96d5283e2
zero: log organization and cluster IDs on startup (#5284) 2024-09-13 09:32:15 -07:00
Caleb Doxsey
146efc1b13
core/zero: add usage reporter (#5281)
* wip

* add response

* handle empty email

* use set, update log

* add test

* add coalesce, comments, test

* add test, fix bug

* use builtin cmp.Or

* remove wait ready call

* use api error
2024-09-12 15:45:54 -06:00
Caleb Doxsey
790c11b368
core/zero: add organization id and cluster id to bootstrap config (#5275) 2024-09-10 11:31:45 -06:00
Caleb Doxsey
dad954ae16
core/logging: change log.Error function (#5251)
* core/logging: change log.Error function

* use request id
2024-09-05 15:42:46 -06:00
Denis Mishin
ce12e51cf5
zero/api: reset token and url cache if 401 is received (#5256)
zero/api: reset token cache if 401 is received
2024-09-03 15:40:28 -04:00
Joe Kralicky
d149b2d178
zero: generate error methods for response types (#5252) 2024-08-30 16:21:43 -04:00
Caleb Doxsey
d062f9d68d
core/logs: remove warnings (#5235)
* core/logs: remove warnings

* switch to error
2024-08-27 09:38:50 -06:00
Caleb Doxsey
98cea10421
Revert "core/grpc: add IterateAll method" (#5234)
Revert "core/grpc: add IterateAll method (#5227)"

This reverts commit 3961098681.
2024-08-23 10:35:46 -06:00
Denis Mishin
99d7a73cef
zero/bundle-download: update metadata (#5212)
* zero/download: refresh metadata

* fix cmp
2024-08-22 16:18:17 -04:00
Denis Mishin
0503b41108
zero/connect: add re-run health checks command (#5219)
* zero/connect: add run health checks and shutdown commands

* fix proto

* trigger re-run on command

* add handler

* rename runPeriodicHealthChecksLeased
2024-08-22 16:17:53 -04:00