Pomerium is an identity and context-aware access proxy.
Find a file
Caleb Doxsey 7a6d7c5a3c
config: use stable route ids for authorize matching and order xds responses (#5618)
## Summary
Update the `RouteID` to use the `policy.ID` if it is set. This makes it
so that updated routes use a stable identifier between updates so if the
envoy control plane is updated before the authorize service's internal
definitions (or vice-versa) the authorize service will still be able to
match the route.

The current behavior results in a 404 if envoy passes the old route id.
The new behavior will result in inconsistency, but it should be quickly
remedied. To help with debugging 4 new fields were added to the
authorize check log. The `route-id` and `route-checksum` as the
authorize sees it and the `envoy-route-id` and `envoy-route-checksum` as
envoy sees it.

I also updated the way we send updates to envoy to try and model their
recommended approach:

> In general, to avoid traffic drop, sequencing of updates should follow
a make before break model, wherein:
> 
> - CDS updates (if any) must always be pushed first.
> - EDS updates (if any) must arrive after CDS updates for the
respective clusters.
> - LDS updates must arrive after corresponding CDS/EDS updates.
> - RDS updates related to the newly added listeners must arrive after
CDS/EDS/LDS updates.
> - VHDS updates (if any) related to the newly added RouteConfigurations
must arrive after RDS updates.
> - Stale CDS clusters and related EDS endpoints (ones no longer being
referenced) can then be removed.

This should help avoid 404s when configuration is being updated.

## Related issues
-
[ENG-2386](https://linear.app/pomerium/issue/ENG-2386/large-number-of-routes-leads-to-404s-and-slowness)

## Checklist
- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-05-19 10:52:15 -06:00
.github chore(deps): bump the docker group in /.github with 3 updates (#5603) 2025-05-01 11:54:12 -06:00
.vscode use tlsClientConfig instead of custom dialer (#3830) 2022-12-27 09:55:36 -07:00
authenticate logging: standardize on hyphens in attribute names (#5577) 2025-04-22 10:57:19 -07:00
authorize config: use stable route ids for authorize matching and order xds responses (#5618) 2025-05-19 10:52:15 -06:00
changelogs add v0.29.0 release notes (#5515) 2025-04-08 11:34:20 -04:00
cmd/pomerium cleanup logs (#5571) 2025-04-14 08:20:10 -06:00
config config: use stable route ids for authorize matching and order xds responses (#5618) 2025-05-19 10:52:15 -06:00
databroker logging: standardize on hyphens in attribute names (#5577) 2025-04-22 10:57:19 -07:00
examples ci: address Dockerfile warnings (#5283) 2024-09-11 16:56:47 -07:00
integration upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
internal config: use stable route ids for authorize matching and order xds responses (#5618) 2025-05-19 10:52:15 -06:00
k8s/zero zero: set k8s deployment to follow :latest tag (#5313) 2024-10-03 11:39:55 -07:00
ospkg move directory providers (#3633) 2022-11-03 11:33:56 -06:00
pkg Fix typo in Seal comment (#5620) 2025-05-18 18:56:59 -07:00
proxy config: use stable route ids for authorize matching and order xds responses (#5618) 2025-05-19 10:52:15 -06:00
scripts proto: fix dependencies (#5450) 2025-01-27 14:41:08 -07:00
ui chore(deps): bump @babel/runtime from 7.24.4 to 7.26.10 in /ui (#5522) 2025-04-11 08:02:05 -06:00
.codecov.yml development: change codecov precision 2019-07-18 16:49:37 -07:00
.dockerignore frontend: react+mui (#3004) 2022-02-07 08:47:58 -07:00
.fossa.yml rm cli code (#2824) 2021-12-15 16:25:21 -05:00
.gitattributes assets: use embed instead of statik (#1960) 2021-03-03 18:56:55 -07:00
.gitignore core/ui: improve frontend build size (#5109) 2024-05-09 07:10:00 -06:00
.golangci.yml upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
.pre-commit-config.yaml integration: add single-cluster integration tests (#2516) 2021-08-24 15:35:05 -06:00
3RD-PARTY dependencies: vendor base58, remove shortuuid (#2739) 2021-11-02 09:23:15 -06:00
DEBUG.MD deplyoment: add debug build / container / docs (#1513) 2020-10-13 16:54:21 -04:00
Dockerfile chore(deps): bump the docker group with 2 updates (#5597) 2025-05-01 11:00:58 -06:00
Dockerfile.debug chore(deps): bump the docker group with 2 updates (#5597) 2025-05-01 11:00:58 -06:00
go.mod chore(deps): bump the go group across 1 directory with 31 updates (#5608) 2025-05-07 10:04:03 -07:00
go.sum chore(deps): bump the go group across 1 directory with 31 updates (#5608) 2025-05-07 10:04:03 -07:00
LICENSE initial release 2019-01-02 12:13:36 -08:00
Makefile upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
pomerium.go fix go get, improve redis test (#2450) 2021-08-06 12:07:20 -06:00
README.md core/ui: update logo (#5249) 2024-09-05 18:13:06 +02:00
RELEASING.md deployment: update RELEASING.md (#3503) 2022-08-16 10:40:03 -07:00
SECURITY.md Fix SECURITY.md treated as symlink (#5211) 2024-08-07 17:20:18 -04:00

pomerium logo

Go Report Card GoDoc LICENSE Docker Pulls

Pomerium builds secure, clientless connections to internal web apps and services without a corporate VPN.

Pomerium is:

Its not a VPN alternative its the trusted, foolproof way to protect your business. Want a hosted control plane and management GUI? Give Pomerium Zero a try today!

Docs

For comprehensive docs, and tutorials see our documentation.

Contributing

See Contributing for information on how you can contribute to Pomerium.