Commit graph

291 commits

Author SHA1 Message Date
miloschwartz
36f36d2ca1
address review feedback 2026-10-30 10:56:47 -04:00
Severin Enzler
7176fa4a40 Revalidate OIDC sessions with the IdP using refresh tokens
Pangolin consults the IdP only at login and keeps its own session
afterwards, so disabling a user or revoking their sessions in the IdP
does not end their Pangolin sessions.

Store the IdP refresh token at OIDC login as a grant and redeem it at
most every server.idp_session_revalidation_minutes (default 5). If the
IdP rejects it with invalid_grant, the grant is marked revoked and all
sessions backed by it and their resource sessions are deleted. Other
errors (IdP unreachable or slower than 10 seconds, invalid_client after
a secret change) keep the sessions valid and are retried after at most
a minute instead of on every request.

Only the instance holding a lease on the grant in the primary database
redeems its refresh token, and it writes the result only while it still
holds the lease, so instances never redeem the same token concurrently.
The per-request lookup reads from a replica through safeRead.

Device logins of the Pangolin clients share the grant of the browser
session that approved them, read from the primary database, so a rotated
refresh token is never redeemed twice by separate sessions.

The Entra ID provider type hardcodes its scopes, so it now requests
offline_access to get a refresh token.
2026-10-29 11:33:30 +01:00
Owen
bd38b71b4d
Add 1.25.3 migrations 2026-10-23 09:48:09 -04:00
Owen
d60219ae89
Cant update badger yet 2026-10-21 15:18:18 -04:00
Owen
f4140fd6f6
Add mtls to blueprint, policy, and oss getTraefikConfig 2026-10-20 10:02:44 -04:00
Owen
702719ed76
Add badger to migration 2026-10-19 17:15:22 -04:00
Owen
65571d8eeb
Relay port must have default value 2026-10-19 11:23:06 -04:00
Owen
4555ef8da8
Add 1.25 migrations 2026-10-19 11:16:36 -04:00
TiltedTeapot
3712921048 Propogated Changes. listen port is now accessed from db instead of config 2026-10-06 18:21:05 -06:00
Owen
97e0c19276
Add migrations 2026-09-28 20:39:38 -04:00
Tyagiquamar
b74ded3a9c
fix(sqlite): tag per-migration database backups with version and prevent collisions 2026-09-18 21:31:00 +05:30
Tyagiquamar
803fbb2ea2
fix(sqlite): take a single database backup per upgrade instead of one per migration 2026-09-17 22:45:42 +05:30
Owen
735787b183
Fix #3778 2026-09-16 10:11:20 -04:00
Owen
4716a2a647
Make migration idempotent
Ref #3759
2026-09-16 09:08:20 -04:00
Hayyan Hajwani
9298ec7cdb fix(setup): correct month index and zero-pad database backup file names
Backup names were built inline from Date#getMonth, which is zero-indexed, so a
backup taken on 12 September 2026 was written as db_2026-8-12_20-35-56.sqlite.
No field was zero-padded either, giving names like db_2026-8-12_20-36-2.sqlite.

Extract formatBackupTimestamp into server/lib and use it from both places that
built the string: the backupDb helper in migrationsSqlite.ts and the inline copy
in the 1.0.0-beta9 setup script. Padding every field also makes the names sort
lexicographically in the order the backups were taken.

Adds tests covering both reported names, single-digit padding and sort order.
Reverting the helper to the old formula fails them with the exact name from the
report.
2026-09-16 13:46:57 +05:30
miloschwartz
3cb41211ee
fix premature migration execution 2026-09-15 20:44:17 -04:00
miloschwartz
8f1344a665
bump version and add 1.23 migrations 2026-09-14 17:18:31 -04:00
Owen
a874a0b745
Add explicit process exit to prevent hanging in migrations script 2026-09-14 16:48:10 -04:00
Owen
be0dd65557
Update imports 2026-09-03 11:35:28 -04:00
miloschwartz
a47a68d8e1
update badger version 2026-08-27 11:40:46 -04:00
Owen
331fee24d4
Make the default session storage 0 2026-08-26 11:02:39 -04:00
Owen
72d2c79793
Add migration for streaming table 2026-08-25 10:42:56 -04:00
miloschwartz
a7bbafd2f0
bump badger version 2026-08-19 12:01:01 -04:00
Owen
6824ec6e3e
Clean up empty execute in migration 2026-08-19 11:51:12 -04:00
Owen
dc8e724482
Fix issue with subnets in migrations 2026-08-19 09:30:02 -04:00
Owen
1bb4f604e9
Fix select from missing new columns 2026-08-18 09:52:24 -04:00
Owen
aa8d339d35
Adjust sudo mode on the roles to full for use of ssh 2026-08-17 17:24:16 -04:00
Owen
7d10b63dc5
Add v1 migrations 2026-08-17 16:50:51 -04:00
Owen
92916cd9db
Remove wrong named 1.21.1 migration for 1.22 2026-08-17 16:01:30 -04:00
Owen
075d112861
Add base migrations 2026-08-17 15:54:42 -04:00
miloschwartz
4048fa274a
fix non admins cant see private resources details in launcher 2026-08-06 12:32:19 -04:00
miloschwartz
a0b9ea76a3
add badger to migration 2026-07-17 16:22:15 -04:00
miloschwartz
eb3a3eac98
add 1.21 migrations 2026-07-17 15:58:13 -04:00
miloschwartz
4dcf684868
add 1.20.0 migration 2026-07-07 16:04:41 -04:00
Owen
8f377a4fb2
Dont run on cloud 2026-07-01 22:07:33 -04:00
Owen
108cb6216c
Add migration to fix policy delete issues
Ref #3257
2026-07-01 10:39:41 -04:00
Owen
a8ca28acb2
Add default for target type
Fixes #3247
2026-06-12 11:29:16 -07:00
Owen
935593885a
Adjust 1.19 and add 1.19.1 to ensure sso not null 2026-06-11 22:01:20 -07:00
miloschwartz
b82b41ed26
fix migration 2026-06-11 15:02:29 -07:00
miloschwartz
a1ab8d8f35
standardize client titles 2026-06-09 21:47:15 -07:00
Owen
d870b9ff49
Drop the not null on resource columns 2026-06-09 21:36:27 -07:00
Owen
3a485f74f1
Move session migration out of the loop 2026-06-09 16:16:14 -07:00
Owen
f28571629f
Make sure the pamMode is push for host resources 2026-06-08 21:54:06 -07:00
Owen
1b7c1ffa70
Set the target port from the resource 2026-06-08 15:39:26 -07:00
Owen
69bd61c308
Update migrations 2026-06-05 16:02:28 -07:00
Owen
128db20755
Remove migration test 2026-06-02 17:13:10 -07:00
Owen
b6d688f15e
Support pin,pass,whitelist correctly on login 2026-06-01 21:34:39 -07:00
Owen
605dd2f3c9
Add tcp and udp specific pages 2026-06-01 16:05:20 -07:00
Owen
2ae4c29418
Add missing set 2026-06-01 15:27:30 -07:00
Owen
ba71016f87
Add inline policy migration 2026-06-01 15:18:40 -07:00