Commit b7a7f47
committed
Refactor auth service; add OIDC auto-provisioning
Split the monolithic unified auth module into submodules (unified::types, audit, bearer, password, mod). Introduces provider-aware bearer logic: deterministic provider username composition, provider user resolution/auto-provisioning, and provider-based user-id hashing. Add JWT claim mapping for preferred_username, and propagate a new config flag (auth.auto_create_users_from_provider) through jwt_config/init_auth_config with a default (false). Remove the old unified.rs and wire the new modules into authentication flow. Misc: add docs (security, datatypes), Keycloak realm file, and update docker-compose and server.toml and related config defaults/overrides to reflect the new settings.1 parent a6c5021 commit b7a7f47
39 files changed
Lines changed: 2871 additions & 1542 deletions
File tree
- backend
- crates
- kalamdb-auth/src
- providers
- services
- unified
- kalamdb-commons/src/models/ids
- kalamdb-configs/src/config
- kalamdb-core/src/jobs
- kalamdb-store/src
- kalamdb-system/src/providers
- live_queries
- tables
- topic_offsets
- src
- tests/common/testserver
- cli
- tests
- auth
- docker/utils
- keycloak/realm-import
- docs
- api
- architecture
- reference
- security
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
1287 | 1298 | | |
1288 | 1299 | | |
1289 | 1300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| 41 | + | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| |||
0 commit comments