Commit graph

1022 commits

Author SHA1 Message Date
miloschwartz
f4e27bbfb7
add migration 2026-11-20 14:36:47 -05:00
Owen
a0853531aa
Fix client settings tier 2026-11-19 12:17:54 -05:00
Owen
ff2d4f08db
disable_login_org_names flag 2026-11-18 11:27:24 -05:00
Owen
9c9bd6c8f5
Merge branch '1-27' into dev 2026-11-17 17:47:01 -05:00
Owen
e864d0655d
Support config on machine clients 2026-11-17 16:54:51 -05:00
miloschwartz
b0fc9e27a7
rename flag, remove idp association, and add permissions ui checkbox 2026-11-17 15:02:29 -05:00
Milo Schwartz
c162eabb9b
Merge pull request #3867 from digitalglue-software/feat/idp-session-exchange-upstream
feat(idp): add org-scoped integration endpoint to mint session for external IdP user
2026-11-17 15:01:02 -05:00
Owen
a8828b165a
Update pricing to match website 2026-11-16 13:57:55 -05:00
Owen Schwartz
1d07441b99
Merge pull request #4103 from antcybersec/fix/test-temp-workdir-cleanup
test: remove temp workdirs created by budget and org-cleanup tests
2026-11-16 13:37:41 -05:00
Owen
ada8465e0f
Merge branch 'website-checkout' into dev 2026-11-16 11:42:16 -05:00
Owen
9c3f85068f
Support addons and monthly billing 2026-11-13 14:00:30 -05:00
Owen
a3bf2311a8
Support addons and monthly billing 2026-11-13 12:24:24 -05:00
anant
d440b20666 fix(blueprints): accept 6-digit PINs with a leading zero
The resource blueprint AuthSchema typed pincode as a number between
100000 and 999999, so PINs starting with 0 ("012345", a tenth of all
valid PINs) could not be expressed, although the PIN API accepts any
^\d{6}$ string. Resource-policy blueprints had the opposite problem and
rejected an unquoted pincode: 123456. Docker labels lost leading zeros
too, because convertValue turned every digit string into a number.

Use one PincodeSchema for both: a 6-digit string, or a number in the old
range normalized to a string. convertValue leaves digit strings with a
leading zero as strings. Existing configs keep working.

Signed-off-by: anant <170962632+antcybersec@users.noreply.github.com>
2026-11-13 11:12:25 +05:30
anant
035bac38bd test: remove temp workdirs created by budget and org-cleanup tests
aiBudgetEnforcement.test.ts and deleteOrg.test.ts create a workdir with
mkdtempSync (temp SQLite DB, config and symlinks into the repo) and never
remove it, so every npm test run leaves two pangolin-* directories in the
OS temp dir. Remove the workdir in a finally block, the same way
migrationsSqlite.backup.test.ts already does. rmSync does not follow the
symlinks, so the repo's server/, test/ and node_modules/ are untouched.

Signed-off-by: anant <170962632+antcybersec@users.noreply.github.com>
2026-11-13 11:07:15 +05:30
Owen
f44f626124
Push client settings 2026-11-12 17:29:02 -05:00
Owen
026942511c
Support adjustable license keys 2026-11-10 16:46:01 -05:00
Owen
8ae5a08b29
Get latest versions from the Fossorial API instead of GitHub 2026-11-09 16:23:49 -05:00
Owen
856d1dd716
Block duplicate hostnames on non-inference resources 2026-11-09 16:23:48 -05:00
Alex Castillo
68fedc4252
fix(ai-gateway): read Bedrock invoke-with-response-stream usage from base64 chunks
invoke-with-response-stream wraps each model event as {"bytes":"<base64>"} inside event-stream frames, so the usage fields never appear in clear text. extractUsage returned null and the pipeline fell back to estimating tokens over the base64, losing real counts and cache tokens. Decode the chunks before scanning.
2026-11-09 16:23:48 -05:00
Parikshith
a541cf261f
fix(ai-gateway): compare budget windows in seconds so period budgets enforce
aiUsageRecords.createdAt is epoch seconds since e57826d6e, but
sumUsageForBudget still compared it against a lower bound in epoch ms, so
every budget except lifetime summed to 0.

