The databroker identity manager is responsible for refreshing session records, to account for overall session expiration as well as OAuth2 access token expiration. Refresh events are scheduled subject to a coolOffDuration (10 seconds, by default) relative to a lastRefresh timestamp. Currently, any update to a session record will reset the associated lastRefresh value and reschedule any pending refresh event for that session. If an update occurs close before a scheduled refresh event, this will push back the scheduled refresh event to 10 seconds from that time. This means that if a session is updated frequently enough (e.g. if there is a steady stream of requests that cause constant updates via the AccessTracker), the access token may expire before a refresh ever runs. To avoid this problem, do not update the lastRefresh time upon every session record update, but only if it hasn't yet been set. Instead, update the lastRefresh during the refresh attempt itself. Add unit tests to exercise these changes. There is a now() function as part of the manager configuration (to allow unit tests to set a fake time); update the Manager to use this function throughout. |
||
---|---|---|
.github | ||
.vscode | ||
authenticate | ||
authorize | ||
cmd/pomerium | ||
config | ||
databroker | ||
examples | ||
integration | ||
internal | ||
ospkg | ||
pkg | ||
proxy | ||
scripts | ||
ui | ||
.codecov.yml | ||
.dockerignore | ||
.fossa.yml | ||
.gitattributes | ||
.gitignore | ||
.golangci.yml | ||
.pre-commit-config.yaml | ||
.tool-versions | ||
3RD-PARTY | ||
DEBUG.MD | ||
Dockerfile | ||
Dockerfile.debug | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
pomerium.go | ||
README.md | ||
RELEASING.md | ||
SECURITY.md | ||
tools.go |
Pomerium builds secure, clientless connections to internal web apps and services without a corporate VPN.
Pomerium is:
- Easier because you don’t have to maintain a client or software.
- Faster because it’s deployed directly where your apps and services are. No more expensive data backhauling.
- Safer because every single action is verified for trusted identity, device, and context.
It’s not a VPN alternative – it’s the trusted, foolproof way to protect your business.
Docs
For comprehensive docs, and tutorials see our documentation.
Integration Tests
To run the integration tests locally, first build a local development image:
./scripts/build-dev-docker.bash
Next go to the integration/clusters
folder and pick a cluster, for example google-single
, then use docker-compose to start the cluster. We use an environment variable to specify the dev
docker image we built earlier:
cd integration/clusters/google-single
env POMERIUM_TAG=dev docker-compose up -V
Once that's up and running you can run the integration tests from another terminal:
go test -count=1 -v ./integration/...
If you need to make a change to the clusters themselves, there's a tpl
folder that contains jsonnet
files. Make a change and then rebuild the clusters by running:
go run ./integration/cmd/pomerium-integration-tests/ generate-configuration