Commit graph

35 commits

Author SHA1 Message Date
Caleb Doxsey
5d69b925be
HTTP/3 Support (#5349)
* wip

* http3 support

* add integration test

* move some quic code

* fix codec type

* casing

* add alt-svc header

* add quic unit test
2024-11-19 08:48:30 -07:00
Caleb Doxsey
bf1d228131
core/authorize: use uuid for jti, current time for iat and exp (#5147)
* core/authorize: use uuid for jti, current time for iat and exp

* exclude the jtis

* Update authorize/evaluator/headers_evaluator_test.go

Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com>

---------

Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com>
2024-06-25 11:31:00 -06: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
Caleb Doxsey
a2fd95aae6
core/ci: update linting (#4844)
* core/ci: update linting

* re-add exportloopref

* re-add gocheckcompilerdirectives

* re-add stylecheck

* re-add usestdlibvars

* upgrade lint

---------

Co-authored-by: Denis Mishin <dmishin@pomerium.com>
2023-12-14 09:07:54 -08:00
Kenneth Jenkins
379abecab1
add integration test for https IP address route (#4476)
Update the integration test libsonnet templates to assign a fixed IP 
address to the trusted-httpdetails service. This requires also assigning
a fixed IP subnet to the docker network.

Configure a route with a 'to' URL using https and this fixed IP address. 
Add a corresponding certificate with the IP address. Finally, add a test
case that makes a request to this route.
2023-08-18 09:32:21 -07:00
Kenneth Jenkins
c6b7927e1c
add integration test for Pomerium JWT (#4472)
Add an integration test case to verify properties of the Pomerium
attestation JWT:

 - The 'iat' and 'exp' timestamps should be plain integers.
 - The JWT should contain an issuer and audience claim.
 - A JWT retrieved from the /.pomerium/jwt endpoint should contain all
   the same data as a JWT from the X-Pomerium-Jwt-Assertion header.
2023-08-17 13:23:16 -07:00
Kenneth Jenkins
9d4d31cb4f
authorize: implement client certificate CRL check (#4439)
Update isValidClientCertificate() to also consult the configured
certificate revocation lists. Update existing test cases and add a new
unit test to exercise the revocation support. Restore the skipped
integration test case.

Generate new test certificates and CRLs using a new `go run`-able source
file.
2023-08-03 15:59:11 -07:00
Kenneth Jenkins
e91600c158
authorize: do not rely on Envoy client cert validation (#4438)
Partially revert #4374: do not record the peerCertificateValidated()
result as reported by Envoy, as this does not work correctly for resumed
TLS sessions. Instead always record the certificate chain as presented
by the client. Remove the corresponding ClientCertificateInfo Validated
field, and update affected code accordingly. Skip the CRL integration
test case for now.
2023-08-03 10:45:55 -07:00
Kenneth Jenkins
219296a875
add integration test for client_crl setting (#4384)
Update the integration test templates to add a new client certificate
issued by downstream-ca-1, along with a combined CRL that revokes it.
(Setting a CRL just from downstream-ca-1 doesn't appear to work, which
surprises me.) Add a test case to verify that access is not allowed when
using the revoked certificate.
2023-07-24 14:56:12 -07:00
Kenneth Jenkins
5459e6940a
authorize: do not redirect if invalid client cert (#4344)
If an authorization policy requires a client certificate, but an
incoming request does not include a valid certificate, we should serve a
deny error page right away, regardless of whether the user is
authenticated via the identity provider or not. Do not redirect to the
identity provider login page in this case.

Update the existing integration tests accordingly, and add a unit test
case for this scenario.
2023-07-10 16:39:26 -07:00
Kenneth Jenkins
3ebee1159c
add downstream mTLS integration test cases (#4234)
* integration test config: add downstream mTLS routes

Add two new CA certificates for use with downstream mTLS tests, and a
client certificate/key pair issued by each CA.

Add a few routes to the policy template that require a client CA. Update
the generated output configurations.

(based on commit ed63a6a6e7)

* add downstream mTLS integration test cases

These are modeled after the tests added to v0.17 in 83957a9, but here
the expected behavior is that requests with an invalid client
certificate will receive a 495 response only after authentication.
2023-06-13 10:25:21 -07:00
Caleb Doxsey
bbed421cd8
config: remove source, remove deadcode, fix linting issues (#4118)
* remove source, remove deadcode, fix linting issues

* use github action for lint

* fix missing envoy
2023-04-21 17:25:11 -06:00
Caleb Doxsey
57217af7dd
authenticate: implement hpke-based login flow (#3779)
* urlutil: add time validation functions

* authenticate: implement hpke-based login flow

* fix import cycle

* fix tests

* log error

* fix callback url

* add idp param

* fix test

* fix test
2022-12-05 15:31:07 -07:00
Caleb Doxsey
fa26587f19
remove forward auth (#3628) 2022-11-23 15:59:28 -07:00
Caleb Doxsey
89a105c8e6
authorize: add request id to context (#3497)
* authorize: add request id to context

* fix context keys
2022-07-26 14:34:48 -06:00
Caleb Doxsey
820be99a2f
integration: add test for query string params (#3302) 2022-04-28 13:42:23 -06:00
Caleb Doxsey
c97dcf7e0f
envoy: add hash policy and routing key for hash-based load balancers (#2791)
* envoy: add hash policy and routing key for hash-based load balancers

* fix integration test

* fix nginx
2021-12-01 13:42:12 -07:00
Caleb Doxsey
48cd10d46b
integration: add single-cluster integration tests (#2516)
* integration: add single-cluster integration tests

* remove kind load
2021-08-24 15:35:05 -06:00
Caleb Doxsey
9aad155e1a
integration: remove tests (#2514) 2021-08-23 13:07:18 -06:00
Caleb Doxsey
0bc598f952
Revert "reduce memory usage by handling http/2 coalescing via a lua script (#1779)" (#1785)
This reverts commit b2ceaa9e91.
2021-01-19 13:55:30 -07:00
Caleb Doxsey
b2ceaa9e91
reduce memory usage by handling http/2 coalescing via a lua script (#1779)
* add support for proxy protocol on HTTP listener (#1777)

* add support for proxy protocol on HTTP listener

* rename option, add doc

* reduce memory usage by handling http/2 coalescing via a lua script

* move script to file

* use wellknown

* fix integration test
2021-01-19 08:45:28 -07:00
bobby
f837c92741
dev: update linter (#1728)
- gofumpt everything
- fix TLS MinVersion to be at least 1.2
- add octal syntax
- remove newlines
- fix potential decompression bomb in ecjson
- remove implicit memory aliasing in for loops.

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
2020-12-30 09:02:57 -08:00
Cuong Manh Le
8d0deb0732
config: add PassIdentityHeaders option (#903)
Currently, user's identity headers are always inserted to downstream
request. For privacy reason, it would be better to not insert these
headers by default, and let user chose whether to include these headers
per=policy basis.

Fixes #702
2020-06-22 10:29:44 +07:00
Cuong Manh Le
8856577f39
integration: fix wrong jwt assertion test (#909)
The test intends to check "X-Pomerium-Jwt-Assertion" exists in response
header and not empty, but accidently always test for non-empty string.
2020-06-17 21:49:39 +07:00
Cuong Manh Le
4d5edb0d64
Feature/remove request headers (#822)
* config: add RemoveRequestHeaders

Currently, we have "set_request_headers" config, which reflects envoy
route.Route.RequestHeadersToAdd. This commit add new config
"remove_request_headers", which reflects envoy RequestHeadersToRemove.

This is also a preparation for future PRs to implement disable user
identity in request headers feature.

* integration: add test for remove_request_headers
* docs: add documentation/changelog for remove_request_headers
2020-06-03 07:46:51 -07:00
Bobby DeSimone
ca499ac9be
envoy: add jwt-assertion (#727)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
2020-05-19 08:34:49 -07:00
Caleb Doxsey
e854cfe83b
envoy: implement policy TLS options (#724)
* envoy: implement policy TLS options

* fix tests

* log which CAs are being used
2020-05-18 16:52:51 -06:00
Caleb Doxsey
b4ac3ca8d8 skip failing tests 2020-05-18 17:10:10 -04:00
Caleb Doxsey
ef399380b7 merge master 2020-05-18 17:10:10 -04:00
Caleb Doxsey
1bee3b0df9 envoy: fix sni/hostname mismatched routing for http2 connection coalescing (#703) 2020-05-18 17:10:10 -04:00
Caleb Doxsey
02615b8b6c Merge remote-tracking branch 'origin/master' into feature/envoy 2020-05-18 17:10:10 -04:00
Travis Groth
99e788a9b4 envoy: Initial changes 2020-05-18 17:10:10 -04:00
Caleb Doxsey
49067c8f06
integration-tests: TLS policy configuration options (#708)
* integration-tests: switch to go for backends to support TLS scenarios

* fix apply order

* generate additional tls certs

* integration-tests: tls_skip_verify option

* integration-tests: wait for openid to come up before starting authenticate

* add tls_server_name test

* add test for tls_custom_ca

* increase setup timeout to 15 minutes

* fix secret name reference

* mtls wip

* mtls wip

* add test for client_cert
2020-05-15 16:37:09 -06:00
Caleb Doxsey
397d4a9f51
integration-tests: switch to go for backends to support TLS scenarios (#707)
* integration-tests: switch to go for backends to support TLS scenarios

* fix apply order

* fix duplicate port value
2020-05-15 09:25:27 -06:00
Caleb Doxsey
cbc6374efd
integration-tests: set_request_headers and preserve_host_header options (#668)
* integration-tests: rename to policy_test

* integration-tests: add request header test

* integration-tests: add test for preserve_host_header
2020-05-07 10:52:55 -06:00