Convert the bound to seconds for usage queries, leaving windowStart in ms
for aiBudgetBreachEvents. Sum model-scoped budgets per requested model in
SQL instead of loading every row in the window into JS.
2026-11-09 16:23:48 -05:00
Owen
26082712c6
Jit mode default false
Ref #3262
Ref #3793
Ref #4072
2026-11-09 16:23:48 -05:00
Owen
d09f9c4124
Overwrite non-passed values so moving targets don't get old values 2026-11-09 16:23:48 -05:00
Alex Castillo
4932b8be2c
fix(ai): read usage from response.incomplete in OpenAI Responses streams
extractOpenAiResponses only took response.usage from response.completed, so a
stream cut by max_output_tokens (response.incomplete) lost its usage and fell
back to estimateUsage over the whole SSE text, over-counting cost and budget.
Read response.usage from any event that carries it.
2026-11-09 04:04:08 -04:00
Alex Castillo
64c9c85fc1
fix(ai): count Gemini toolUsePromptTokenCount as input tokens
Gemini reports the tokens of tool results (Google Search, URL context) in usageMetadata.toolUsePromptTokenCount, separate from promptTokenCount. The extractor ignored it, so usage and cost were under-counted.
2026-11-05 19:02:15 -04:00
miloschwartz
ddc4934ab8
make session revalidation private 2026-11-03 16:49:26 -05:00
Owen
ad7bf2382c
Fix wildcard resource domain pulling 2026-11-03 10:40:36 -05:00
Owen Schwartz
f6d52ced4b
Merge pull request #4054 from pcbeingused333/c0600-exit-node-request-timeout
fix(exit-nodes): add a request timeout to calls made to Gerbil
2026-11-03 10:19:59 -05:00
Alex Castillo
c8fefdf061
fix(exit-nodes): add a request timeout to calls made to Gerbil
sendToExitNode used axios without a timeout, so a Gerbil that accepted
the connection but never answered left the caller (peer updates, SNI
sync, client association rebuilds) waiting indefinitely. Apply a 15s
default, overridable per request.
2026-11-03 00:24:53 -05:00
Alex Castillo
61c89834e8
fix(ai-gateway): stop subtracting Bedrock Converse cache reads from inputTokens
With prompt caching enabled, Bedrock reports inputTokens as the non-cached input only; cacheReadInputTokens and cacheWriteInputTokens are separate counters. Subtracting the cache reads again undercounted promptTokens (clamped to 0) in both the JSON and the stream-scan paths.
2026-11-02 19:57:39 -05:00
Owen
1ae2aa810e
Protect wildcard 2026-11-02 17:31:13 -05:00
Owen
be4100c9a3
Bump version 2026-11-02 16:13:05 -05:00
Owen
4726cb4fc1
Support matching on the base wildcard resources 2026-11-02 15:30:16 -05:00
Owen
095ca2204f
Resource session page 2026-11-02 15:00:09 -05:00
Owen
8c11260ede
Add resource session tracking page 2026-11-02 14:59:01 -05:00
Owen
5b8833f302
SSH log 2026-11-02 14:56:55 -05:00
Owen
9aa0d054c8
Merge branch 'main' into dev 2026-11-02 14:49:07 -05:00
gk1
34a0c1e630 feat(idp): root-gated create-session for an external IdP user (per review)
Reworks the org-scoped exchange-token endpoint into a root-gated create-session route,
addressing the review on the earlier version:

- Requires a ROOT API key holding the createIdpSession action, not an org-scoped key.
  Minting a session is impersonation, so it is deliberately root-only.
- Gated behind flags.enable_idp_create_session (off by default, self-hosted only;
  refused when build === "saas").
- Drops orgId entirely: the user must belong to the identity provider, not an
  organization. The route becomes /idp/:idpId/oidc/create-session.

Removes the now-unused org-scoped createSessionForIdpUser helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-30 16:55:25 -07:00
Milo Schwartz
9115808301
Merge pull request #4027 from S-NoF3aR/feature/idp-session-revalidation
Revalidate OIDC sessions with the IdP using refresh tokens
2026-10-30 14:44:23 -04:00
miloschwartz
451f89481c
support special google session revalidation 2026-10-30 14:43:55 -04:00
miloschwartz
440e874aa1
add toggle to idp settings 2026-10-30 14:07:04 -04:00
miloschwartz
36f36d2ca1
address review feedback 2026-10-30 10:56:47 -04:00
Owen
8b784611c2
Support prices for custom models 2026-10-29 10:56:51 -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
8ce036b413
Clean up config for dns servers 2026-10-28 15:51:08 -04:00
Owen Schwartz
8348e11ca9
Merge pull request #4021 from fosrl/dev
1.25.3-s.1
2026-10-28 14:18:01 -04:00
Owen
cd39f2ecd6
Custom dns records 2026-10-28 11:01:29 -04:00
Owen Schwartz
5f68236f49
Merge pull request #3922 from Tyagiquamar/fix/blueprint-basic-auth-race-3835
fix(blueprints): hash basic-auth before header-auth delete
2026-10-27 15:27:06 -04:00
Owen
f4410cdbeb
Sanitize values before including in treafik config 2026-10-27 15:10:08 -04:00
Owen
c37dd72c8c
Merge branch 'main' into dev
Some checks failed
Mirror Node Base Image (Docker Hub to GHCR) / mirror (push) Has been cancelled
2026-10-26 11:58:16 -04:00
Owen Schwartz
f2342d7168
Merge pull request #3971 from samirasidd/ci-run-existing-tests
ci: run existing unit tests
2026-10-26 10:31:08 -04:00