pipework 0.75.2 → 0.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/REFERENCE.md +1477 -0
- package/dist/auth/auth/cookie.d.ts +6 -1
- package/dist/auth/auth/cookie.d.ts.map +1 -1
- package/dist/auth/auth/cookie.js +25 -3
- package/dist/auth/auth/cookie.js.map +1 -1
- package/dist/auth/auth/index.d.ts +1 -0
- package/dist/auth/auth/index.d.ts.map +1 -1
- package/dist/auth/auth/index.js.map +1 -1
- package/dist/auth/auth/multi-org.d.ts.map +1 -1
- package/dist/auth/auth/multi-org.js +2 -1
- package/dist/auth/auth/multi-org.js.map +1 -1
- package/dist/auth/auth/sessions.d.ts +26 -0
- package/dist/auth/auth/sessions.d.ts.map +1 -1
- package/dist/auth/auth/sessions.js +118 -10
- package/dist/auth/auth/sessions.js.map +1 -1
- package/dist/auth/auth/types.d.ts +2 -1
- package/dist/auth/auth/types.d.ts.map +1 -1
- package/dist/core/errors/http.d.ts +5 -0
- package/dist/core/errors/http.d.ts.map +1 -1
- package/dist/core/errors/http.js +7 -0
- package/dist/core/errors/http.js.map +1 -1
- package/dist/core/errors/index.d.ts +1 -1
- package/dist/core/errors/index.d.ts.map +1 -1
- package/dist/core/errors/index.js +1 -1
- package/dist/core/errors/index.js.map +1 -1
- package/dist/core/errors/namespace.d.ts +3 -1
- package/dist/core/errors/namespace.d.ts.map +1 -1
- package/dist/core/errors/namespace.js +3 -1
- package/dist/core/errors/namespace.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/infra/access-links/handle.d.ts.map +1 -1
- package/dist/infra/access-links/handle.js +2 -13
- package/dist/infra/access-links/handle.js.map +1 -1
- package/dist/infra/email/sigv4.d.ts +24 -0
- package/dist/infra/email/sigv4.d.ts.map +1 -0
- package/dist/infra/email/sigv4.js +55 -0
- package/dist/infra/email/sigv4.js.map +1 -0
- package/dist/request/flow/act-as.d.ts +18 -0
- package/dist/request/flow/act-as.d.ts.map +1 -0
- package/dist/request/flow/act-as.js +69 -0
- package/dist/request/flow/act-as.js.map +1 -0
- package/dist/request/flow/namespace.d.ts +3 -0
- package/dist/request/flow/namespace.d.ts.map +1 -1
- package/dist/request/flow/namespace.js +3 -0
- package/dist/request/flow/namespace.js.map +1 -1
- package/dist/request/http/middleware.d.ts.map +1 -1
- package/dist/request/http/middleware.js +3 -1
- package/dist/request/http/middleware.js.map +1 -1
- package/dist/request/http/server.js +1 -1
- package/dist/request/http/server.js.map +1 -1
- package/dist/request/http/types.d.ts +1 -1
- package/dist/request/http/types.d.ts.map +1 -1
- package/dist/trace/entry/child-trace.d.ts +5 -0
- package/dist/trace/entry/child-trace.d.ts.map +1 -0
- package/dist/trace/entry/child-trace.js +19 -0
- package/dist/trace/entry/child-trace.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.77.0
|
|
4
|
+
|
|
5
|
+
- **New: `flow.actAs({ tenant, userId }, fn)`** for code that has just chosen a tenant in a Flow with none: a sign-up founding a tenant, a public sign-in recording into its org. `fn` runs as that tenant and user (row-level security, audit tenant and actor) in a savepoint of the request's own transaction, so a failed sign-up leaves nothing behind; its work is recorded in a child trace the tenant can read. Afterwards the request is tenantless again. Refused when the Flow already has a tenant (#489).
|
|
6
|
+
|
|
7
|
+
## 0.76.0
|
|
8
|
+
|
|
9
|
+
- **New: browser sessions.** `SessionConfig.accessToken.cookie` also delivers the access token as an HttpOnly cookie (`__pipework_access`, SameSite Lax, Path `/`), set, replaced and cleared alongside the refresh cookie by `issueTokensHttp`, `refreshHttp`, `revokeHttp`, `revokeAllHttp` and multi-org sign-in, select and switch, so a plain link, image or form reaches a route signed in. Without it nothing changes (#487).
|
|
10
|
+
- **New: `sessions.strategy({ trustedOrigins? })`**, the auth strategy for pipework's own sessions: `Authorization: Bearer` first, else the access cookie; checks the session version when `versionCheck` is on. A write (not GET/HEAD/OPTIONS) authenticated by the cookie must come from the app's own site (`Sec-Fetch-Site`, else `Origin` against `Host` or `trustedOrigins`), otherwise 403 `CROSS_SITE_REQUEST` (`CrossSiteRequestError`). It never refreshes; the client calls its refresh route on a 401.
|
|
11
|
+
- **Changed: an expired access token answers 401 "Access token expired"** instead of "Invalid access token". `switchOrg` revokes the refresh token the request carried. New `sessions.revokeRefreshCookie(db, request)`. Auth strategies now receive the request's parsed `cookies` and its `method`.
|
|
12
|
+
|
|
3
13
|
## 0.75.2
|
|
4
14
|
|
|
5
15
|
- **Fixed: the work a public request runs under `accessLinks.asLink` is readable by the link's tenant.** It is now recorded in a child trace of the request's trace that carries the link's tenant and the `link:<id>` user; before, it sat in the request's tenantless trace, which no tenant can read. The request's own trace is unchanged. Audit rows written inside `asLink` now point at the child trace (#474).
|