Commit graph

3835 commits

Author SHA1 Message Date
Caleb Doxsey
622519e901
databroker: update identity manager to use route credentials (#5728)
## Summary
Currently when we refresh sessions we always use the global IdP
credentials. This PR updates the identity manager to use route settings
when defined.

To do this a new `idp_id` field is added to the session stored in the
databroker.

## Related issues
-
[ENG-2595](https://linear.app/pomerium/issue/ENG-2595/refresh-using-custom-idp-uses-wrong-credentials)
- https://github.com/pomerium/pomerium/issues/4759

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-15 18:04:36 -06:00
Kenneth Jenkins
e5e799a868
move SyncCache to a new pkg/synccache package (#5725)
Move SyncCache from pkg/grpc/databroker to a new pkg/synccache package.

This will allow pomerium-cli to avoid the pebble dependency.
2025-07-15 15:59:11 -07:00
Caleb Doxsey
c2115dc1e4
envoy: set concurrency to GOMAXPROCS (#5721)
## Summary
Explicitly set the `concurrency` option for envoy to match `GOMAXPROCS`.
In v1.25 the default behavior of `GOMAXPROCS` will change:

> On Linux, the runtime considers the CPU bandwidth limit of the cgroup
containing the process, if any. If the CPU bandwidth limit is lower than
the number of logical CPUs available, GOMAXPROCS will default to the
lower limit. In container runtime systems like Kubernetes, cgroup CPU
bandwidth limits generally correspond to the “CPU limit” option.

However we use
[github.com/uber-go/automaxprocs](https://github.com/uber-go/automaxprocs)
so we already have this behavior.

This behavior is enabled by default but can be disabled by setting the
runtime flag `set_envoy_concurrency_to_go_max_procs` to false.

This change will be backported to v0.30 and v0.29, though with v0.29 the
default will be off so as not to change the current behavior.

I also looked into the `--cpuset-threads` option, but it only applies
when cpusets are used explicitly and most containers use
`cpu.cfs_quota_us` or `cpu.max` instead.

## Related issues
-
[ENG-2549](https://linear.app/pomerium/issue/ENG-2549/core-set-cpuset-threads-envoy-option-to-detected-cpu-quota)

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-11 11:44:52 -06:00
Denis Mishin
8fa26c63f5
mcp: fix authorization header removal (#5719)
## Summary

Remove Authorization header for the MCP server upstream.

## Related issues

Fix https://github.com/pomerium/pomerium/issues/5718

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-10 20:37:07 -04:00
dependabot[bot]
28da6dc174
chore(deps): bump the go group across 1 directory with 34 updates (#5705)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
2025-07-10 20:33:19 -04:00
Joe Kralicky
33abea3ea6
ssh: improve 'whoami' format (#5714)
Old:
```
User ID:    xxx
Session ID: xxx
Expires at: 2025-07-10 08:39:40.64992461 +0000 UTC
Claims:
  aud: [xxx]
  email: [foo@bar.com]
  email_verified: [true]
  exp: [1.75212238e+09]
  family_name: [bar]
  given_name: [foo]
  iat: [1.75208638e+09]
  iss: [https://example.com]
  name: [Foo Bar]
  nickname: [foobar]
  picture: [https://example.com]
  sub: [xxx]
  updated_at: [2025-07-09T18:12:15.226Z]
```

New:
```
User ID:    xxx
Session ID: xxx
Expires at: 2025-07-10 11:23:27.641004885 +0000 UTC (in 13h59m57s)
Claims:
  aud: "xxx"
  email: "foo@bar.com"
  email_verified: true
  exp: 2025-07-10 07:23:27 +0000 UTC (in 9h59m56s)
  family_name: "bar"
  given_name: "foo"
  iat: 2025-07-09 21:23:27 +0000 UTC (4s ago)
  iss: "https://example.com"
  name: "Foo Bar"
  nickname: "foobar"
  picture: "https://example.com"
  sub: "xxx"
  updated_at: "2025-07-09T18:12:15.226Z"

```
2025-07-10 15:57:07 -04:00
Caleb Doxsey
88c7a6537a
postgres: drop redundant indices (#5715)
## Summary
There are 3 indices in the postgres storage driver that are redundant.
This PR drops them.

## Related issues
-
[ENG-2560](https://linear.app/pomerium/issue/ENG-2560/request-remove-redundant-database-indexes)

## Checklist
- [x] reference any related issues
- [ ] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-10 12:14:20 -06:00
Joe Kralicky
651a7e061f
ssh: add trailing newline to key strings if missing (#5716)
OpenSSH requires a trailing newline for private keys, which is easy to
accidentally omit when configuring private keys as strings inline via
copy/paste. This adds the missing newline if it is not present. Private
keys read from files still require the trailing newline.
2025-07-10 13:54:24 -04:00
Denis Mishin
e5e9e4c14a
mcp: add headers evaluator test (#5692)
## Summary

Adds headers evaluator tests for MCP routes. 

## Related issues

<!-- For example...
- #159
-->

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [ ] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-07-10 11:24:22 -04:00
Joe Kralicky
9e2e5103ef
tracing: fix race in shutdown logic when debug flags enabled (#5713) 2025-07-09 16:45:29 -04:00
Joe Kralicky
c5932bc9c6
tracing: fix incorrect proto conversion logic for otel timeouts (#5712)
Fixes https://github.com/pomerium/pomerium/issues/5652
2025-07-09 15:50:39 -04:00
Kenneth Jenkins
36b5685530
ci: update mac build event type to match (#5710)
The mac-builds repo has this workflow configured for the event type
"pomerium-proxy-release".
2025-07-08 14:03:33 -07:00
Kenneth Jenkins
8397ca02ab
ci: remove 'brews' configuration from GoReleaser (#5708)
Instead, we'll generate Homebrew formula updates from a workflow
triggered after the macOS builds finish.
2025-07-08 10:53:47 -07:00
Denis Mishin
8a89c975d9
mcp: delete upstream oauth2 token (#5707)
## Summary

Adds `POST /.pomerium/mcp/routes/disconnect` that allows an MCP client
application to request upstream OAuth2 tokens to be purged, so that a
user may get a new ones with possibly different scopes.

## Related issues

Fix
https://linear.app/pomerium/issue/ENG-2545/mcp-user-should-be-able-to-purge-their-upstream-oauth2-token

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-08 12:46:45 -04:00
Denis Mishin
f5c5326c72
mcp: respond with jsonrpc error when MCP request is denied (#5694)
## Summary

Individual MCP method calls may be denied (i.e. via `mcp_tool`
criterion) and Pomerium has to respond with MCP protocol error, which is
JSON-RPC error message, rather then with HTTP level error which seems to
break some MCP clients.


## Related issues

Fix
https://linear.app/pomerium/issue/ENG-2521/pomerium-does-not-return-an-mcp-error-when-a-tool-call-is-unauthorized

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-08 09:07:26 -06:00
Joe Kralicky
e179c1553c
ssh: update integration tests (#5700)
Adds several new ssh integration tests. Also fix an issue where we would
sometimes send a nil/empty ChannelMessage during close.
2025-07-07 19:34:49 -04:00
Denis Mishin
8f511c88d9
ppl: rename mcp tool criterion reasons (#5693)
## Summary

Change MCP PPL reasons to be more human-readable when used in the denial
matches.

## Related issues

See
https://github.com/pomerium/pomerium/issues/5673#issuecomment-3036879247

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-07 18:55:28 -04:00
Kenneth Jenkins
b3049ed3fd
changelog for v0.30.0 (#5704) 2025-07-07 14:38:51 -07:00
Denis Mishin
a577f53ff4
mcp/ppl: mcp_tool criterion should ignore non-tool call requests (#5695)
## Summary

## Related issues

Fix
https://linear.app/pomerium/issue/ENG-2543/mcp-tool-ignore-non-jsonrpc-calls

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-07 17:22:22 -04:00
Joe Kralicky
ecc5ecf881
bump envoy-custom to v1.34.1-p1 (#5702) 2025-07-07 15:44:12 -04:00
Joe Kralicky
559545f686
ssh: add runtime flag for jump host mode (#5699)
Adds a new runtime flag `ssh_allow_direct_tcpip` (default false) which
enables the "jump-host mode". This is disabled by default since we are
missing related config options/policy criteria.
2025-07-07 12:29:05 -04:00
Denis Mishin
624622f236
authorize: add request body logging (#5696)
## Summary

Adds an option to log request body for protocols that perform request
inspection, such as MCP.

## Related issues

Fix
https://linear.app/pomerium/issue/ENG-2544/authorize-request-body-logging

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [ ] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-07-07 12:12:29 -04:00
Joe Kralicky
4683685737
ssh: remove padding chars from base64 fingerprint (#5698)
Use RawStdEncoding to compute the base64 fingerprint as part of SSH
session IDs. This is mostly just so that we can use the go
`ssh.FingerprintSHA256` function in tests (which uses RawStdEncoding) to
assert on session ID strings
2025-07-07 12:11:53 -04:00
Joe Kralicky
b2a86913b4
querier: stop sync backoff on cancel error code (#5697)
Fixes an issue where the sync querier could be stuck indefinitely when
the context is canceled.
2025-07-07 12:11:35 -04:00
dependabot[bot]
59a1de4fb2
chore(deps): bump the github-actions group with 2 updates (#5683)
Bumps the github-actions group with 2 updates: [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) and [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action).


Updates `docker/setup-buildx-action` from 3.10.0 to 3.11.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@b5ca514...e468171)

Updates `stefanzweifel/git-auto-commit-action` from 5.2.0 to 6.0.1
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](stefanzweifel/git-auto-commit-action@b863ae1...778341a)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: 3.11.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-03 09:28:11 -07:00
Kenneth Jenkins
a088d3adaf
ci: update build job (#5691)
Set 'fail-fast: false' so that if one of these jobs fails it will not
cancel the other. These have have unfortunately become very flaky, and
the current behavior is not helpful.

Remove 'go-version' from the matrix as it is currently unused and it
does not match the actual Go version in use.
2025-07-03 09:22:15 -07:00
Kenneth Jenkins
94c0046d62
config: migrate deprecated cluster DNS settings (#5690)
Address the deprecation warnings for `respect_dns_ttl` by migrating to
the newer CustomClusterType config proto.
2025-07-03 09:21:26 -07:00
dependabot[bot]
85ca4832cd
chore(deps): bump the docker group in /.github with 2 updates (#5681)
Bumps the docker group in /.github with 2 updates: distroless/base and distroless/base-debian12.


Updates `distroless/base` from `cef75d1` to `201ef91`

Updates `distroless/base-debian12` from `cef75d1` to `201ef91`

---
updated-dependencies:
- dependency-name: distroless/base
  dependency-version: latest
  dependency-type: direct:production
  dependency-group: docker
- dependency-name: distroless/base-debian12
  dependency-version: latest
  dependency-type: direct:production
  dependency-group: docker
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-02 20:22:24 -07:00
Kenneth Jenkins
cc867b991e
config: allow URLs in depends_on (#5689)
Normalize URLs in the depends_on hosts list to extract just the host, so
that 'from' URL values can be used directly with this option.
2025-07-02 16:02:33 -07:00
Kenneth Jenkins
a908213a3c
ssh: add basic end-to-end test (#5680)
Add a bare-bones integration test using the testenv framework to verify 
the basics of SSH proxying: configure an upstream ssh server and connect
to it through Pomerium.
2025-07-02 13:34:53 -07:00
Kenneth Jenkins
8463020e68
ssh: rework cached record invalidation (#5688)
Add an additional method to the ssh.Evaluator interface for invalidating
cached databroker records. Invalidating the global cache is not
sufficient, because there may be sync queriers as well.

Make sure to invalidate the User record (in addition to the Session 
record) during the login flow.
2025-07-02 12:21:39 -07:00
Kenneth Jenkins
177677f239
ssh: continuous authorization (#5687)
Re-evaluate ssh authorization decision on a fixed interval, or whenever 
the config changes. If access is no longer allowed, log a new 'authorize
check' message and disconnect. 

Refactor the ssh.StreamManager initialization so that its lifecycle 
matches the Authorize lifecycle.
2025-07-02 12:01:25 -07:00
dependabot[bot]
31020a75a6
chore(deps): bump github.com/go-chi/chi/v5 from 5.2.1 to 5.2.2 (#5661)
Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/go-chi/chi/releases)
- [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md)
- [Commits](go-chi/chi@v5.2.1...v5.2.2)

---
updated-dependencies:
- dependency-name: github.com/go-chi/chi/v5
  dependency-version: 5.2.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 16:13:33 -07:00
dependabot[bot]
09fb207116
chore(deps): bump the docker group with 3 updates (#5682)
Bumps the docker group with 3 updates: node, golang and distroless/base-debian12.


Updates `node` from `0b5b940` to `0c0734e`

Updates `golang` from `29d9726` to `940ac57`

Updates `distroless/base-debian12` from `cc8cf19` to `7d1d720`

---
updated-dependencies:
- dependency-name: node
  dependency-version: lts-bookworm
  dependency-type: direct:production
  dependency-group: docker
- dependency-name: golang
  dependency-version: 1.24-bookworm
  dependency-type: direct:production
  dependency-group: docker
- dependency-name: distroless/base-debian12
  dependency-version: debug
  dependency-type: direct:production
  dependency-group: docker
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 15:45:17 -07:00
Kenneth Jenkins
9678e6a231
ssh: implement authorization policy evaluation (#5665)
Implement the pkg/ssh.AuthInterface. Add logic for converting from the
ssh stream state to an evaluator request, and for interpreting the
results of policy evaluation. Refactor some of the existing authorize
logic to make it easier to reuse.
2025-07-01 12:04:00 -07:00
Joe Kralicky
9437cec21d
testenv: do not attempt to shutdown pomerium if it fails to start (#5679)
## Summary

This should fix some test flakes. If (*Pomerium).Start() fails, we
should not attempt to call (*Pomerium).Shutdown().

## Related issues

<!-- For example...
- #159
-->

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [ ] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-07-01 13:58:29 -04:00
Joe Kralicky
b216b7a135
ssh: stream management api (#5670)
## Summary

This implements the StreamManagement API defined at 

https://github.com/pomerium/envoy-custom/blob/main/api/extensions/filters/network/ssh/ssh.proto#L46-L60.
Policy evaluation and authorization logic is stubbed out here, and
implemented in https://github.com/pomerium/pomerium/pull/5665.

## Related issues

<!-- For example...
- #159
-->

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [ ] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-07-01 13:57:19 -04:00
dependabot[bot]
c53aca0dd8
chore(deps): bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 (#5677)
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](go-viper/mapstructure@v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.3.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 09:25:01 -07:00
Joe Kralicky
496f1128fc
Add build options to configure envoy to be launched from an external binary (#5669)
This adds a build tag and debug variable that can be used to launch an
external envoy binary and skip embedding one, for debugging purposes.

Example usage:
```
go build -tags=debug_local_envoy -ldflags -X github.com/pomerium/pomerium/pkg/envoy.DebugLocalEnvoyPath=/path/to/envoy
```
or in launch.json
```jsonc
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "debug pomerium (external envoy)",
      "type": "go",
      "request": "launch",
      "mode": "debug",
      "program": "${workspaceRoot}/cmd/pomerium",
      // ...
      "buildFlags": [
        "-tags=debug_local_envoy",
        "-ldflags",
        "-X github.com/pomerium/pomerium/pkg/envoy.DebugLocalEnvoyPath=/path/to/envoy"
      ],
    }
  ]
}
```
2025-06-30 15:15:26 -04:00
Joe Kralicky
ac76aeb279
ssh: add envoy configuration (#5659)
## Summary

Adds the envoy listener config logic for ssh.

## Related issues

<!-- For example...
- #159
-->

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [ ] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-06-30 15:15:05 -04:00
Kenneth Jenkins
6a65c52a6c
refactor testenv mock IdP to also work standalone (#5678)
Refactor the testenv mock IdP implementation to split off the core
functionality from the testenv environment setup. Add a Start() method
to run the mock IdP as an httptest server, tied to a test lifecycle.
This allows the mock IdP to be used also in tests that do not start a
full Pomerium instance.
2025-06-27 14:04:58 -07:00
Kenneth Jenkins
717a7bdf5a
testenv: add support for SSH routes/upstreams (#5676)
Add the new types scenarios.SSH for configuring Pomerium with the global
SSH config options, and upstreams.SSHUpstream for configuring an
individual SSH upstream/route.

Add barebones device auth flow support to the testenv mock IdP, for use
with the SSH auth flow.

---------

Co-authored-by: Joe Kralicky <joekralicky@gmail.com>
2025-06-26 10:49:52 -07:00
Denis Mishin
a62a9e4d99
metrics: bump pgxpool stats package (#5671)
## Summary

The `pomerium_pgxpool_constructing_connections` had a `_milliseconds`
suffix due to a bug in the upstream package.

## Related issues

Ref: https://github.com/exaring/otelpgx/issues/61

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [ ] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-06-25 17:12:51 -04:00
Kenneth Jenkins
93ff662e1f
policy: add ssh PPL criteria (#5658)
Add five new PPL criteria for use with SSH, matching username and public
key. Username can be matched against a String Matcher, user's email 
address, or a custom claim from the IdP claims. Public key can be 
matched against a list of keys or a trusted CA.
2025-06-25 09:42:29 -07:00
Denis Mishin
9363457849
mcp: add mcp method and tool logging to authorize (#5668)
## Summary

Adds support for extending authorization log with Model Context Protocol
details.

i.e. 
```json
{
  "level": "info",
  "server-name": "all",
  "service": "authorize",
  "mcp-method": "tools/call",
  "mcp-tool": "describe_table",
  "mcp-tool-parameters": { "table_name": "Categories" },
  "allow": true,
  "allow-why-true": ["email-ok", "mcp-tool-ok"],
  "deny": false,
  "deny-why-false": [],
  "time": "2025-06-24T17:40:41-04:00",
  "message": "authorize check"
}
```

## Related issues

Fixes
https://linear.app/pomerium/issue/ENG-2393/mcp-authorize-each-incoming-request-to-an-mcp-route

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-06-24 20:58:51 -04:00
Joe Kralicky
eacf19cd64
oauth: add minimal device auth support for ssh (#5657)
## Summary

This adds the necessary logic needed for device auth flow in ssh. The
code is not used currently; will follow up with testenv updates that can
let us test this with the mock idp.

## Related issues

<!-- For example...
- #159
-->

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [ ] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-06-24 18:05:24 -04:00
Denis Mishin
db6449ecca
mcp: split mcp into server and client for better option grouping (#5666) 2025-06-24 10:21:32 -07:00
Kenneth Jenkins
d36c48a2bc
update Envoy to 1.34.1-rc1 (#5663) 2025-06-23 11:50:17 -07:00
Caleb Doxsey
5a12683c5c
config: add ssh settings (#5664) 2025-06-23 12:37:54 -06:00
Denis Mishin
f9e7308f12
mcp: add mcp_tool to ppl (#5662)
## Summary

Adds `mcp_tool` PPL criterion, that matches MCP tool names like 

```yaml
  - from: https://db.localhost.pomerium.io
    to: http://localhost:3000/mcp
    policy:
      allow:
        and:
          - email: 
              in: ["user@pomerium.com"]
          - mcp_tool:
              in: ["list_tables", "read_table", "search_records"]
    mcp: {}
```

## Related issues

Fix
https://linear.app/pomerium/issue/ENG-2393/mcp-authorize-each-incoming-request-to-an-mcp-route

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-06-23 12:43:43 -04:00