Commit graph

69 commits

Author SHA1 Message Date
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
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
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
Caleb Doxsey
410354bc00
core/go: use hashicorp/go-set (#5278) 2024-10-03 12:59:11 -06:00
Caleb Doxsey
bfc782ff06
core/zero: add pseudonymization key (#5290) 2024-09-19 14:43:01 -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
Denis Mishin
6e766233c7
zero/health-checks: fix early checks sometimes missing (#5229)
* zero/health-checks: fix early checks sometimes missing

* rm closure

* fix test
2024-08-20 22:13:45 -04:00
Caleb Doxsey
3961098681
core/grpc: add IterateAll method (#5227)
* core/grpc: add IterateAll method

* Update pkg/grpc/databroker/generic.go

Co-authored-by: Denis Mishin <dmishin@pomerium.com>

---------

Co-authored-by: Denis Mishin <dmishin@pomerium.com>
2024-08-20 09:34:26 -06:00
Denis Mishin
15dc77e19d
connect/client: ignore unknown message types (#5223) 2024-08-16 16:33:06 -04:00
Joe Kralicky
332932b7a8
Replace usages of x/exp/maps + bump golang.org/x/exp (#5221)
Bump golang.org/x/exp; replace usages of x/exp/maps with stdlib equivalents
2024-08-15 17:49:24 -04:00
Denis Mishin
09f1585b01
zero/cmd: make it more evident what caused shutdown (#5209) 2024-08-06 15:10:58 -04:00
Kenneth Jenkins
42a975ce44
zero: set fixed start time for active users test (#5154) 2024-06-26 17:29:36 -07:00
Denis Mishin
a7dd30ad29
zero/telemetry: add hostname and version (#5146) 2024-06-24 21:33:37 -04:00
Denis Mishin
8d206e0087
zero/telemetry: collect limited core metrics (#5142) 2024-06-18 19:15:11 -04:00
Denis Mishin
c1dec06afa
zero/telemetry: internal envoy stats scraper and metrics producer (#5136) 2024-06-16 20:41:05 -04:00
Denis Mishin
114f730dba
zero: refactor telemetry and controller (#5135)
* zero: refactor controller

* refactor zero telemetry and controller

* wire with connect handler

* cr
2024-06-12 21:59:25 -04:00
Denis Mishin
cc636be707
zero: refactor controller (#5134) 2024-06-12 16:31:42 -04:00
Denis Mishin
e12532ba52
zero/connect: add telemetry request command (#5131)
* zero/connect: add telemetry request command

* rm relabeling
2024-06-10 22:54:02 -04:00
Joe Kralicky
de603f87de
Add new configurable bootstrap writers (#2405) (#5114)
* Add new configurable bootstrap writers (#2405)

This PR adds the ability to configure different backends to use for
storing modifications to the zero bootstrap config. The two currently
implemented backends allow writing changes to a file or to a Kubernetes
secret. Backend selection is determined by the scheme in a URI passed to
the flag '--config-writeback-uri'.

In a Kubernetes environment, where the bootstrap config is mounted into
the pod from a secret, this option allows Pomerium to write changes back
to the secret, as writes to the mounted secret file on disk are not
persisted.

* Use env vars for bootstrap config filepath/writeback uri

* linter pass and code cleanup

* Add new config writer options mechanism

This moves the encryption cipher parameter out of the WriteConfig()
method in the ConfigWriter interface and into a new ConfigWriterOptions
struct. Options (e.g. cipher) can be applied to an existing ConfigWriter
to allow customizing implementation-specific behavior.

* Code cleanup/lint fixes

* Move vendored k8s code into separate package, and add license header and package comment
2024-05-31 12:26:17 -04:00
Denis Mishin
8269a723ec
health-checks: zero route availability improvements (#5111) 2024-05-17 16:47:27 -04:00
Caleb Doxsey
1a5b8b606f
core/lint: upgrade golangci-lint, replace interface{} with any (#5099)
* core/lint: upgrade golangci-lint, replace interface{} with any

* regen proto
2024-05-02 14:33:52 -06:00
Denis Mishin
614048ae9c
health-checks: add route reachability (#5093)
* health-checks: add route reachability

* rm tls check bypass
2024-05-02 13:31:48 -04:00
Denis Mishin
df67fb7086
connect: add health check (#5086) 2024-04-26 11:56:36 -04:00
Denis Mishin
2da4801d3a
zero: add user-agent to requests (#5078) 2024-04-19 11:33:43 -04:00
Denis Mishin
deb6f67094
healthcheck: only report transitions (#5068) 2024-04-16 13:15:18 -04:00
Caleb Doxsey
ed378af744
core/zero: lower log level (#5065) 2024-04-11 15:31:25 -06:00
Denis Mishin
dc7820ea3e
zero/healthchecks: add checks for ability to save bootstrap parameter and bundle status reporting (#5064) 2024-04-11 10:47:52 -04:00
Denis Mishin
991fca496c
healthcheck: add common package, zero reporter and first xds check (#5059) 2024-04-10 15:21:39 -04:00
Caleb Doxsey
4ac06d3bbd
core/logging: less verbose logs (#5040) 2024-03-29 15:26:20 -06:00
Denis Mishin
d20e99ca8c
zero: fix bootstrap config path (#5035) 2024-03-21 20:39:52 -04:00
Denis Mishin
4193583301
zero: add service accounts support (#5031)
* zero: add service accounts support

* quit on terminal errors
2024-03-20 17:03:03 -04:00
Caleb Doxsey
67d1362a90
core/zero: fix ticker usage (#4969) 2024-03-06 14:28:21 -07:00
Denis Mishin
d405a53b90
zero: simplify control loop lease retry code (#4979)
zero: simplify lease control loop
2024-03-01 11:36:08 -05:00
Denis Mishin
2db2bd09a1
connect: add gRPC keep-alive (#4961) 2024-02-13 18:26:14 -05:00
Denis Mishin
7edd538be7
zero/bootstrap: reset back to inmem databroker if connection string is empty (#4955) 2024-02-05 20:15:33 -05:00
Denis Mishin
3ca2f2462d
zero/reconciler: remove unused changeset code (#4915) 2024-01-24 19:21:34 -05:00
Denis Mishin
07d608792f
zero: group funcs that need run within a lease (#4862) 2023-12-21 11:41:41 -05:00
Denis Mishin
faa2a8652b
zero/telemetry: add reporter (#4855) 2023-12-20 14:53:06 -05:00
Caleb Doxsey
d6221c07ce
core/config: remove debug option, always use json logs (#4857)
* core/config: remove debug option, always use json logs

* go mod tidy
2023-12-15 11:29:05 -07:00
Caleb Doxsey
ddc9d957ba
core/ci: fix linting issues (#4856) 2023-12-14 10:47:13 -07:00