@adonis-agora/authkit-client 1.0.0-rc.5 → 1.0.0-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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @adonis-agora/authkit-client
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.6
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#474](https://github.com/DavideCarvalho/adonis-agora-authkit/pull/474) [`df9e49d`](https://github.com/DavideCarvalho/adonis-agora-authkit/commit/df9e49d7817c03a7cce4cac1df709c7788d6307c) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - AuthKit's tables can live in their own database schema: `schema: { name: 'auth' }` in `defineConfig` puts every table AuthKit owns in `auth` (`"auth"."auth_settings"`) while the app stays in `public`. The schema is written into every statement, so it works on any connection and inside the app's own transaction, with no `searchPath` (which leaks across clients behind PgBouncer in transaction mode).
|
|
8
|
+
|
|
9
|
+
- The boot creates the schema (`CREATE SCHEMA IF NOT EXISTS`; MySQL: `CREATE DATABASE IF NOT EXISTS`) when `autoManage` is on, and fails with a message naming the schema and the grant when the role cannot create it. `ensureAuthkitSchema(db, { schema })` does the same from a migration.
|
|
10
|
+
- Covers the OIDC adapter table (`adapters.database({ schema })` overrides), the Lucid keystore (`jwks.store: { driver: 'lucid', schema }` overrides), the account store's tables (MFA, password history, organizations), runtime settings, session revocations, the personal-agent tables and agent extensions (`PersonalAgentHost.table(name)`, `AuthkitTable.create(table, { table })`, `ensureAuthkitTables(db, tables, { schema })`; Poppy uses them and `ensurePoppySchema(db, { schema })`).
|
|
11
|
+
- authkit-client: `lucidRevocationStore({ schema })`.
|
|
12
|
+
- SQLite with `schema.name` fails the boot instead of ignoring the option.
|
|
13
|
+
- `agora:doctor` gains `authkit.db-schema`: the schema exists, the tables are in it, the connection can write there. Silent without `schema.name`.
|
|
14
|
+
- The key-rotation lock key includes the schema, so two installs in two schemas of one database do not share it.
|
|
15
|
+
|
|
16
|
+
Without `schema.name` nothing changes.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`df9e49d`](https://github.com/DavideCarvalho/adonis-agora-authkit/commit/df9e49d7817c03a7cce4cac1df709c7788d6307c)]:
|
|
21
|
+
- @adonis-agora/authkit-core@1.0.0-rc.2
|
|
22
|
+
|
|
3
23
|
## 1.0.0-rc.5
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -37,11 +37,17 @@ export interface RevocationStore {
|
|
|
37
37
|
}
|
|
38
38
|
export interface LucidRevocationStoreOptions {
|
|
39
39
|
/**
|
|
40
|
-
* Conexão Lucid a usar. Default: conexão primária.
|
|
41
|
-
*
|
|
42
|
-
* compartilhável entre apps que apontam para o MESMO banco.
|
|
40
|
+
* Conexão Lucid a usar. Default: conexão primária. A tabela é compartilhável entre
|
|
41
|
+
* apps que apontam para o MESMO banco.
|
|
43
42
|
*/
|
|
44
43
|
connection?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Schema do banco onde a tabela vive (MySQL: o database) — o `schema.name` do
|
|
46
|
+
* authkit-server, ex.: `'auth'`. Escrito em cada statement (`"auth"."auth_session_revocations"`).
|
|
47
|
+
* Não use `searchPath` na conexão para isso: atrás de um PgBouncer em modo
|
|
48
|
+
* transaction, o `SET search_path` vaza para as conexões de outros clientes.
|
|
49
|
+
*/
|
|
50
|
+
schema?: string;
|
|
45
51
|
/** Nome da tabela. Default: `auth_session_revocations` (criada pelo schema auto-manage do server). */
|
|
46
52
|
table?: string;
|
|
47
53
|
/**
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonis-agora/authkit-client",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.6",
|
|
4
4
|
"description": "AdonisJS OIDC/OAuth2 relying-party (client) toolkit: session-based authentication against an OpenID Connect identity provider, with JWT/PAT user resolvers and OpenTelemetry metrics.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dudousxd",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@adonis-agora/authkit-core": "1.0.0-rc.
|
|
80
|
+
"@adonis-agora/authkit-core": "1.0.0-rc.2",
|
|
81
81
|
"jose": "6.2.16"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@adonis-agora/authkit-server": "1.0.0-rc.
|
|
84
|
+
"@adonis-agora/authkit-server": "1.0.0-rc.12",
|
|
85
85
|
"@adonis-agora/resilience": "0.4.3",
|
|
86
86
|
"@adonisjs/auth": "10.1.0",
|
|
87
87
|
"@adonisjs/core": "7.6.0",
|
|
@@ -193,13 +193,15 @@ defineConfig({
|
|
|
193
193
|
clientId: env.get('AUTHKIT_CLIENT_ID'),
|
|
194
194
|
redirectUri: env.get('AUTHKIT_REDIRECT_URI'),
|
|
195
195
|
resolver: resolvers.jwt(),
|
|
196
|
-
backchannelLogout: { store: lucidRevocationStore() },
|
|
196
|
+
backchannelLogout: { store: lucidRevocationStore() }, // with IdP schema.name: lucidRevocationStore({ schema: 'auth' })
|
|
197
197
|
})
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
Then apply `BackchannelRevocationMiddleware` (from
|
|
201
201
|
`@adonis-agora/authkit-client/backchannel_revocation_middleware`) so revoked
|
|
202
|
-
sessions are rejected per request.
|
|
202
|
+
sessions are rejected per request. `lucidRevocationStore` accepts
|
|
203
|
+
`{ connection?, schema?, table? }`; when the IdP uses `schema.name`, pass the same
|
|
204
|
+
`schema` here so both sides use `"auth"."auth_session_revocations"`. Custom needs: `onBackchannelLogout` receives the
|
|
203
205
|
validated `{ sid, sub }` (store runs first, then the hook).
|
|
204
206
|
|
|
205
207
|
Source: `src/define_config.ts` (`BackchannelLogoutInput`), README.
|