@owlmeans/server-oidc-rp 0.1.18-rc.4 → 0.1.18-rc.6
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/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-oidc-rp",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-08-
|
|
4
|
+
"version": "0.1.18-rc.6",
|
|
5
|
+
"generatedAt": "2026-08-18T14:48:00.531Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/server-oidc-rp
|
|
9
9
|
|
|
10
10
|
**Layer:** Server
|
|
11
|
-
**Install:** `"@owlmeans/server-oidc-rp": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/server-oidc-rp": "^0.1.18-rc.6"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
## Key Exports
|
|
14
14
|
|
|
@@ -78,6 +78,33 @@ cfg.oidc.providers.push({
|
|
|
78
78
|
- `setupAuthServiceModules(managerModules, AUTH_API)` exposes provider-list and token-update service modules protected by `GUARD_ED25519`.
|
|
79
79
|
- When a downstream app uses OIDC/Google only for login and maps users into `@owlmeans/server-auth-identity`, do not reintroduce `appendOidcGuard()`, `makeOidcGate()`, or `setupOidcGuard()` as product authorization. Use a product-specific `GateService` over local identity data.
|
|
80
80
|
|
|
81
|
+
## Only the `id_token` is a JWT
|
|
82
|
+
|
|
83
|
+
`id_token` is a JWT by specification; an **access token's format is provider-private**. `oidc-provider`
|
|
84
|
+
issues opaque access tokens by default, so `decodeJwt(tokenSet.access_token)` (`jose`) throws
|
|
85
|
+
`JWTInvalid: Invalid JWT`. Inside the exchange handler that failure surfaces as a 500 on
|
|
86
|
+
`/authenticate/oidc/process` *after* the code exchange already succeeded, which reads as a broken
|
|
87
|
+
login rather than as the log line it came from. Decode only `tokenSet.id_token` — every claim this
|
|
88
|
+
package needs (`sub`, the `PERMISSIONS_CLAIM` grant) lives there. This applies to debug logging too:
|
|
89
|
+
a `console.log` argument is evaluated before the call, so a throwing decode in a log statement fails
|
|
90
|
+
the request just as hard as one in real logic. Never introspect an access token locally; use the
|
|
91
|
+
provider's introspection endpoint (`tokenIntrospection`) when its contents are genuinely needed.
|
|
92
|
+
|
|
93
|
+
## Gotcha: `entityId` in the browser-starts-server-finishes flow
|
|
94
|
+
|
|
95
|
+
`actions/init.ts` resolves the OIDC client two ways: via `oidc.getDefault()` (a provider flagged
|
|
96
|
+
`def: true`, matched without looking at `entityId` at all) or, only when no default exists, via a
|
|
97
|
+
remote provider lookup keyed by the caller-supplied `entityId`. The verifier record it caches must
|
|
98
|
+
only carry `entityId` when the **second** path actually used it to resolve the client — never
|
|
99
|
+
unconditionally. `utils/auth.ts`'s exchange step later does
|
|
100
|
+
`getConfig({ clientId: verification.client, ...(verification.entityId != null ? { entityId: ... } : {}) })`,
|
|
101
|
+
which requires an **exact** match on every field it's given; a stored `entityId` that was never
|
|
102
|
+
validated against the registered provider (e.g. a caller-side default/placeholder value) makes the
|
|
103
|
+
exchange fail with a bare `AuthenFailed()` even though the same default provider that worked at
|
|
104
|
+
init time is trivially available again at exchange time. Fixed 2026-08-17 — if this regresses, check
|
|
105
|
+
that the default-provider fast path in `actions/init.ts` still omits `entityId` from the cached
|
|
106
|
+
verifier.
|
|
107
|
+
|
|
81
108
|
## Public type contract (isolation principle)
|
|
82
109
|
|
|
83
110
|
`openid-client` types **never appear in this package's public exports**. All public types are OwlMeans-owned:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-oidc-rp",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@owlmeans/dep-config": "workspace:*",
|
|
40
|
-
"@owlmeans/test-auth": "^0.1.18-rc.
|
|
40
|
+
"@owlmeans/test-auth": "^0.1.18-rc.6",
|
|
41
41
|
"@types/bun": "^1.3.14",
|
|
42
42
|
"@types/node": "^26.1.0",
|
|
43
43
|
"nodemon": "^3.1.14",
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@noble/hashes": "^1.5.0",
|
|
48
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
49
|
-
"@owlmeans/auth-common": "^0.1.18-rc.
|
|
50
|
-
"@owlmeans/basic-envelope": "^0.1.18-rc.
|
|
51
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
52
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
53
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
54
|
-
"@owlmeans/did": "^0.1.18-rc.
|
|
55
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
56
|
-
"@owlmeans/oidc": "^0.1.18-rc.
|
|
57
|
-
"@owlmeans/resource": "^0.1.18-rc.
|
|
58
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
59
|
-
"@owlmeans/server-api": "^0.1.18-rc.
|
|
60
|
-
"@owlmeans/server-auth": "^0.1.18-rc.
|
|
61
|
-
"@owlmeans/server-context": "^0.1.18-rc.
|
|
62
|
-
"@owlmeans/server-entrypoint": "^0.1.18-rc.
|
|
48
|
+
"@owlmeans/auth": "^0.1.18-rc.6",
|
|
49
|
+
"@owlmeans/auth-common": "^0.1.18-rc.6",
|
|
50
|
+
"@owlmeans/basic-envelope": "^0.1.18-rc.6",
|
|
51
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.6",
|
|
52
|
+
"@owlmeans/config": "^0.1.18-rc.6",
|
|
53
|
+
"@owlmeans/context": "^0.1.18-rc.6",
|
|
54
|
+
"@owlmeans/did": "^0.1.18-rc.6",
|
|
55
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.6",
|
|
56
|
+
"@owlmeans/oidc": "^0.1.18-rc.6",
|
|
57
|
+
"@owlmeans/resource": "^0.1.18-rc.6",
|
|
58
|
+
"@owlmeans/route": "^0.1.18-rc.6",
|
|
59
|
+
"@owlmeans/server-api": "^0.1.18-rc.6",
|
|
60
|
+
"@owlmeans/server-auth": "^0.1.18-rc.6",
|
|
61
|
+
"@owlmeans/server-context": "^0.1.18-rc.6",
|
|
62
|
+
"@owlmeans/server-entrypoint": "^0.1.18-rc.6",
|
|
63
63
|
"@scure/base": "^2.3.0",
|
|
64
64
|
"dayjs": "^1.11.13",
|
|
65
65
|
"jose": "6.2.5",
|