pomerium/internal
Cuong Manh Le 963e1c015a
authorize/evaluator/opa: use route policy object instead of array index (#1001)
Make the code more readable, and slightly reduce memory alloc:

	opa test -v --bench --count 5 --format gobench

Output:

name                                       old alloc/op                     new alloc/op                     delta
DataPomeriumAuthzTestEmailAllowed                               109kB ± 0%                       108kB ± 0%  -0.89%  (p=0.008 n=5+5)
DataPomeriumAuthzTestExample                                   95.4kB ± 0%                      93.4kB ± 0%  -2.06%  (p=0.008 n=5+5)
DataPomeriumAuthzTestEmailDenied                               63.6kB ± 0%                      61.6kB ± 0%  -3.09%  (p=0.008 n=5+5)
DataPomeriumAuthzTestPublicAllowed                              103kB ± 0%                       101kB ± 0%  -1.86%  (p=0.008 n=5+5)
DataPomeriumAuthzTestPublicDenied                               100kB ± 0%                        98kB ± 0%  -1.64%  (p=0.008 n=5+5)
DataPomeriumAuthzTestPomeriumAllowed                           62.6kB ± 0%                      60.7kB ± 0%  -3.14%  (p=0.008 n=5+5)
DataPomeriumAuthzTestPomeriumDenied                            64.5kB ± 0%                      62.5kB ± 0%  -3.11%  (p=0.008 n=5+5)
DataPomeriumAuthzTestCorsPreflightAllowed                      66.7kB ± 0%                      64.5kB ± 0%  -3.33%  (p=0.008 n=5+5)
DataPomeriumAuthzTestCorsPreflightDenied                       65.8kB ± 0%                      63.3kB ± 0%  -3.92%  (p=0.008 n=5+5)
DataPomeriumAuthzTestParseUrl                                  13.8kB ± 0%                      13.8kB ± 0%    ~     (p=0.167 n=5+5)
DataPomeriumAuthzTestAllowedRouteSource                         243kB ± 0%                       243kB ± 0%    ~     (p=1.000 n=5+5)
DataPomeriumAuthzTestAllowedRoutePrefix                        80.9kB ± 0%                      80.9kB ± 0%    ~     (p=0.690 n=5+5)
DataPomeriumAuthzTestAllowedRoutePath                           108kB ± 0%                       108kB ± 0%    ~     (p=0.452 n=5+5)
DataPomeriumAuthzTestAllowedRouteRegex                         90.0kB ± 0%                      89.9kB ± 0%    ~     (p=0.095 n=5+5)

name                                       old allocs/op                    new allocs/op                    delta
DataPomeriumAuthzTestEmailAllowed                               1.76k ± 0%                       1.74k ± 0%  -1.24%  (p=0.008 n=5+5)
DataPomeriumAuthzTestExample                                    1.54k ± 0%                       1.51k ± 0%  -2.18%  (p=0.008 n=5+5)
DataPomeriumAuthzTestEmailDenied                                1.05k ± 1%                       1.01k ± 1%  -3.21%  (p=0.008 n=5+5)
DataPomeriumAuthzTestPublicAllowed                              1.65k ± 0%                       1.63k ± 0%  -1.20%  (p=0.008 n=5+5)
DataPomeriumAuthzTestPublicDenied                               1.61k ± 0%                       1.58k ± 0%  -1.42%  (p=0.008 n=5+5)
DataPomeriumAuthzTestPomeriumAllowed                            1.04k ± 1%                       1.00k ± 1%  -3.27%  (p=0.008 n=5+5)
DataPomeriumAuthzTestPomeriumDenied                             1.06k ± 1%                       1.03k ± 1%  -3.19%  (p=0.008 n=5+5)
DataPomeriumAuthzTestCorsPreflightAllowed                       1.14k ± 1%                       1.09k ± 0%  -3.96%  (p=0.008 n=5+5)
DataPomeriumAuthzTestCorsPreflightDenied                        1.09k ± 1%                       1.05k ± 0%  -4.04%  (p=0.008 n=5+5)
DataPomeriumAuthzTestParseUrl                                     222 ± 0%                         222 ± 0%    ~     (all equal)
DataPomeriumAuthzTestAllowedRouteSource                         3.66k ± 0%                       3.66k ± 0%    ~     (all equal)
DataPomeriumAuthzTestAllowedRoutePrefix                         1.23k ± 0%                       1.23k ± 0%    ~     (all equal)
DataPomeriumAuthzTestAllowedRoutePath                           1.62k ± 0%                       1.62k ± 0%    ~     (all equal)
DataPomeriumAuthzTestAllowedRouteRegex                          1.36k ± 0%                       1.36k ± 0%    ~     (all equal)
2020-06-25 21:28:54 +07:00
..
cmd/pomerium authenticate: support hot reloaded config (#984) 2020-06-24 00:18:20 +07:00
controlplane controlplane: add robots route (#966) 2020-06-22 11:48:59 -07:00
cryptutil authenticate: add jwks and .well-known endpoint (#745) 2020-05-21 11:46:29 -07:00
databroker/memory telemetry: add tracing spans to cache and databroker (#987) 2020-06-23 13:08:21 -04:00
directory internal/directory/okta: store directory information by user id (#991) 2020-06-24 21:56:51 +07:00
encoding *: remove import path comments (#545) 2020-03-16 10:13:47 -07:00
envoy internal/envoy: improve handleLogs (#929) 2020-06-19 09:14:10 +07:00
fileutil *: remove import path comments (#545) 2020-03-16 10:13:47 -07:00
frontend authorize/evaluator/opa: use route policy object instead of array index (#1001) 2020-06-25 21:28:54 +07:00
grpc cache: add client telemetry (#975) 2020-06-22 18:18:44 -04:00
hashutil authenticate: save oauth2 tokens to cache (#698) 2020-05-18 17:10:10 -04:00
httputil config: add PassIdentityHeaders option (#903) 2020-06-22 10:29:44 +07:00
identity authenticate: revoke current session oauth token before sign out (#964) 2020-06-23 00:55:55 +07:00
log envoy: use envoy request id for logging across systems with http and gRPC (#691) 2020-05-18 17:10:10 -04:00
middleware authorize: allow CORS preflight requests (#672) 2020-05-18 17:10:10 -04:00
protoutil feature/databroker: user data and session refactor project (#926) 2020-06-19 07:52:44 -06:00
scheduler feature/databroker: user data and session refactor project (#926) 2020-06-19 07:52:44 -06:00
sessions internal/sessions: handle claims "ver" field generally (#990) 2020-06-24 22:06:17 +07:00
telemetry cache: add client telemetry (#975) 2020-06-22 18:18:44 -04:00
testutil controlplane: xds unit tests (#770) 2020-05-25 11:14:07 -06:00
tripper *: remove import path comments (#545) 2020-03-16 10:13:47 -07:00
urlutil authenticate: save oauth2 tokens to cache (#698) 2020-05-18 17:10:10 -04:00
version *: remove import path comments (#545) 2020-03-16 10:13:47 -07:00